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
マイクロサービスを作ろう
Search
xorphitus
September 16, 2016
Programming
0
150
マイクロサービスを作ろう
マイクロサービスに関するネタプレゼンです。
Haskell, Clojure
xorphitus
September 16, 2016
Tweet
Share
More Decks by xorphitus
See All by xorphitus
オリジナリティのあるGitLabを標準に近づける
xorphitus
1
750
コンテナ起動への道
xorphitus
0
150
型システムを学ぼうとした結果
xorphitus
0
66
M-x doctor
xorphitus
0
150
型で数を表そう
xorphitus
0
93
AOT と direct linking
xorphitus
0
76
CFS入門
xorphitus
0
76
HyperLogLog
xorphitus
0
100
immutable database
xorphitus
0
300
Other Decks in Programming
See All in Programming
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
5
1.3k
AI Agent Dojo #4: watsonx Orchestrate ADK体験
oniak3ibm
PRO
0
110
Vibe codingでおすすめの言語と開発手法
uyuki234
0
130
Navigating Dependency Injection with Metro
l2hyunwoo
1
190
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
420
Canon EOS R50 V と R5 Mark II 購入でみえてきた最近のデジイチ VR180 事情、そして VR180 静止画に活路を見出すまで
karad
0
140
生成AI時代を勝ち抜くエンジニア組織マネジメント
coconala_engineer
0
27k
生成AIを利用するだけでなく、投資できる組織へ
pospome
2
410
GISエンジニアから見たLINKSデータ
nokonoko1203
0
190
リリース時」テストから「デイリー実行」へ!開発マネージャが取り組んだ、レガシー自動テストのモダン化戦略
goataka
0
150
Python札幌 LT資料
t3tra
7
1.1k
[AtCoder Conference 2025] LLMを使った業務AHCの上⼿な解き⽅
terryu16
6
840
Featured
See All Featured
Skip the Path - Find Your Career Trail
mkilby
0
27
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
34
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
29
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
286
14k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
73
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.7k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.5k
Technical Leadership for Architectural Decision Making
baasie
0
190
Faster Mobile Websites
deanohume
310
31k
Raft: Consensus for Rubyists
vanstee
141
7.3k
Abbi's Birthday
coloredviolet
0
3.9k
Transcript
マイクロサービスを作ろう @xorphitus (2016-09-16)
マイクロサービス がバズワード化 して久しい昨今
どんな構成が 望ましいのか?
数年前から言われてること • フロントは動的な言語で手早く作れるように • バックは静的な言語で手堅く作れるように なんかよく聞く話
つまり… どういうこと だってばよ?
こうですか!?分かりません>< Dynamic Front Static Back Interaction via HTTP
よし これで行こう
通信データフォーマットは? 汎用的なものが良い つまり、定番のアレだな
こうですか!?分かりません>< Dynamic Front Static Back Interaction via HTTP (S式)
すべてが になる (S)
しかしここで 問題発生
HaskellにはS式型がない 想定外の事態に直面し、プロジェクトは難航
S式型 なければ作ろう エンジニア ヘテロジニアスで可変長なデータ構造になるので、完全なタイプセーフは無理 とりあえず値は内部的にはByteStringで保持することになった https://github.com/xorphitus/yesod-sexp-server/blob/master/main.hs#L19 あとはYesodを使ってHTTP通信できるようにすればOK
フロントはClojureScript がちフロントのところだけ https://github.com/xorphitus/yesod-sexp-client Quilで見栄えをよくしておく https://github.com/quil/quil 最近更新されてないけど大丈夫か…
動作デモ
コードはこちら(再掲) • https://github.com/xorphitus/yesod-sexp-server • https://github.com/xorphitus/yesod-sexp-client
こうして無事に マイクロサービスが 作れた
想定問答
EDNじゃダメなんですか? Q. フロントがClojureで構築されるなら データ形式はS式よりもEDNの方が楽なのでは? ※Clojureは純粋なS式ではなくEDNである
EDNじゃダメなんですか? A. ダメです フロントがもしEmacsだったらどうするのでしょうか Emacs〜Haskellサーバ間のRPCも考慮に入れた結果です
こうですか!?分かりません>< Dynamic Fronts Static Back Interaction via HTTP (S式)
Arch LinuxでYesodするには? この場の多くの人がやると思うのでアドバイス: libtinfo周りで躓きます $ yaourt -S haskell-stack libtinfo $
sudo ln -s /lib64/libtinfo.so.6 /lib64/libtinfo.so.5 (ちょっとヤダ…) その後 yesod 導入 $ stack new アプリ名 yesod-テンプレ名 (以降、公式と同じ手順)
ご清聴 ありがとう ございました!