Summary

As you can see, writing a service does not change much between frameworks. Our code is very similar, with minor changes. Seneca is stricter about message format and content, so we used base64 to encode our image inside the JSON message. Other than that, everything is the same.

For tools such as Express, which is a broader tool in terms of doing everything you might need, and not just microservices, you'll need to find the right plugins, and perhaps write several more plugins, in order to help you reach a production-ready microservice. You get the advantage of being able to choose everything about the service, but you need to write a lot of code. To facilitate the task, Hydra might be a good start for an initial set of plugins.

For other tools such as Seneca, some aspects of the microservice (for instance, the communication using JSON messages and service composition) are already packed. This comes at the price of a stricter service definition.

In the next chapter, we will discuss the security of our three service versions, and how we can store state.

 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset