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
150
0
Share
マイクロサービスを作ろう
マイクロサービスに関するネタプレゼンです。
Haskell, Clojure
xorphitus
September 16, 2016
More Decks by xorphitus
See All by xorphitus
オリジナリティのあるGitLabを標準に近づける
xorphitus
1
770
コンテナ起動への道
xorphitus
0
160
型システムを学ぼうとした結果
xorphitus
0
74
M-x doctor
xorphitus
0
160
型で数を表そう
xorphitus
0
100
AOT と direct linking
xorphitus
0
81
CFS入門
xorphitus
0
79
HyperLogLog
xorphitus
0
120
immutable database
xorphitus
0
310
Other Decks in Programming
See All in Programming
2026-03-27 #terminalnight 変数展開とコマンド展開でターミナル作業をスマートにする方法
masasuzu
0
340
クラウドネイティブなエンジニアに向ける Raycastの魅力と実際の活用事例
nealle
2
190
forteeの改修から振り返るPHPerKaigi 2026
muno92
PRO
3
290
今こそ押さえておきたい アマゾンウェブサービス(AWS)の データベースの基礎 おもクラ #6版
satoshi256kbyte
1
250
HTML-Aware ERB: The Path to Reactive Rendering @ RubyKaigi 2026, Hakodate, Japan
marcoroth
0
130
Coding as Prompting Since 2025
ragingwind
0
830
Cache-moi si tu peux : patterns et pièges du cache en production - Devoxx France 2026 - Conférence
slecache
0
240
KagglerがMixSeekを触ってみた
morim
0
390
PicoRuby for IoT: Connecting to the Cloud with MQTT
yuuu
2
470
의존성 주입과 모듈화
fornewid
0
140
Running Swift without an OS
kishikawakatsumi
0
840
おれのAgentic Coding 2026/03
tsukasagr
1
150
Featured
See All Featured
エンジニアに許された特別な時間の終わり
watany
106
240k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.2k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
170
Reality Check: Gamification 10 Years Later
codingconduct
0
2.1k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.6k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
250
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
180
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.9k
Google's AI Overviews - The New Search
badams
0
970
Building the Perfect Custom Keyboard
takai
2
730
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
220
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-テンプレ名 (以降、公式と同じ手順)
ご清聴 ありがとう ございました!