Microservices are both an architecture style and a popular approach for software development to satisfy modern business demands. In the past, the IT industry used monolithic or Service Oriented Architecture (SOA)-based solutions as the standard, but that’s changing now. New tools like Talend Microservices allow developers to focus on specific problems without adding excessive complexity to deployment or other administrative tasks that are usually associated with isolated services.
What is a Microservice?
A microservice is an isolated, loosely-coupled unit of development that works on a single domain or matter. Like Service Oriented Architecture (SOA), microservices are widely appreciated and acknowledged architecture style. In this era of digital transformation, social media, cloud, IoT and big data enterprises are rapidly embracing technologies that have the potential to radically increase their revenue. In this data-driven landscape, businesses cannot afford to spend months in the waterfall development model to get into the market. A faster solution, which is reliable, manageable, scalable, upgradeable and replaceable is the need of the hour and microservices are a perfect match to fill this gap.
Paradigm shifts in technology have reshaped all the layers of software development in a dramatic way. Both relational databases and databases without any normalization principle like ‘NoSQL’ have forced enterprises to think differently. Beyond that, Platform as a Service (PaaS) providers such as AWS and Salesforce are influencing the design of middleware. Integration Platforms as a Service (iPaaS) such as Talend Integration Cloud are stretching integration boundaries beyond the traditional market. These industry wide paradigm shifts are the driving force towards the rapid adoption of microservices. Let's now look at some advantages of microservices in greater detail.
Advantages of Microservices
Microservices, if designed properly, should be dealing a singular business function which, in turn, allows it to have a smaller footprint. Container technologies like Docker are also helpful to maintain a small footprint.
You can freely choose libraries and tools that you believe is right for that particular service. It gives a great freedom in a team where diversity is present in expertise. Everyone can develop independently from others while working on a single service.
For example, one can use a non-relational database for faster response times but still utilize a full featured transactional service to carry out a purchase.
Microservices are easy to review and as it focusses on one business issue, it’s easier to fix bugs and enhance features in short iterations.
Ideally, microservices should be automated from development to production. Continuous Integration (CI) tools such as Jenkins can be used to automate builds from GIT or SVN. Automated Testing and Infrastructure provisioning is a very important factor which is achievable using Selenium, Cucumber, and Docker.
Scalability & Availability
Microservices run independently of other services. It is very important that they detect any failure as early as possible and should also be able to heal themselves. Microservices focuses on ‘Mean Time Between Failures’ (MTBF) as well as ‘Mean Time To Recover’ (MTTR). As microservices evolve it learns from its own failures and helps avoid future failures.
Dependencies and Communication
Microservices are loosely coupled and are not dependent on each other. They can use any transport and data format through RESTful API over HTTP is most common. AMQP, JMS or SOAP are all preferred communication channels with JSON and XML quite often as a data format.
Microservices in Action with Talend
With Talend, it is quite easy to build microservices. To learn more about designing microservices with Talend Studio check out our brand new knowledge base article here.