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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Sau Sheong Chang
October 10, 2014
Technology
0
99
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
170
Programming Complexity
sausheong
0
1k
Rollicking Ruby Robots Rule the World
sausheong
0
270
3 Things You May Not Know About The Go Template Engine
sausheong
0
370
Money, Sex and Evolution (v3)
sausheong
0
110
Developing Web Applications with Go
sausheong
7
840
Money, Sex and Evolution
sausheong
1
120
A Tale of Two Frameworks
sausheong
0
94
Ruby, Rock and Roll
sausheong
3
300
Other Decks in Technology
See All in Technology
OCI Database Management サービス詳細
oracle4engineer
PRO
1
7.3k
M&A 後の統合をどう進めるか ─ ナレッジワーク × Poetics が実践した組織とシステムの融合
kworkdev
PRO
1
400
セキュリティ はじめの一歩
nikinusu
0
1.5k
15 years with Rails and DDD (AI Edition)
andrzejkrzywda
0
170
入社1ヶ月でデータパイプライン講座を作った話
waiwai2111
1
230
SREのプラクティスを用いた3領域同時 マネジメントへの挑戦 〜SRE・情シス・セキュリティを統合した チーム運営術〜
coconala_engineer
2
580
モダンUIでフルサーバーレスなAIエージェントをAmplifyとCDKでサクッとデプロイしよう
minorun365
2
130
変化するコーディングエージェントとの現実的な付き合い方 〜Cursor安定択説と、ツールに依存しない「資産」〜
empitsu
4
1.3k
2026年はチャンキングを極める!
shibuiwilliam
9
1.9k
日本の85%が使う公共SaaSは、どう育ったのか
taketakekaho
1
140
MySQLのJSON機能の活用術
ikomachi226
0
150
Claude_CodeでSEOを最適化する_AI_Ops_Community_Vol.2__マーケティングx_AIはここまで進化した.pdf
riku_423
2
430
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
247
13k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
120
30 Presentation Tips
portentint
PRO
1
210
Leo the Paperboy
mayatellez
4
1.4k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
410
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.3k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
150
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
280
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.4k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
60
42k
Fireside Chat
paigeccino
41
3.8k
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