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
59
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
110
Programming Complexity
sausheong
0
810
Rollicking Ruby Robots Rule the World
sausheong
0
220
3 Things You May Not Know About The Go Template Engine
sausheong
0
280
Money, Sex and Evolution (v3)
sausheong
0
66
Developing Web Applications with Go
sausheong
7
760
Money, Sex and Evolution
sausheong
1
72
A Tale of Two Frameworks
sausheong
0
69
Ruby, Rock and Roll
sausheong
3
280
Other Decks in Technology
See All in Technology
Lambdaと地方とコミュニティ
miu_crescent
2
370
マルチプロダクトな開発組織で 「開発生産性」に向き合うために試みたこと / Improving Multi-Product Dev Productivity
sugamasao
1
310
AI前提のサービス運用ってなんだろう?
ryuichi1208
8
1.4k
【令和最新版】AWS Direct Connectと愉快なGWたちのおさらい
minorun365
PRO
5
760
Shopifyアプリ開発における Shopifyの機能活用
sonatard
4
250
テストコード品質を高めるためにMutation Testingライブラリ・Strykerを実戦導入してみた話
ysknsid25
7
2.7k
100 名超が参加した日経グループ横断の競技型 AWS 学習イベント「Nikkei Group AWS GameDay」の紹介/mediajaws202411
nikkei_engineer_recruiting
1
170
AGIについてChatGPTに聞いてみた
blueb
0
130
Exadata Database Service on Dedicated Infrastructure(ExaDB-D) UI スクリーン・キャプチャ集
oracle4engineer
PRO
2
3.2k
SREが投資するAIOps ~ペアーズにおけるLLM for Developerへの取り組み~
takumiogawa
1
440
初心者向けAWS Securityの勉強会mini Security-JAWSを9ヶ月ぐらい実施してきての近況
cmusudakeisuke
0
130
Incident Response Practices: Waroom's Features and Future Challenges
rrreeeyyy
0
160
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
Gamification - CAS2011
davidbonilla
80
5k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
How to Ace a Technical Interview
jacobian
276
23k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
430
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Into the Great Unknown - MozCon
thekraken
32
1.5k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
A Philosophy of Restraint
colly
203
16k
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