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
290
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
CloudTrail を見つめ直してみる
kazzpapa3
1
120
マルチプロダクトの信頼性を効率良く保っていくために
kworkdev
PRO
0
180
20年前の「OSS革命」に学ぶ AI時代の生存戦略
samakada
0
500
Hacobu Tech Deck
hacobu
PRO
0
130
小説執筆のハーネスエンジニアリング
yoshitetsu
0
810
プラットフォームエンジニアリングの実践 - AWS コンテナサービスで構築する社内プラットフォーム / AWS Containers Platform Meetup #1
literalice
1
220
生成AI時代のドキュメントに対する期待の整理と実践から得た学び / Rethinking Documentation for LLM: Lessons from Practice
bitkey
PRO
1
100
Google Cloud Next '26 の裏でこっそりリリースされたCloud Number Registry & Cloud Hub コスト分析 を試してみた
hikaru1001
0
110
ネットワーク運用を楽にするAWS DevOps Agent活用法!! / 20260421 Masaki Okuda
shift_evolve
PRO
2
240
ServiceNow Knowledge 26 の歩き方
manarobot
0
220
AWS Agent Registry の基礎・概要を理解する/aws-agent-registry-intro
ren8k
3
410
Revisiting [CLS] and Patch Token Interaction in Vision Transformers
yu4u
0
400
Featured
See All Featured
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
150
Darren the Foodie - Storyboard
khoart
PRO
3
3.3k
The Limits of Empathy - UXLibs8
cassininazir
1
310
Ethics towards AI in product and experience design
skipperchong
2
260
New Earth Scene 8
popppiees
3
2.1k
Mind Mapping
helmedeiros
PRO
1
160
Amusing Abliteration
ianozsvald
1
160
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
460
Discover your Explorer Soul
emna__ayadi
2
1.1k
How to build a perfect <img>
jonoalderson
1
5.4k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
280
Odyssey Design
rkendrick25
PRO
2
580
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