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
100
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
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
370
Money, Sex and Evolution (v3)
sausheong
0
120
Developing Web Applications with Go
sausheong
7
840
Money, Sex and Evolution
sausheong
1
120
A Tale of Two Frameworks
sausheong
0
97
Ruby, Rock and Roll
sausheong
3
310
Other Decks in Technology
See All in Technology
スピンアウト講座06_認証系(API-OAuth-MCP)入門
overflowinc
0
770
欠陥分析(ODC分析)における生成AIの活用プロセスと実践事例 / 20260320 Suguru Ishii & Naoki Yamakoshi & Mayu Yoshizawa
shift_evolve
PRO
0
300
20260320_JaSST26_Tokyo_登壇資料.pdf
mura_shin
0
110
スピンアウト講座05_実践活用事例
overflowinc
0
790
建設DXを支えるANDPAD: 2025年のセキュリティの取り組みと卒業したいセキュリティ
andpad
0
150
Bill One 開発エンジニア 紹介資料
sansan33
PRO
5
18k
Phase06_ClaudeCode実践
overflowinc
0
1.4k
コンテキスト・ハーネスエンジニアリングの現在
hirosatogamo
PRO
6
720
Phase10_組織浸透_データ活用
overflowinc
0
1.1k
システム標準化PMOから ガバメントクラウドCoEへ
techniczna
1
170
スピンアウト講座02_ファイル管理
overflowinc
0
900
DDD×仕様駆動で回す高品質開発のプロセス設計
littlehands
4
2k
Featured
See All Featured
How to Talk to Developers About Accessibility
jct
2
160
Building the Perfect Custom Keyboard
takai
2
720
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
160
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
240
Everyday Curiosity
cassininazir
0
170
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.8k
HDC tutorial
michielstock
1
580
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
A designer walks into a library…
pauljervisheath
210
24k
Producing Creativity
orderedlist
PRO
348
40k
A Soul's Torment
seathinner
5
2.5k
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