AhaApps Blog

Microservices with MuleSoft - Part1

Posted by Rich Bronson

Find me on:

Jun 15, 2016 8:33:25 AM



One of the hottest new trends in software architecture right now is Microservices. Innovative companies such as Netflix, Uber, Ebay, and Amazon have looked to microservices for their software solutions.

While several books could be written about the subject matter I am I will do my best to cover it a high level in 4 blog posts.  Hopefully this will be enough to get you started in being able to understand and implement it.

Today I will talk a little bit about what microservices are and what the advantages are of using them. 


What are Microservices?

Like so many things in IT, if you ask different people about Microservices you will get different answers, but we can describe some common principles, or tenets, of this architectural pattern. Perhaps then we can find a common understanding.

Here are some common principles of Microservices

  •          Modelled around business domain – HR and Sales will have their own set of services.
  •          Each service does one thing and does it well – This does not mean it will have one call per services. It does mean that all services will be in the same domain. So in a car, one services will open and close the door. A different one will open and close the window.
  •          Culture of Automation – With this many services you will want to automate managing them as much as possible.
  •          Hide Implementation Details – Consumers of the service do not care how a service is implemented. It only knows that if it passes parameters it will get results.
  •          Deploy (and scale) Independently – Each service should be completely independent. This includes being to deploy a microservice without deploying the whole system.
  •          Isolate Failure – A failure of a microservice should not bring down the system.


So that’s great but what does It really mean?


This means that Microservices is an Architecture based on many small independent services that perform discreet business logic. So many things that used to be your business objects in your standard n-tier architecture are now your services.


Why is this better than what I do now?

Most applications these days fall in to a category called monolithic. For example, the classic n-tier application pattern tends to be monolithic. This is not necessarily bad, all this means is that you have one app that for the most part deploys and scales together.


While it is certainly possible to create a highly available, highly decoupled monolithic application, and many start out that way, it is pretty easy to fall in to some bad habits. The very nature of microservices make it less likely you will fall into traps like tight coupling and spaghetti code. Also since every service is so small, you each service will only have a few lines of code and should be really easy to maintain, understand or even refactor.


Another advantage is scaling. In the monolithic apps you are scaling it all at once. So if you have one portion of your application that is resource intensive but another that is not, you will still have to scale up everything. In microservices, you scale up each piece as little, or as much, as you need.


A few more advantages of microservices include:

  •          Deploying and scaling services individually.
  •          Each small service can be developed in the language or framework that makes the most sense for that service.
  •          Low impact changes. By testing individual services, we can be sure that individual changes to business logic does not negatively impact other pieces of the system.
  •          Services are independent and can be shared across multiple applications.


What is MuleSoft and how does it help me.

Of course using microservices is not without its problems. The biggest one of course is, how do I keep track of all these services? How does my application know where all these services are? This is where MuleSoft comes in.


At its most basic MuleSoft is an Enterprise Service Bus.  You can read more about it here, but the most important thing to know is that MuleSoft allows us to create APIs that gives us a single point to access our services. It also allows us to compose new APIs that can build upon those APIs for more complex logic.

MuleSoft is an extremely powerful tool and in later articles we will discuss some practical applications.



In this blog post I have described what Microservices Architecture is and what advantages it brings to modern software design. We have also introduced MuleSoft as tool for helping us implement it. In the next post we will talk about some considerations in planning your Microservices Architecture.



A little bit about AhaApps. We are a very different company, our philosophy boils down to these tenets:

· Live and breathe to create “Aha” moments for our clients.

· Get things done right the first time.

· Listen intently and ask the right questions.

· Modernize Information Technology with Integration.


  Contact AhaApps for  Microservices Strategy