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
73
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
130
Programming Complexity
sausheong
0
920
Rollicking Ruby Robots Rule the World
sausheong
0
240
3 Things You May Not Know About The Go Template Engine
sausheong
0
330
Money, Sex and Evolution (v3)
sausheong
0
89
Developing Web Applications with Go
sausheong
7
790
Money, Sex and Evolution
sausheong
1
93
A Tale of Two Frameworks
sausheong
0
72
Ruby, Rock and Roll
sausheong
3
290
Other Decks in Technology
See All in Technology
登壇ネタの見つけ方 / How to find talk topics
pinkumohikan
5
540
"サービスチーム" での技術選定 / Making Technology Decisions for the Service Team
kaminashi
1
190
あなたの声を届けよう! 女性エンジニア登壇の意義とアウトプット実践ガイド #wttjp / Call for Your Voice
kondoyuko
4
480
GeminiとNotebookLMによる金融実務の業務革新
abenben
0
240
Delegating the chores of authenticating users to Keycloak
ahus1
0
130
Tech-Verse 2025 Global CTO Session
lycorptech_jp
PRO
0
720
SpringBoot x TestContainerで実現するポータブル自動結合テスト
demaecan
0
100
Claude Code Actionを使ったコード品質改善の取り組み
potix2
PRO
6
2.4k
「Chatwork」の認証基盤の移行とログ活用によるプロダクト改善
kubell_hr
1
200
フィンテック養成勉強会#54
finengine
0
180
20250625 Snowflake Summit 2025活用事例 レポート / Nowcast Snowflake Summit 2025 Case Study Report
kkuv
1
340
Microsoft Build 2025 技術/製品動向 for Microsoft Startup Tech Community
torumakabe
2
310
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
329
21k
The Cost Of JavaScript in 2023
addyosmani
51
8.5k
Building Applications with DynamoDB
mza
95
6.5k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Code Review Best Practice
trishagee
68
18k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.1k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
48
2.8k
Scaling GitHub
holman
459
140k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.7k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.5k
Building Flexible Design Systems
yeseniaperezcruz
328
39k
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