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
96
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
160
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
360
Money, Sex and Evolution (v3)
sausheong
0
110
Developing Web Applications with Go
sausheong
7
820
Money, Sex and Evolution
sausheong
1
110
A Tale of Two Frameworks
sausheong
0
84
Ruby, Rock and Roll
sausheong
3
300
Other Decks in Technology
See All in Technology
Scrum Guide Expansion Pack が示す現代プロダクト開発への補完的視点
sonjin
0
630
Databricks Free Edition講座 データエンジニアリング編
taka_aki
0
2.6k
投資戦略を量産せよ 2 - マケデコセミナー(2025/12/26)
gamella
1
650
2025年 山梨の技術コミュニティを振り返る
yuukis
0
160
技術選定、下から見るか?横から見るか?
masakiokuda
0
190
チームで安全にClaude Codeを利用するためのプラクティス / team-claude-code-practices
tomoki10
7
3.3k
#22 CA × atmaCup 3rd 1st Place Solution
yumizu
1
190
Claude Codeを使った情報整理術
knishioka
20
12k
1万人を変え日本を変える!!多層構造型ふりかえりの大規模組織変革 / 20260108 Kazuki Mori
shift_evolve
PRO
6
1.3k
AIと融ける人間の冒険
pujisi
0
120
Data Hubグループ 紹介資料
sansan33
PRO
0
2.6k
ECS_EKS以外の選択肢_ROSA入門_.pdf
masakiokuda
1
130
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
The Cost Of JavaScript in 2023
addyosmani
55
9.4k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
51
Utilizing Notion as your number one productivity tool
mfonobong
2
200
The untapped power of vector embeddings
frankvandijk
1
1.5k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Mobile First: as difficult as doing things right
swwweet
225
10k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
65
35k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.7k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
290
Become a Pro
speakerdeck
PRO
31
5.8k
HDC tutorial
michielstock
1
320
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