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
85
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
150
Programming Complexity
sausheong
0
950
Rollicking Ruby Robots Rule the World
sausheong
0
260
3 Things You May Not Know About The Go Template Engine
sausheong
0
340
Money, Sex and Evolution (v3)
sausheong
0
100
Developing Web Applications with Go
sausheong
7
800
Money, Sex and Evolution
sausheong
1
100
A Tale of Two Frameworks
sausheong
0
75
Ruby, Rock and Roll
sausheong
3
300
Other Decks in Technology
See All in Technology
CREが作る自己解決サイクルSlackワークフローに組み込んだAIによる社内ヘルプデスク改革 #cre_meetup
bengo4com
0
340
OSSで50の競合と戦うためにやったこと
yamadashy
3
990
Oracle Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
0
360
Open Table Format (OTF) が必要になった背景とその機能 (2025.10.28)
simosako
2
290
だいたい分かった気になる 『SREの知識地図』 / introduction-to-sre-knowledge-map-book
katsuhisa91
PRO
3
1.4k
Behind Postgres 18: The People, the Code, & the Invisible Work | Claire Giordano | PGConfEU 2025
clairegiordano
0
140
From Natural Language to K8s Operations: The MCP Architecture and Practice of kubectl-ai
appleboy
0
230
AI時代におけるデータの重要性 ~データマネジメントの第一歩~
ryoichi_ota
0
720
20251027_findyさん_音声エージェントLT
almondo_event
2
440
AI AgentをLangflowでサクッと作って、1日働かせてみた!
yano13
1
160
Azureコストと向き合った、4年半のリアル / Four and a half years of dealing with Azure costs
aeonpeople
1
300
プレイドのユニークな技術とインターンのリアル
plaidtech
PRO
1
370
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
658
61k
Git: the NoSQL Database
bkeepers
PRO
431
66k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.2k
Practical Orchestrator
shlominoach
190
11k
Code Review Best Practice
trishagee
72
19k
Unsuck your backbone
ammeep
671
58k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
Building Adaptive Systems
keathley
44
2.8k
The Invisible Side of Design
smashingmag
302
51k
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