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
52
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
82
Programming Complexity
sausheong
0
700
Rollicking Ruby Robots Rule the World
sausheong
0
210
3 Things You May Not Know About The Go Template Engine
sausheong
0
230
Money, Sex and Evolution (v3)
sausheong
0
63
Developing Web Applications with Go
sausheong
7
720
Money, Sex and Evolution
sausheong
1
66
A Tale of Two Frameworks
sausheong
0
61
Ruby, Rock and Roll
sausheong
3
270
Other Decks in Technology
See All in Technology
NgRx Signal Store
rainerhahnekamp
0
120
Terraformあれやこれ/terraform-this-and-that
emiki
6
560
0→1開発における技術選定において一番大切なこと
bicstone
1
330
疲弊しない!AWSセキュリティ統制の考え方 #devio_osakaday1
masahirokawahara
6
5.9k
Autonomous Database Cloud 技術詳細 / adb-s_technical_detail_jp
oracle4engineer
PRO
14
35k
Databricks におけるデータエンジニアリング
databricksjapan
0
380
カオナビの利用実績をアウトカムへつなげる旅 / example-of-data-management-startup-in-kaonavi
kaonavi
0
120
開発生産性向上サービスを作るFindyが自分たちで開発生産性を爆上げした組織づくりの歩み / Findy's path to boosting its own development productivity 2024-04-17
ma3tk
3
340
転移学習とドメイン適応の基礎
kmatsui
2
570
PHPカンファレンス小田原2024
ysknsid25
3
660
Next'24 事例セッションの紹介とクラウド資格を活用したキャリア形成について語りMuscle
yasumuusan
1
340
最近たまに見かけるTiDBってなんだ? - Findy
pingcap0315
2
610
Featured
See All Featured
Building Applications with DynamoDB
mza
88
5.6k
A better future with KSS
kneath
231
16k
Creatively Recalculating Your Daily Design Routine
revolveconf
209
11k
Producing Creativity
orderedlist
PRO
336
39k
Designing for Performance
lara
601
67k
Imperfection Machines: The Place of Print at Facebook
scottboms
258
12k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
220
21k
Agile that works and the tools we love
rasmusluckow
324
20k
Rails Girls Zürich Keynote
gr2m
91
13k
The Straight Up "How To Draw Better" Workshop
denniskardys
227
130k
Making the Leap to Tech Lead
cromwellryan
123
8.5k
Documentation Writing (for coders)
carmenintech
59
3.9k
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