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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
770
コンテナ起動への道
xorphitus
0
160
型システムを学ぼうとした結果
xorphitus
0
72
M-x doctor
xorphitus
0
160
型で数を表そう
xorphitus
0
100
AOT と direct linking
xorphitus
0
79
CFS入門
xorphitus
0
79
HyperLogLog
xorphitus
0
110
immutable database
xorphitus
0
310
Other Decks in Programming
See All in Programming
S3ストレージクラスの「見える」「ある」「使える」は全部違う ─ 体験から見た、仕様の深淵を覗く
ya_ma23
0
1.2k
Symfony + NelmioApiDocBundle を使った スキーマ駆動開発 / Schema Driven Development with NelmioApiDocBundle
okashoi
0
240
Strategy for Finding a Problem for OSS: With Real Examples
kibitan
0
120
それはエンジニアリングの糧である:AI開発のためにAIのOSSを開発する現場より / It serves as fuel for engineering: insights from the field of developing open-source AI for AI development.
nrslib
1
640
Geminiをパートナーに神社DXシステムを個人開発した話(いなめぐDX 開発振り返り)
fujiba
0
120
20260315 AWSなんもわからん🥲
chiilog
2
180
AI Assistants for YourAngular Solutions @Angular Graz, March 2026
manfredsteyer
PRO
0
120
How to stabilize UI tests using XCTest
akkeylab
0
150
テレメトリーシグナルが導くパフォーマンス最適化 / Performance Optimization Driven by Telemetry Signals
seike460
PRO
2
190
Coding at the Speed of Thought: The New Era of Symfony Docker
dunglas
0
3k
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
3
1.2k
Everything Claude Code OSS詳細 — 5層構造の中身と導入方法
targe
0
160
Featured
See All Featured
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
140
So, you think you're a good person
axbom
PRO
2
2k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Designing for humans not robots
tammielis
254
26k
The Curse of the Amulet
leimatthew05
1
11k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
330
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
600
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.5k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
120
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
100
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
93
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-テンプレ名 (以降、公式と同じ手順)
ご清聴 ありがとう ございました!