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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Sau Sheong Chang
October 10, 2014
Technology
120
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Polyglot
How To Write A Web App in 6 Programming Languages
Sau Sheong Chang
October 10, 2014
More Decks by Sau Sheong Chang
See All by Sau Sheong Chang
Genetic Algorithms with Go
sausheong
0
200
Programming Complexity
sausheong
0
1.1k
Rollicking Ruby Robots Rule the World
sausheong
0
310
3 Things You May Not Know About The Go Template Engine
sausheong
0
410
Money, Sex and Evolution (v3)
sausheong
0
140
Developing Web Applications with Go
sausheong
7
860
Money, Sex and Evolution
sausheong
1
140
A Tale of Two Frameworks
sausheong
0
110
Ruby, Rock and Roll
sausheong
3
320
Other Decks in Technology
See All in Technology
GopherCon @シアトル に行ってきました
logica0419
0
460
エージェント化するAI:現在地とその先に起きる変化 / AI as Agents: The Current State and the Changes Ahead
ks91
PRO
0
180
LLMアプリ、 雰囲気で運用してませんか? 〜LLMOpsの現在地〜
taka_aki
1
600
AI駆動開発をチームに根付かせる - 「1行も書かない」チームがHarnessを育てた1年 -
kenichirokimura
6
3.4k
IHV like なユースケースへのOpenID Connect 関連仕様の適用事例
optim
0
390
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.5k
APIセキュリティを組織で実現するには~注力する点と設計・実装に入れたい対策~
riiimparm
2
790
ブラウザで変わるID連携(OAuth/OIDC Numa (Immersion) Workshop 2026)
oidfj
PRO
0
380
Digital Credentials API × OpenID4VP ブラウザ完結型本人確認の実装知見(OAuth/OIDC Numa (Immersion) Workshop 2026)
oidfj
PRO
0
360
Bill One 開発エンジニア 紹介資料
sansan33
PRO
7
20k
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
5k
Introduction to Sansan Meishi Maker Development Engineer
sansan33
PRO
0
470
Featured
See All Featured
Heart Work Chapter 1 - Part 1
lfama
PRO
8
36k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
450
Building an army of robots
kneath
306
46k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.3k
Paper Plane
katiecoart
PRO
2
53k
Exploring anti-patterns in Rails
aemeredith
3
480
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
230
First, design no harm
axbom
PRO
2
1.3k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
57k
It's Worth the Effort
3n
188
29k
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