Implementing Type Checker in Python3

introduction As we all know, python is a dynamic language and dynamic typing can be flexible, powerful, convenient and easy. But with your project growing, dynamic typing is not always the best approach. As an opposite, static typing can make programs easier to understand and maintain. Type declarations can serve as machine-checked documentation. This is important as code is typically read much more often than modified, and this is especially important for large and complex programs....

March 20, 2018 · 4 min · 794 words · Me

gRPC example in Docker

gRPC example protocol buffers; As we all know, gRPC service is defined using protocol buffers; If you want to know how to define a .proto file, you can go to [protocol buffer Developer Guide](https://developers.google.com/protocol-buffers/docs/overview), Here is our stream_algorithm.proto defination: syntax = "proto3"; // Interface exported by the server. service MyAlgorithmBrain { //get the rank of the item in real time rpc MyRankOfStream(stream ItemRequest) returns (ItemResponse){} //get the structure of the sketch maintained in server rpc SketchOfStream(stream ItemRequest) returns (ItemResponse){} } message ItemRequest { int32 id = 1; int32 value = 2; string timestamp = 3; } message ItemResponse { float rank = 1; } Generate gRPC code Next we need to update the gRPC code used by our application to use the new service definition....

March 19, 2018 · 3 min · 580 words · Me