Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Polyglot
Search
Sau Sheong Chang
October 10, 2014
Technology
0
91
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
980
Rollicking Ruby Robots Rule the World
sausheong
0
260
3 Things You May Not Know About The Go Template Engine
sausheong
0
350
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
80
Ruby, Rock and Roll
sausheong
3
300
Other Decks in Technology
See All in Technology
ウェルネス SaaS × AI、1,000万ユーザーを支える 業界特化 AI プロダクト開発への道のり
hacomono
PRO
0
140
業務のトイルをバスターせよ 〜AI時代の生存戦略〜
staka121
PRO
2
220
MLflowダイエット大作戦
lycorptech_jp
PRO
1
140
マイクロサービスへの5年間 ぶっちゃけ何をしてどうなったか
joker1007
14
6.5k
Lessons from Migrating to OpenSearch: Shard Design, Log Ingestion, and UI Decisions
sansantech
PRO
1
150
AI駆動開発の実践とその未来
eltociear
1
200
[デモです] NotebookLM で作ったスライドの例
kongmingstrap
0
160
re:Invent2025 3つの Frontier Agents を紹介 / introducing-3-frontier-agents
tomoki10
0
240
2025-12-18_AI駆動開発推進プロジェクト運営について / AIDD-Promotion project management
yayoi_dd
0
110
AWS Security Agentの紹介/introducing-aws-security-agent
tomoki10
0
310
mairuでつくるクレデンシャルレス開発環境 / Credential-less development environment using Mailru
mirakui
5
540
5分で知るMicrosoft Ignite
taiponrock
PRO
0
390
Featured
See All Featured
Facilitating Awesome Meetings
lara
57
6.7k
Scaling GitHub
holman
464
140k
Code Review Best Practice
trishagee
74
19k
Java REST API Framework Comparison - PWX 2021
mraible
34
9k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Six Lessons from altMBA
skipperchong
29
4.1k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.2k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.1k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
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