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
85
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
150
Programming Complexity
sausheong
0
950
Rollicking Ruby Robots Rule the World
sausheong
0
260
3 Things You May Not Know About The Go Template Engine
sausheong
0
340
Money, Sex and Evolution (v3)
sausheong
0
100
Developing Web Applications with Go
sausheong
7
800
Money, Sex and Evolution
sausheong
1
100
A Tale of Two Frameworks
sausheong
0
75
Ruby, Rock and Roll
sausheong
3
300
Other Decks in Technology
See All in Technology
ViteとTypeScriptのProject Referencesで 大規模モノレポのUIカタログのリリースサイクルを高速化する
shuta13
2
120
生成AI時代のセキュアコーディングとDevSecOps
yuriemori
0
150
AI時代の開発を加速する組織づくり - ブログでは書けなかったリアル
hiro8ma
1
250
Okta Identity Governanceで実現する最小権限の原則 / Implementing the Principle of Least Privilege with Okta Identity Governance
tatsumin39
0
160
HonoとJSXを使って管理画面をサクッと型安全に作ろう
diggymo
0
160
「魔法少女まどか☆マギカ Magia Exedra」におけるバックエンドの技術選定
gree_tech
PRO
0
110
現場データから見える、開発生産性の変化コード生成AI導入・運用のリアル〜 / Changes in Development Productivity and Operational Challenges Following the Introduction of Code Generation AI
nttcom
1
440
ヘンリー会社紹介資料(エンジニア向け) / company deck for engineer
henryofficial
0
320
AI時代、“平均値”ではいられない
uhyo
8
2.2k
サイバーエージェント流クラウドコスト削減施策「みんなで金塊堀太郎」
kurochan
4
2.2k
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
12
81k
Kubernetes self-healing of your workload
hwchiu
0
360
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.7k
Site-Speed That Sticks
csswizardry
13
920
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
190
55k
RailsConf 2023
tenderlove
30
1.3k
Raft: Consensus for Rubyists
vanstee
140
7.2k
Leading Effective Engineering Teams in the AI Era
addyosmani
7
570
Embracing the Ebb and Flow
colly
88
4.9k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
10
880
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.7k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
Designing for Performance
lara
610
69k
YesSQL, Process and Tooling at Scale
rocio
173
15k
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