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
84
Programming Complexity
sausheong
0
710
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
67
A Tale of Two Frameworks
sausheong
0
62
Ruby, Rock and Roll
sausheong
3
270
Other Decks in Technology
See All in Technology
いいたいことちゃんという
tkengo
0
220
LayerXにおけるLLMプロダクト開発の今までとこれから
layerx
PRO
3
590
Kernel MemoryでAzure OpenAI Serviceとお手軽データソース連携
mitsuzono
1
270
Além do else! Categorizando Pokemóns com Pattern Matching no JavaScript
wmsbill
0
700
ゼロから始めるVue.jsコミュニティ貢献 / first-vuejs-community-contribution-link-and-motivation
lmi
1
150
EMとして2023年度に頑張ったこと / What we did well in FY2023 as a EM
pauli
1
200
Babylon.jsと色々なものを組み合わせる:ブラウザのAPIやガジェットや2D描画ライブラリなど / Babylon.js 勉強会 vol.3
you
PRO
0
150
プロンプトエンジニアリングでがんばらない-Agentic Workflow へ-近藤憲児
kenjikondobai
6
1.1k
Azure犬駆動開発の記録/GlobalAzureFukuoka2024_20240420
nina01
1
230
Building Dashboards as a Hobby
egmc
0
350
アクセシビリティを考慮したUI/CSSフレームワーク・ライブラリ選定
yajihum
2
1.1k
生産性向上チームの紹介
cybozuinsideout
PRO
1
900
Featured
See All Featured
How to name files
jennybc
65
93k
Why Our Code Smells
bkeepers
PRO
331
56k
StorybookのUI Testing Handbookを読んだ
zakiyama
13
4.6k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
33
6k
Git: the NoSQL Database
bkeepers
PRO
423
63k
Product Roadmaps are Hard
iamctodd
45
9.7k
Testing 201, or: Great Expectations
jmmastey
29
6.4k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
79
43k
No one is an island. Learnings from fostering a developers community.
thoeni
16
2.1k
GraphQLとの向き合い方2022年版
quramy
33
12k
The World Runs on Bad Software
bkeepers
PRO
61
6.7k
Rebuilding a faster, lazier Slack
samanthasiow
74
8.2k
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