Microservices and gRPC in Scala with FS2 and Scalapb
ฝัง
- เผยแพร่เมื่อ 18 ก.ย. 2024
- blog post: blog.rockthejv...
Full Stack Scala course: rockthejvm.com...
This long-form video will teach you how to make microservices communicate via gRPC in Scala with FS2 and Scalapb. You will learn
- how to define data structures in proto files
- how to define an "interface" for RPC communication
- how to generate Scala code out of Protobuf definitions
- how to start a server that can receive gRPC requests
- how to create a client with methods it can call locally, in the classic RPC framework
- how to use the gRPC microservice from a remote client as if its functionality were local
Everything is written from scratch with Scala, fs2 and Scalapb.
Follow Rock the JVM on:
LinkedIn: / rockthejvm
Twitter: / rockthejvm
Blog: Blog: blog.rockthejv...
-------------------------------------------------------------------------
Home: rockthejvm.com
-------------------------------------------------------------------------
Love to see Cats and FS2 in your videos!
Thank you, excellent video (as always :D)! As you can see at 8:12, the case classes generated by Scalapb have all their fields defined with default values. This means that code using these classes will still compile after adding new fields at the end of protobuf messages, without necessarily being correct. To avoid this, the generated classes' companion objects normally contains a method `of()` that doesn't provide default values (nor `unknownFields` at the end of the classes, existing for extensibility and backward compatibility).
Another excellent demo as always Daniel 😊
Awesome tutorial, as always!
Thank you....
what could be missing in my intellij which is dying and burning, it cannot autocomplete nor detect the generated classes.
wow I had to work without any IDE support, the app worked but coding blindly.
Thank you very much, next stop is ZIO gRPC + authentication example (Context) ;-)