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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Sau Sheong Chang
October 10, 2014
Technology
110
0
Share
Polyglot
How To Write A Web App in 6 Programming Languages
Sau Sheong Chang
October 10, 2014
More Decks by Sau Sheong Chang
See All by Sau Sheong Chang
Genetic Algorithms with Go
sausheong
0
180
Programming Complexity
sausheong
0
1k
Rollicking Ruby Robots Rule the World
sausheong
0
280
3 Things You May Not Know About The Go Template Engine
sausheong
0
380
Money, Sex and Evolution (v3)
sausheong
0
120
Developing Web Applications with Go
sausheong
7
840
Money, Sex and Evolution
sausheong
1
130
A Tale of Two Frameworks
sausheong
0
99
Ruby, Rock and Roll
sausheong
3
310
Other Decks in Technology
See All in Technology
CloudFrontのHost Header転送設定でパケットの中身はどう変わるのか?
nagisa53
1
250
MCPで決済に楽にする
mu7889yoon
0
170
昔話で振り返るAWSの歩み ~S3誕生から20年、クラウドはどう進化したのか~
nrinetcom
PRO
0
140
Cortex Codeでデータの仕事を全部Agenticにやりきろう!
gappy50
0
240
Databricks Lakehouse Federationで 運用負荷ゼロのデータ連携
nek0128
0
110
Oracle AI Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
5
1.3k
AIエージェント時代に必要な オペレーションマネージャーのロールとは
kentarofujii
0
290
Databricks Appsで実現する社内向けAIアプリ開発の効率化
r_miura
0
230
AIにより大幅に強化された AWS Transform Customを触ってみる
0air
0
280
Physical AI on AWS リファレンスアーキテクチャ / Physical AI on AWS Reference Architecture
aws_shota
1
320
OPENLOGI Company Profile for engineer
hr01
1
62k
MIX AUDIO EN BROADCAST
ralpherick
0
140
Featured
See All Featured
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
250
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
WENDY [Excerpt]
tessaabrams
9
37k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
190
Tell your own story through comics
letsgokoyo
1
880
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.2k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.6k
The SEO Collaboration Effect
kristinabergwall1
0
410
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.1k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.1k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.5k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
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