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
77
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
96
A Tale of Two Frameworks
sausheong
0
73
Ruby, Rock and Roll
sausheong
3
290
Other Decks in Technology
See All in Technology
Perlアプリケーションで トレースを実装するまでの 工夫と苦労話
masayoshi
1
400
恐怖!テストコードなき夜
tsukuboshi
2
110
Google Agentspaceを実際に導入した効果と今後の展望
mixi_engineers
PRO
2
270
Gemini in Android Studio - Google I/O Bangkok '25
akexorcist
0
180
Claude Codeが働くAI中心の業務システム構築の挑戦―AIエージェント中心の働き方を目指して
os1ma
9
1.5k
【CEDEC2025】大規模言語モデルを活用したゲーム内会話パートのスクリプト作成支援への取り組み
cygames
PRO
2
740
LIFF CLIとngrokを使ったLIFF/LINEミニアプリのお手軽実機確認
diggymo
0
230
生成AI時代におけるAI・機械学習技術を用いたプロダクト開発の深化と進化 #BetAIDay
layerx
PRO
1
970
2025新卒研修・HTML/CSS #弁護士ドットコム
bengo4com
3
13k
バクラクによるコーポレート業務の自動運転 #BetAIDay
layerx
PRO
1
800
ソフトウェア開発プロジェクトでの品質管理への提案(温故知新)
yohwada
0
100
Kiroから考える AIコーディングツールの潮流
s4yuba
4
630
Featured
See All Featured
A designer walks into a library…
pauljervisheath
207
24k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
BBQ
matthewcrist
89
9.8k
Writing Fast Ruby
sferik
628
62k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
Making Projects Easy
brettharned
117
6.3k
Code Review Best Practice
trishagee
69
19k
[RailsConf 2023] Rails as a piece of cake
palkan
56
5.7k
Become a Pro
speakerdeck
PRO
29
5.5k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.6k
Optimising Largest Contentful Paint
csswizardry
37
3.4k
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