Reputation: 33
I am a newbie in Microservices, having theoretical knowledge. I want to make a small application in Microservices. Can anyone please help me with the idea of how to implement microservices? Thanks in Advance!!
Upvotes: 2
Views: 364
Reputation: 59
No matter how perfect the code of your microservice is, you may face issues with support and development if the microservice architecture doesn’t work according to certain rules.
The following rules can help you with microservices a lot:
It means that being in the microservice folder and having made the 'ruby server.rb' command (a file for starting a microservice) we should make the microservice do the following:
Load used gems, vendor libraries (if used), and our own libraries Use the configuration (depend on the environment) for adapters or classes of client connections Establish client connections (permanent connections are meant here). As your microservice should be ready for any shutdowns, you should take care of closing these client connections at such moments. EventMachine and its callback mechanism helps a lot with this. After that your microservice should be loaded and ready for work.
For example, we almost always use Redis in our application from the very beginning, thus it is also possible to use it as a message bus, so that we don’t have to integrate any other services. However, with the application growth we should think about solutions like RabbitMQ which are more appropriate for cases like ours.
Learn more here
Upvotes: 1
Reputation: 4728
You can create something like a currency conversion app with three microservices like these:
Limit service and currency conversion service can communicate with the database for retrieving the values of the limits and currencies conversion.
For more info check github.com/in28minutes and look after a microservice repository.
Upvotes: 4
Reputation: 1
You can try splitting an existing Monolithic application to gain perspective on microservice architecture.
I wrote this article, which talks about splitting a Django App into microservices. Hope it helps.
Upvotes: 0