Been a long time since my last post! After Christmas, at work we have been reinventing our current eCommerce solution with a whole new fresh approach and designing a whole layer of Micro-services out of Kubernetes and gRPC. I'm still getting my head around the configuration of Kube and deployment strategy - fortunately I have a fantastic supporting team helping me through that, but I've been jumping right in the deep end of gRPC.
It allows you to specify much like an interface, defining what functions can be called from a package and what properties the request and response consists of, so any language can consume this configuration and call it appropriately. It also reduces latency by removing the typical handshakes of the HTTP protocol. But that doesn't mean that you cannot write typical REST endpoints to it. To the contrary, be sure to take a look at the NPM package gRPC GraphQL Server. It seems quite new but does a fantastic job.
To compliment all of this, I have also written an AWS class which I will probably share at a later point, but this connects me to 3 separate services:
- Lambda: to invoke separate global functions
- Dynamo: for fast NoSQL database transactions and
- SSM: for temporary service parameter storage
Another fresh move for me this year is that I'm writing far less functions that return a promise in favour of writing async functions. It is certainly much cleaner, and I feel rather stupid, but I had previously thought that you could only await on an async function, and not on a function that returns a promise. Has anyone else thought the same?
Hopefully this has given you some ideas. Stay safe!
Comments
Post a Comment