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
67
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
910
Rollicking Ruby Robots Rule the World
sausheong
0
240
3 Things You May Not Know About The Go Template Engine
sausheong
0
320
Money, Sex and Evolution (v3)
sausheong
0
85
Developing Web Applications with Go
sausheong
7
790
Money, Sex and Evolution
sausheong
1
87
A Tale of Two Frameworks
sausheong
0
72
Ruby, Rock and Roll
sausheong
3
290
Other Decks in Technology
See All in Technology
プラットフォームとしての Datadog / Datadog as Platforms
aoto
PRO
1
330
Houtou.pm #1
papix
0
660
LT:組込み屋さんのオシロが壊れた!
windy_pon
0
340
研究開発部メンバーの働き⽅ / Sansan R&D Profile
sansan33
PRO
3
17k
GitHub Coding Agent 概要
kkamegawa
1
1.5k
いまさら聞けない Git 超入門 〜Gitって結局なに?から始める第一歩〜
devops_vtj
0
150
SmartHRの複数のチームにおけるMCPサーバーの活用事例と課題
yukisnow1823
2
1.1k
ITエンジニアを取り巻く環境とキャリアパス / A career path for Japanese IT engineers
takatama
4
1.5k
FastMCPでSQLをチェックしてくれるMCPサーバーを自作してCursorから動かしてみた
nayuts
1
200
ProductZine Day 2025 Assuredのプロダクトディスカバリー
kechol
0
110
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
740
AIエージェントデザインパターンの選び方
almondo_event
0
140
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.6k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.3k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
5
620
Designing Experiences People Love
moore
142
24k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Thoughts on Productivity
jonyablonski
69
4.7k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Gamification - CAS2011
davidbonilla
81
5.3k
For a Future-Friendly Web
brad_frost
178
9.7k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
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