基於flask 微服務架構實現方式
1,采用的是二進制的通信格式
2,app.py 注重於視圖的邏輯, client.py 注重於請求服務,server.py注重於處理客戶端的請求處理
3,在 '.thrift'文件之中:
1),service PasteFileService{} 定義了服務端接口,屬性開頭定義了返回的類型!
client 對象調用的就是服務端接口
2),exception NotFound {
1: i32 code
} # 定義了異常
3),struct 定義了結構體類型!

githup 參考代碼
https://github.com/shiqilouyang/thrif
