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
83
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
150
Programming Complexity
sausheong
0
940
Rollicking Ruby Robots Rule the World
sausheong
0
250
3 Things You May Not Know About The Go Template Engine
sausheong
0
340
Money, Sex and Evolution (v3)
sausheong
0
97
Developing Web Applications with Go
sausheong
7
800
Money, Sex and Evolution
sausheong
1
100
A Tale of Two Frameworks
sausheong
0
73
Ruby, Rock and Roll
sausheong
3
300
Other Decks in Technology
See All in Technology
VCC 2025 Write-up
bata_24
0
140
入門 FormObject / An Introduction to FormObject #kaigionrails
expajp
2
1.4k
Oracle Cloud Infrastructure:2025年9月度サービス・アップデート
oracle4engineer
PRO
0
310
BtoBプロダクト開発の深層
16bitidol
0
130
Goのビルドシステムの変遷 / The history of Go's build system
ymotongpoo
12
3.4k
それでも私はContextに値を詰めたい | Go Conference 2025 / go conference 2025 fill context
budougumi0617
4
900
"複雑なデータ処理 × 静的サイト" を両立させる、楽をするRails運用 / A low-effort Rails workflow that combines “Complex Data Processing × Static Sites”
hogelog
3
1.3k
いまさら聞けない ABテスト入門
skmr2348
0
170
Function calling機能をPLaMo2に実装するには / PFN LLMセミナー
pfn
PRO
0
680
GC25 Recap+: Advancing Go Garbage Collection with Green Tea
logica0419
1
310
動画データのポテンシャルを引き出す! Databricks と AI活用への奮闘記(現在進行形)
databricksjapan
0
120
DEFCON CHV CTF 2025 Write-up
bata_24
0
190
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
237
140k
Raft: Consensus for Rubyists
vanstee
139
7.1k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Visualization
eitanlees
148
16k
4 Signs Your Business is Dying
shpigford
185
22k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
The Cost Of JavaScript in 2023
addyosmani
53
9k
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.5k
It's Worth the Effort
3n
187
28k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
Scaling GitHub
holman
463
140k
YesSQL, Process and Tooling at Scale
rocio
173
14k
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