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
78
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
140
Programming Complexity
sausheong
0
930
Rollicking Ruby Robots Rule the World
sausheong
0
250
3 Things You May Not Know About The Go Template Engine
sausheong
0
330
Money, Sex and Evolution (v3)
sausheong
0
93
Developing Web Applications with Go
sausheong
7
800
Money, Sex and Evolution
sausheong
1
97
A Tale of Two Frameworks
sausheong
0
73
Ruby, Rock and Roll
sausheong
3
290
Other Decks in Technology
See All in Technology
LLMで構造化出力の成功率をグンと上げる方法
keisuketakiguchi
0
690
AIのグローバルトレンド 2025 / ai global trend 2025
kyonmm
PRO
1
130
アカデミーキャンプ 2025 SuuuuuuMMeR「燃えろ!!ロボコン」 / Academy Camp 2025 SuuuuuuMMeR "Burn the Spirit, Robocon!!" DAY 1
ks91
PRO
0
130
【新卒研修資料】数理最適化 / Mathematical Optimization
brainpadpr
25
12k
GMOペパボのデータ基盤とデータ活用の現在地 / Current State of GMO Pepabo's Data Infrastructure and Data Utilization
zaimy
3
210
마라톤 끝의 단거리 스퍼트: 2025년의 AI
inureyes
PRO
1
730
専門分化が進む分業下でもユーザーが本当に欲しかったものを追求するプロダクトマネジメント/Focus on real user needs despite deep specialization and division of labor
moriyuya
1
1.2k
UDDのススメ - 拡張版 -
maguroalternative
1
410
Amazon Q と『音楽』-ゲーム音楽もAmazonQで作成してみた感想-
senseofunity129
0
130
JAWS AI/ML #30 AI コーディング IDE "Kiro" を触ってみよう
inariku
3
350
風が吹けばWHOISが使えなくなる~なぜWHOIS・RDAPはサーバー証明書のメール認証に使えなくなったのか~
orangemorishita
15
5.6k
家族の思い出を形にする 〜 1秒動画の生成を支えるインフラアーキテクチャ
ojima_h
3
910
Featured
See All Featured
Producing Creativity
orderedlist
PRO
347
40k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
332
22k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.6k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
183
54k
Mobile First: as difficult as doing things right
swwweet
223
9.9k
Making Projects Easy
brettharned
117
6.3k
Why Our Code Smells
bkeepers
PRO
337
57k
The Invisible Side of Design
smashingmag
301
51k
Faster Mobile Websites
deanohume
308
31k
Thoughts on Productivity
jonyablonski
69
4.8k
How to Ace a Technical Interview
jacobian
278
23k
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 sausheong@gmail.com @sausheong 21