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
0
110
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
180
Programming Complexity
sausheong
0
1k
Rollicking Ruby Robots Rule the World
sausheong
0
280
3 Things You May Not Know About The Go Template Engine
sausheong
0
370
Money, Sex and Evolution (v3)
sausheong
0
120
Developing Web Applications with Go
sausheong
7
840
Money, Sex and Evolution
sausheong
1
120
A Tale of Two Frameworks
sausheong
0
97
Ruby, Rock and Roll
sausheong
3
310
Other Decks in Technology
See All in Technology
How to install a gem
indirect
0
1.5k
データマネジメント戦略Night - 4社のリアルを語る会
ktatsuya
1
240
形式手法特論:SMT ソルバで解く認可ポリシの静的解析 #kernelvm / Kernel VM Study Tsukuba No3
ytaka23
1
790
A4)シラバスを超えて語る、テストマネジメント
moritamasami
0
130
Datadog で実現するセキュリティ対策 ~オブザーバビリティとセキュリティを 一緒にやると何がいいのか~
a2ush
0
130
Bill One 開発エンジニア 紹介資料
sansan33
PRO
5
18k
開発チームとQAエンジニアの新しい協業モデル -年末調整開発チームで実践する【QAリード施策】-
qa
0
300
韓非子に学ぶAI活用術
tomfook
2
680
SSoT(Single Source of Truth)で「壊して再生」する設計
kawauso
2
340
Blue/Green Deployment を用いた PostgreSQL のメジャーバージョンアップ
kkato1
0
130
GitHub Copilot CLI で Azure Portal to Bicep
tsubakimoto_s
0
190
ThetaOS - A Mythical Machine comes Alive
aslander
0
180
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
528
40k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
150
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
220
4 Signs Your Business is Dying
shpigford
187
22k
WCS-LA-2024
lcolladotor
0
500
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
130
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
330
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.5k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
460
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
The Pragmatic Product Professional
lauravandoore
37
7.2k
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