Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
「Managed Instances」と「durable functions」で広がるAWS Lambdaのユースケース
lamaglama39
0
310
SSO方式とJumpアカウント方式の比較と設計方針
yuobayashi
7
620
mairuでつくるクレデンシャルレス開発環境 / Credential-less development environment using Mailru
mirakui
2
280
Database イノベーショントークを振り返る/reinvent-2025-database-innovation-talk-recap
emiki
0
130
AIと二人三脚で育てた、個人開発アプリグロース術
zozotech
PRO
1
720
Reinforcement Fine-tuning 基礎〜実践まで
ch6noota
0
180
Sansanが実践する Platform EngineeringとSREの協創
sansantech
PRO
2
840
チーリンについて
hirotomotaguchi
6
1.9k
GitHub Copilotを使いこなす 実例に学ぶAIコーディング活用術
74th
3
2.9k
日本Rubyの会の構造と実行とあと何か / hokurikurk01
takahashim
4
1.1k
大企業でもできる!ボトムアップで拡大させるプラットフォームの作り方
findy_eventslides
1
760
乗りこなせAI駆動開発の波
eltociear
1
1.1k
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.2k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Why Our Code Smells
bkeepers
PRO
340
57k
How to train your dragon (web standard)
notwaldorf
97
6.4k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.8k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
710
Leading Effective Engineering Teams in the AI Era
addyosmani
8
1.3k
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