Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Polyglot
Search
Sau Sheong Chang
October 10, 2014
Technology
0
60
Polyglot
How To Write A Web App in 6 Programming Languages
Sau Sheong Chang
October 10, 2014
Tweet
Share
More Decks by Sau Sheong Chang
See All by Sau Sheong Chang
Genetic Algorithms with Go
sausheong
0
110
Programming Complexity
sausheong
0
830
Rollicking Ruby Robots Rule the World
sausheong
0
230
3 Things You May Not Know About The Go Template Engine
sausheong
0
300
Money, Sex and Evolution (v3)
sausheong
0
71
Developing Web Applications with Go
sausheong
7
770
Money, Sex and Evolution
sausheong
1
74
A Tale of Two Frameworks
sausheong
0
69
Ruby, Rock and Roll
sausheong
3
280
Other Decks in Technology
See All in Technology
FODにおけるホーム画面編成のレコメンド
watarukudo
PRO
2
270
#TRG24 / David Cuartielles / Post Open Source
tarugoconf
0
580
生成AIのビジネス活用
seosoft
0
110
The future we create with our own MVV
matsukurou
0
2k
dbtを中心にして組織のアジリティとガバナンスのトレードオンを考えてみた
gappy50
0
240
CDKのコードレビューを楽にするパッケージcdk-mentorを作ってみた/cdk-mentor
tomoki10
0
210
商品レコメンドでのexplicit negative feedbackの活用
alpicola
1
350
Building Scalable Backend Services with Firebase
wisdommatt
0
110
0→1事業こそPMは営業すべし / pmconf #落選お披露目 / PM should do sales in zero to one
roki_n_
PRO
1
1.4k
シフトライトなテスト活動を適切に行うことで、無理な開発をせず、過剰にテストせず、顧客をビックリさせないプロダクトを作り上げているお話 #RSGT2025 / Shift Right
nihonbuson
3
2.1k
Amazon Route 53, 待ちに待った TLSAレコードのサポート開始
kenichinakamura
0
170
月間60万ユーザーを抱える 個人開発サービス「Walica」の 技術スタック変遷
miyachin
1
140
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1030
460k
Building Adaptive Systems
keathley
38
2.4k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Gamification - CAS2011
davidbonilla
80
5.1k
YesSQL, Process and Tooling at Scale
rocio
170
14k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
98
18k
Adopting Sorbet at Scale
ufuk
74
9.2k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Transcript
Polyglot Or How To Write A Web App in 6
Programming Languages Chang Sau Sheong Oct 2014 1
* http://spectrum.ieee.org/computing/software/top-‐10-‐programming-‐languages 2
*http://blog.codeeval.com/codeevalblog/2014 3
Programming language wars 4
Dependency hell 5
Polyglot 6
Build your web app with any language 7
All at once 8
Acceptor HTTP Responder Responder Responder POST/_/post Responder Responder Responder GET/_/posts
Acceptor HTTP Acceptor HTTP Broker ZMQ ZMQ Responder Responder Responder GET/_/post/new 9
10 Acceptor P
11 P Broker
12 Responder You need to write this
Simple responder require 'securerandom' require 'bundler' Bundler.require broker = "tcp://localhost:4321"
routeid = "GET/_/hello/ruby" identity = SecureRandom.uuid puts "#{routeid} - #{identity} responder ready." ctx = ZMQ::Context.new client = ctx.socket ZMQ::REQ client.identity = identity client.connect broker client.send_string routeid loop do request = String.new client.recv_string request response = [routeid, "200", "{\"Content-Type\": \"text/html\"}", "Hello World"] client.send_strings response end Define route ID and unique responder identity Connect to broker Register responder Receive request and process it Return with response 13
Distributed by default 14
15 Broker Acceptor Responder Responder Responder
Scale as you like it 16
17 Broker Acceptor Responder Responder Responder Acceptor Responder
Evolve your web app 18
19 Broker Acceptor Responder Responder Responder
Still Evolving (need your feedback and help) 20
http://github.com/sausheong/polyglot
[email protected]
@sausheong 21