Friday, June 19, 2020

10 Dos and Don’ts for getting started with Microservices

Too much noise about Microservices but still scratching your head where and how you can start? Here are the 10 Dos and Dont's.

  • Choose a simple/non-critical feature in your application, that you can afford to burn your fingers several times. Choose something like a Change Password functionality. You can develop the complete change password behaviour that involves validating the old password, accepting the new password, encrypting using BCrypt and Salt and storing them in the Database.
  • Don’t bother too much about the presentation layer. Concentrate on the core functionality and talk to the service using HTTP and exchange simple JSON data. Worry about WebComponents, Virtual DOM and the like later on.
  • Don’t develop it using the mothership technology of your project. If your project is implemented using RoR or .NET or Java implement the service using a technology other than these. For example, if your main application is built on Rails, use Spring Boot to implement the services. You can also use NodeJS.
  • Do not write more than 100 hundred lines of code to begin with. Remember it’s a microservice. Don’t make it a macro service and grow to be a giant. And that’s why we have chosen a small feature in first place.
  • Use a simple IDE like TextMate or Sublime Text or just Notepad++. Why do you need a mammoth editor that takes 5 minutes to open? In that 5 minutes you could easily complete half the service. 
  • Don’t worry about the Message Queues like RabbitMQ, Kafka etc., Do not complicate your service in the beginning itself. Keep it Simple, Stupid.
  • Learn Docker. Period. 
  • Throw away your Windows machine. Now, that’s very harsh!!! But if you want to jumpstart developing a service and quickly deploying to the cloud, please move away from the comfortable territory of Windows. Pick up a Mac or buy an Ubuntu or any Linux machine and start working.
  • Stop reading too many articles in this topic after some point. Just go ahead and implement it.

No comments:

Post a Comment