This document summarizes a microservices meetup hosted by @mosa_siru. Key points include:
1. @mosa_siru is an engineer at DeNA and CTO of Gunosy.
2. The meetup covered Gunosy's architecture with over 45 GitHub repositories, 30 stacks, 10 Go APIs, and 10 Python batch processes using AWS services like Kinesis, Lambda, SQS and API Gateway.
3. Challenges discussed were managing 30 microservices, ensuring API latency below 50ms across availability zones, and handling 10 requests per second with nginx load balancing across 20 servers.
This document summarizes a microservices meetup hosted by @mosa_siru. Key points include:
1. @mosa_siru is an engineer at DeNA and CTO of Gunosy.
2. The meetup covered Gunosy's architecture with over 45 GitHub repositories, 30 stacks, 10 Go APIs, and 10 Python batch processes using AWS services like Kinesis, Lambda, SQS and API Gateway.
3. Challenges discussed were managing 30 microservices, ensuring API latency below 50ms across availability zones, and handling 10 requests per second with nginx load balancing across 20 servers.
.NET Conf 2018 Tokyo, Japan にて発表の「継続的にテスト可能な設計を考える」の資料です。
ソースコードなどは以下に公開しています。
https://github.com/nuitsjp/Continuous-Testable-Design
42. めざす姿
Slide 42Copyright 2017 @nuits_jp
class Class Model
Presentation
RestauranListConsole
FindRestaurants
+ FindNearbyRestaurantsAsync(): IList<Restaurant>
GourmetService
+ SearchGourmetInfosAsync(): IList<GourmetInfo>
GeoCoordinator
Usecase
Integration
GourmetSearchResult
GourmetInfo
Restaurant
①
②
③
43. class Class Model
Presentation
RestauranListConsole
FindRestaurants
+ FindNearbyRestaurantsAsync(): IList<Restaurant>
GourmetService
+ SearchGourmetInfosAsync(): IList<GourmetInfo>
GeoCoordinator
Usecase
Integration
GourmetSearchResult
GourmetInfo
Restaurant
現在の構造
Slide 43Copyright 2017 @nuits_jp
45. class Class Model
Presentation
RestauranListConsole
FindRestaurants
+ FindNearbyRestaurantsAsync(): IList<Restaurant>
GourmetService
+ SearchGourmetInfosAsync(): IList<GourmetInfo>
GeoCoordinator
Usecase
Integration
GourmetSearchResult
GourmetInfo
Restaurant
NGポイント:密結合
Slide 45Copyright 2017 @nuits_jp
46. NGポイント:密結合
Slide 46Copyright 2017 @nuits_jp
• クラスとクラスが直接依存関係にある
• 各レイヤー間が密結合状態となっている
class Class Model
FindRestaurants
+ FindNearbyRestaurantsAsync(): IList<Restaurant>
GourmetService
+ SearchGourmetInfosAsync(): IList<GourmetInfo>
new
use
47. class Class Model
Presentation
RestauranListConsole
FindRestaurants
+ FindNearbyRestaurantsAsync(): IList<Restaurant>
GourmetService
+ SearchGourmetInfosAsync(): IList<GourmetInfo>
GeoCoordinator
Usecase
Integration
GourmetSearchResult
GourmetInfo
Restaurant
NGポイント:密結合
Slide 47Copyright 2017 @nuits_jp
62. class Class Model
FindRestaurants
+ FindNearbyRestaurantsAsync()
GourmetService
+ SearchGourmetInfosAsync()
«interface»
IGourmetService
+ SearchGourmetInfosAsync()
new
use
インターフェースの抽出結果
Slide 62Copyright 2017 @nuits_jp
利用箇所の依存性は分離できたが
インスタンス生成箇所がクラスに
依存している。
65. class Class Model
FindRestaurants
+ FindNearbyRestaurantsAsync()
GourmetService
+ SearchGourmetInfosAsync()
«interface»
IGourmetService
+ SearchGourmetInfosAsync()
new
use
インターフェースの抽出結果
Slide 65Copyright 2017 @nuits_jp
利用箇所の依存性は分離できたが
インスタンス生成箇所がクラスに
依存している。
67. 疎結合の実現
Slide 67Copyright 2017 @nuits_jp
class Class Model
FindRestaurants
+ FindNearbyRestaurantsAsync()
GourmetService
+ SearchGourmetInfosAsync()
«interface»
IGourmetService
+ SearchGourmetInfosAsync()
Program
injection
new
use