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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Sau Sheong Chang
October 10, 2014
Technology
110
0
Share
Polyglot
How To Write A Web App in 6 Programming Languages
Sau Sheong Chang
October 10, 2014
More Decks by Sau Sheong Chang
See All by Sau Sheong Chang
Genetic Algorithms with Go
sausheong
0
180
Programming Complexity
sausheong
0
1.1k
Rollicking Ruby Robots Rule the World
sausheong
0
280
3 Things You May Not Know About The Go Template Engine
sausheong
0
380
Money, Sex and Evolution (v3)
sausheong
0
130
Developing Web Applications with Go
sausheong
7
850
Money, Sex and Evolution
sausheong
1
130
A Tale of Two Frameworks
sausheong
0
99
Ruby, Rock and Roll
sausheong
3
310
Other Decks in Technology
See All in Technology
マルチプロダクトの信頼性を効率良く保っていくために
kworkdev
PRO
0
160
Eight Engineering Unit 紹介資料
sansan33
PRO
3
7.3k
AIが書いたコードを信じられない問題 〜レビュー負荷を下げるために変えたこと〜 / The AI Code Trust Gap: Reducing the Review Burden
bitkey
PRO
7
1.3k
AIでAIをテストする - 音声AIエージェントの品質保証戦略
morix1500
1
120
The Journey of Box Building
tagomoris
4
2.7k
小説執筆のハーネスエンジニアリング
yoshitetsu
0
690
自立を加速させる神器 - EMOasis #11
stanby_inc
0
140
みんなの「データ活用」を支えるストレージ担当から持ち込むAWS活用/コミュニティー設計TIPS 10選~「作れる」より、「続けられる」設計へ~
yoshiki0705
0
250
AI時代のガードレールとしてのAPIガバナンス
nagix
0
280
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
3.1k
Shipping AI Agents — Lessons from Production
vvatanabe
0
240
Digitization部 紹介資料
sansan33
PRO
1
7.3k
Featured
See All Featured
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
110k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
64
55k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.4k
How to train your dragon (web standard)
notwaldorf
97
6.6k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
Amusing Abliteration
ianozsvald
1
150
Google's AI Overviews - The New Search
badams
0
980
Building Adaptive Systems
keathley
44
3k
[SF Ruby Conf 2025] Rails X
palkan
2
960
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.6k
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