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
61
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
120
Programming Complexity
sausheong
0
850
Rollicking Ruby Robots Rule the World
sausheong
0
230
3 Things You May Not Know About The Go Template Engine
sausheong
0
310
Money, Sex and Evolution (v3)
sausheong
0
77
Developing Web Applications with Go
sausheong
7
780
Money, Sex and Evolution
sausheong
1
79
A Tale of Two Frameworks
sausheong
0
70
Ruby, Rock and Roll
sausheong
3
280
Other Decks in Technology
See All in Technology
“常に進化する”開発現場へ! SHIFTが語るアジャイルQAの未来/20250306 Yuma Murase
shift_evolve
0
180
Log Analytics を使った実際の運用 - Sansan Data Hub での取り組み
sansantech
PRO
0
270
プロダクト開発者目線での Entra ID 活用
sansantech
PRO
0
290
RaspberryPi CM4(CM5も)面白いぞ!
nonnoise
1
280
Real World Nix CI/CD編
asa1984
1
160
Qiita Organizationを導入したら、アウトプッターが爆増して会社がちょっと有名になった件
minorun365
PRO
1
400
AIエージェント開発のノウハウと課題
pharma_x_tech
10
5.8k
ライフステージの変化を乗り越える 探索型のキャリア選択
tenshoku_draft
2
490
Roomの監視可能なクエリのカスタマイズとレガシーコードへの適用
shiita0903
2
150
貧民的プログラミングのすすめ
kakehashi
PRO
2
340
一歩ずつ成長しながら進める ZOZOの基幹システムリプレイス/Growing Stap by Stap ZOZO BackOffice System Replacement
cocet33000
2
380
User Story Mapping + Inclusive Team
kawaguti
PRO
3
650
Featured
See All Featured
Designing Experiences People Love
moore
140
23k
Stop Working from a Prison Cell
hatefulcrawdad
268
20k
The Language of Interfaces
destraynor
156
24k
How to Think Like a Performance Engineer
csswizardry
22
1.4k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.5k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
For a Future-Friendly Web
brad_frost
176
9.6k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.3k
Into the Great Unknown - MozCon
thekraken
35
1.7k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
13
1k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
175
52k
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