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
750
コンテナ起動への道
xorphitus
0
160
型システムを学ぼうとした結果
xorphitus
0
67
M-x doctor
xorphitus
0
160
型で数を表そう
xorphitus
0
97
AOT と direct linking
xorphitus
0
77
CFS入門
xorphitus
0
76
HyperLogLog
xorphitus
0
110
immutable database
xorphitus
0
310
Other Decks in Programming
See All in Programming
CSC307 Lecture 10
javiergs
PRO
1
660
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
CSC307 Lecture 08
javiergs
PRO
0
670
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
610
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
4
2k
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
200
CSC307 Lecture 07
javiergs
PRO
1
560
Best-Practices-for-Cortex-Analyst-and-AI-Agent
ryotaroikeda
1
110
AI & Enginnering
codelynx
0
120
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
140
開発者から情シスまで - 多様なユーザー層に届けるAPI提供戦略 / Postman API Night Okinawa 2026 Winter
tasshi
0
210
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1.5k
Featured
See All Featured
The Language of Interfaces
destraynor
162
26k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.2k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.1k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
350
Side Projects
sachag
455
43k
A Tale of Four Properties
chriscoyier
162
24k
Navigating Team Friction
lara
192
16k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
110
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
94
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
240
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
Typedesign – Prime Four
hannesfritz
42
2.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-テンプレ名 (以降、公式と同じ手順)
ご清聴 ありがとう ございました!