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
56
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
100
Programming Complexity
sausheong
0
790
Rollicking Ruby Robots Rule the World
sausheong
0
220
3 Things You May Not Know About The Go Template Engine
sausheong
0
270
Money, Sex and Evolution (v3)
sausheong
0
63
Developing Web Applications with Go
sausheong
7
750
Money, Sex and Evolution
sausheong
1
69
A Tale of Two Frameworks
sausheong
0
66
Ruby, Rock and Roll
sausheong
3
280
Other Decks in Technology
See All in Technology
不動産 x AIことはじめ~データの真価を拓くために
estie
0
130
「認証認可」という体験をデザインする ~Nekko Cloud認証認可基盤計画
logica0419
2
450
『GRANBLUE FANTASY: Relink』クオリティと物量の両立に挑戦したフェイシャルアニメーション事例 ~カットシーンからランタイムまで~
cygames
0
120
QAに対する超個人的な解釈 / Personal Take on QA
toma_sm
1
140
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
5
46k
学術機関におけるID連携とOpenID Connect
fujie
0
310
たった1人からはじめる【Agile Community of Practice】~ソース原理とFearless Changeを添えて~
ktc_corporate_it
1
510
Cloud Run と GitHub Template Repository による軽量なアプリケーションプラットフォーム/ #nikkei_tech_talk
nikkei_engineer_recruiting
0
120
AIで変わるテスト自動化:最新ツールの多様なアプローチ/ 20240910 Takahiro Kaneyama
shift_evolve
0
250
Agile in Automotive Industry, puzzles and lights.
hiranabe
3
1.4k
事前準備が肝!AI活用のための業務改革
layerx
PRO
1
400
『GRANBLUE FANTASY Relink』ソフトウェアラスタライザによる実践的なオクルージョンカリング
cygames
0
180
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
167
14k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Rails Girls Zürich Keynote
gr2m
93
13k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
278
13k
Design by the Numbers
sachag
277
19k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
29
2.6k
Side Projects
sachag
451
42k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
4 Signs Your Business is Dying
shpigford
179
21k
Making the Leap to Tech Lead
cromwellryan
128
8.8k
Building Flexible Design Systems
yeseniaperezcruz
325
38k
KATA
mclloyd
27
13k
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