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
82
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
140
Programming Complexity
sausheong
0
930
Rollicking Ruby Robots Rule the World
sausheong
0
250
3 Things You May Not Know About The Go Template Engine
sausheong
0
340
Money, Sex and Evolution (v3)
sausheong
0
96
Developing Web Applications with Go
sausheong
7
800
Money, Sex and Evolution
sausheong
1
100
A Tale of Two Frameworks
sausheong
0
73
Ruby, Rock and Roll
sausheong
3
290
Other Decks in Technology
See All in Technology
AWSを利用する上で知っておきたい名前解決のはなし(10分版)
nagisa53
10
3.2k
20250913_JAWS_sysad_kobe
takuyay0ne
2
250
AIエージェントで90秒の広告動画を制作!台本・音声・映像・編集をつなぐAWS最新アーキテクチャの実践
nasuvitz
3
340
Terraformで構築する セルフサービス型データプラットフォーム / terraform-self-service-data-platform
pei0804
1
190
EncryptedSharedPreferences が deprecated になっちゃった!どうしよう! / Oh no! EncryptedSharedPreferences has been deprecated! What should I do?
yanzm
0
480
dbt開発 with Claude Codeのためのガードレール設計
10xinc
2
1.3k
20250910_障害注入から効率的復旧へ_カオスエンジニアリング_生成AIで考えるAWS障害対応.pdf
sh_fk2
3
270
実践!カスタムインストラクション&スラッシュコマンド
puku0x
0
510
新アイテムをどう使っていくか?みんなであーだこーだ言ってみよう / 20250911-rpi-jam-tokyo
akkiesoft
0
330
エンジニアリングマネージャーの成長の道筋とキャリア / Developers Summit 2025 KANSAI
daiksy
3
740
新規プロダクトでプロトタイプから正式リリースまでNext.jsで開発したリアル
kawanoriku0
1
190
スマートファクトリーの第一歩 〜AWSマネージドサービスで 実現する予知保全と生成AI活用まで
ganota
2
310
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
920
Facilitating Awesome Meetings
lara
55
6.5k
Optimizing for Happiness
mojombo
379
70k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
Building an army of robots
kneath
306
46k
Designing for humans not robots
tammielis
253
25k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Become a Pro
speakerdeck
PRO
29
5.5k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
61k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.5k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.1k
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