Friday, March 11, 2016

Microservices - Myths and Misunderstanding?

Microservices isn’t micro enough !

While the definition of microservices is clear, interpretation of it is very different within development community.
Some questions are,
  1. Is it single entity representation?
  2. Is it single service representation?
  3. Is it a logical functional group?
Let’s take an example of banking application for the sake of this discussion,

  • 3 - Tier architecture solved the problem of tight coupling between technical components allowing them to change independently. Ex: Web changes shouldn’t affect the backend and so on.
  • But the 3 – Tier architecture didn’t take into account of functional or feature based grouping of components.
  • I coined this name “F-Tier” Architecture, to indicate the architecture needs to be compartmentalized by features. This is critical for the success of modern application performance and throughput expectations, I will explain the details further in the article.Image title

  • Microservices is scalable !

    Microservices is a style of architecture which allows you to scale, great how and why? Traditional 3 – tier architecture can also be scaled and proven to be scalable, so what’s so special about microservices?
    Ex: In online travel booking, ratio of shopping to booking request is 100:1.
    • What does this mean; you get 1 booking if you are able to gracefully handle 100 shopping request.
    • Does that ring a bell! Booking would need less resources than shopping, why scale the entire system when the expectation is 100:1 ratio?

    Image titleMicroservices helps maintainability and uptime!

     “Rolling restart”, “Hot Deployment”, “round robin deployment” sounds familiar? Maintenance of applications with very minimal down time is a stated priority in modern applications.

  • Let’s take an example, application changes across all 3 tiers including database.  Any of the above technique is bound to fail if the data semantic is modified (Ex: ORM sees the change and starts complaining on all the nodes).
  • How about microservices; f-tier brings in a new dimension of availability and maintenance. You could have the “A/C Statement” microservices down and doesn’t affect the other banking functionality. You will be happy with 90% of the customer who are not looking for “A/C Statement” functionality.

  • Microservices needs discovery?

    Well anything that auto scale (up and down) needs to be discovered.

  • You have 10 nodes of shopping and 2 nodes of booking microservices.
  • The inflow of traffic is higher due to holiday season on your shopping microservices.
  • What do you expect, manual spin-off of shopping instances?
  • Assuming more instances is spin-off how does the load balancer know about it?

  • Traditional load balancers are great with static environment, worst case adding a node and running a script to include the new instance. If microservices are going to be scaled up and down they needs to discovered, registered and added to the load balanced.
    Well, most of the software problems are solved by introducing a layer of indirection. Each microservice needs to self-register when it’s up or down. Need for a registry keeper, a load balancer that’s sensitive to load. Checkout how, Netflix solved this problem with Eureka on AWS.

    Microservices support polyglot programming?

    Microservices by definition is a contract driven service implementation with HTTP/REST as the back bone (xml/json data transfer). These well-defined boundary between microservices on a lightweight protocol helps to build a diverse team of programmers, the focus is functionality not the choice programming language.

    Microservices and Containers are marriage made in heaven?

    The heaviness of the virtual machine and the nature of modern applications to quickly spin-off and tear-down microservices, makes the containers an ideal match.
    It’s true DevOps, you package not just microservies the container and the execution environment as a whole. Downside, application teams will become the infrastructure team and need to have a good understanding of containerization.

    Microservices adds additional complexity?

  • A Simple pipeline in Jenkins deploying application to 2 Tomcats would bloat into numerous microservices.
  • Deployment time is increased significantly as the number of deployments has increased.
  • Need to have a good container management, deployment and distribution tools and techniques.
  • You will have more log files (per microservices), stitching transaction for debugging can become a nightmare if not for tools like log stash, splunk in place.
  • If had 10 connections per tomcat, you would see 100s of database connections from different microservices. Because you can’t share the database connection (definitely no DB connection microservice J ).

  • Conclusion

    Everything comes with a cost so do microservices, not every application are build same or needs same availability, scalability and maintainability requirements.

    Done - URL 

    Wednesday, January 20, 2016

    Autonomous Car - Close proximity communication protocol for Cars ?

    Driver-less cars are fascinating thing of this century, few companies like mobileeye, google are already pioneering this space. Tesla's autonous parking, lane switching to add to the WoW!!!

    Of all it's interesting how in a 4 way stop the technology just on one car can safely navigate everybody? Isn't there suppose to be a low frequency and range based communication protocol between cars could control the outcome better ?

    Even if one of the car makes the mistake, the other car does the defensive driving. How about for a change :)...

    Think of the possibilities, if you are traveling with your friends and driver-less, you don't have to follow them. The car communicates with the each other and locks the route and you can get to continue with book you are reading or the movie you are watching and you don't have to stop for coffee in 2 different shop. It's a cool travel experience with group tagging along with different cars.

    Thursday, May 28, 2015

    Travel to yellowstone, a unique encounter...

    If you are looking for a technology encounter you should skip this post, If you are interested in travel you still have some hopes :). After few years of talking, reading and watching documentaries on  yellowstone national park it finally happened this long weekend (may 25th).

    Wow ! the experience was mind blowing, No short of expectation.

    Grand Prismatic 

    1. Wild life encounters (Bisons, bears, deers) all around the park
    2. Volcanic craters, vents all over
    3.  Just to push to the edge, interesting facts about the thermopile bacteria.

    Bison Encounter (Yellow stone)

    It didn't stop there, visited monument valley, arches national park and just missed Grand Teton (since the route was blocked from yellow stone, due to some bridge construction as I was told). Literally drove 2000 miles in 5 days, feeling tired by just saying it.

    Monument Valley, UT

    Be prepared to hike to see delicate arches & the landscape arches, both are must see attraction take sufficient water you will be just fine. Btw, don't forget your camera ...

    Delicate Arches (Arches National park)


    Flew from San jose to Salt lake city, short flight saved quite a bit of time and effort to drive locally around. Covered Yellowstone in 2 days, monument valley for a day and approx. 1-2 days in arches. Being said that each of these parks needs a dedicated visit of 2 - 3 days each, these are fascinating park as you drive around the parks you will discover more and more interesting vista points and hike trails. Wish I had more time, sometime you need to be happy with what you got. Yes I got good pictures, check it out - or (Facebook page)

    Thursday, April 30, 2015

    Why startups fail ?

    No Idea is bad, most of the time entrepreneurs gets stuck in an idea validation that defeats the time to market dimension of an idea.

    I have observed, supported & worked with many startups back home. The startup echo system is by design should make most of the entrepreneurs successful. I wish a school for entrepreneurship could teach them very basics that could help them understand startup is not just about idea only.

    It's not the quality of idea that always makes them fail, it's the other aspects of running a business thats least understood,

    1. Bad recruitments
    2. No financial discipline and understanding
    3. Comfort zone (once things get better, slowdown)
    4. Inability to switch gears (Change)
    5. Last and worst, panic attack when situation gets worst

    Sunday, January 25, 2015

    Dancing to your inner tune...

    Leadership is a heavily loaded word, for people who aspire to be one it is a nightmare and near confusion. Frankly, I have been there and aspire to be one myself. Your Boss and your boss's boss will tell you what leadership is, as a matter of fact leadership isn't  a standard recipe on book.

    If you mimic the leadership lessons from people around you, you will die trying to be a great leader. Look back on the good and the bad leaders you have travelled with in your professional journey. They would remind you of one common thing, they are unique in their own ways...

    Stop dancing for someone else tune !

              "Leadership" == "Dancing to your inner tune"...

    You are the only tuner that can pick this channel ("I"), so listen in.

    Listen into the true rhythm and style of doing things, leadership is spontaneity, originality and being yourself no matter what the situation is.

    Good leaders always encourage and let others to listen into their own tune of inner self... 

    Remember, "Without music life is a total mistake"...

    Sunday, January 11, 2015

    Is Time Management a social responsibility ?

    In my experience,
    1. On average 5 -7 min is the wait time in a conference call before all participants joins.
      • Assume 2 such calls ~14 min of your productive hours.
    2. On average 7-10 min is the wait time in a meeting room for all participants to show up.
      • Assume 2 such meetings ~20 min of your productive hours.
    3. How many times people don't accept or decline a meeting request, making you to prepare, show up and cancel for not having the right people in the room ?
    4. If Above all is true possibility, What's the guarantee people come prepared for a meeting ? No wonder why many meeting are non-productive. Sometimes context setting takes the whole meeting by itself.

    It might look like an exaggeration, observe how much time of yours is wasted every day by someone else.

    " If time management is my self discipline, How does someone else get to influence it so much ? "

    People tend to forget the fact your time management and disciple has an impact on your entire team. 

    In few workplaces, these bad practices are accepted as way of life, "it's ok", "it's always like this", "amen"...

    Saturday, November 01, 2014

    Dynamic Service enablement - A Road less traveled...

    API Gateway solutions have solved significant portion of the puzzle for a seamless integration between enterprises, developers & devices. Still enterprises spends huge amount of time and money in developing services that API gateways helps to quickly enable them.
    Some of the question I asked myself and I encourage you to ask yourself ...
    1. Why does building service takes more time ?
    2. Isn't it a subset or a super set of a data model / record set ?

    A Road less traveled...
    1. Dynamically building services in a configuration driven manner.
    2. In an era of schema-less database(few years back people thought it's foolish to even say these words), I am talking about a schema-less service development.
    3. Traditionally reporting tools have done this even with relational constraint of RDBS, why can't this be possible in a schema-less world ?

    My thought process is, a service have only 2 objectives
    1. Read data (from one or more data structure)
    2. Write data (from one or more data structure)

    If above is true, all I am talking about is a cool way to map services to one or more tables(record set) and Vice verse. No rocket science isn't it ?

    Sunday, October 26, 2014

    Pictures from NASA AMES Open house...

    Happen to stumble upon these historic monuments, milestones of technology evolution and a connection to what we are today.

    While they lost their shine, Felt very good to see them for real, "Please do Touch" was the board next to them :),

    IBM Punch Card

    Apple II

    IBM - PC



    And the others...



    Dial Phone

    Tuesday, October 21, 2014

    Internet of Things....

    It's been a while I posted anything, I am kind of following closely on IoT hardware and software platforms for sometime now. This post is a primer to the up coming post...

    For people who are wondering, whats this buzz word is all about ?

    Kevin Ashton coined the term Internet of Things in 1990.

    By definition

    "The Internet of Things (IoT) is the interconnection of uniquely identifiable embedded computing devices within the existing Internet infrastructure." 

    Imagine a world all devices around you can talk to each other, 
    1. A refrigerator ordering to Amazon fresh.
    2. A dresser letting you the type of clothes to wear based on the trend in an industry of work.
    3. A washer order it's supplies automatically when it is over.
    4. Security systems, home automation and so on so forth.
    You may be wondering wasn't this already possible in some ways ?

    Yes, even today it's possible but the M2M (Machine to Machine) integrations isn't standardized and only big players were able to accomplish with lot of R&D efforts. Think of your refrigerator, your dresser, your TV having an IP Address and exposing services ? That would be one hell of a world to be in :) 

    Why Iot after 50+ years of Internet existence ?
    1. IPV4 limitation is over come by IPV6.
    2. Cost of Sensors has gone down significantly.
    3. Cost of Bandwidth has reduced drastically
    4. Cost of processing is also down.
    5. Ability to process Big data set
    6. Usage of smart phones.
    7. Easy Wifi access and affordability

     IoT Hardware Platforms ?

    Some of the IoT Hardware Platforms I am following closely, Arduino for example is an open source hardware and software platform. Raspberry pi pretty cool open source project started as an education kit. I have played around with both the devices & their software, Yet to try the other Hardware platforms...

     IoT Software Platforms/Integrators ?

    Below are some of the software platforms I am following closely. Some of them are pure software platforms, some are cloud API providers for your IoT devices and sensors, Some go all the way deployment, connectivity, data ingestion. storage and Big data analytic.