Author: Panchanan Pradhan

  • What is a Microservice Architecture? Why is it important now?

    What is a Microservice Architecture? Why is it important now?

    We have been building software applications for many years using various tools, technologies, architectural patterns and best practices. It is evident that many software applications become large complex monolith over a period for various reasons. A monolith software application is like a large ball of spaghetti with criss-cross dependencies among its constituent modules. It becomes more complex to develop, deploy and maintain monoliths, constraining the agility and competitive advantages of development teams. Also, let us not undermine the challenge of clearing any sort of technical debt monoliths accumulate, as changing part of monolith code may have cascading impact of destabilizing a working software in production.

    Over the years, architectural patterns such as Service Oriented Architecture (SOA) and Microservices have emerged as alternatives to Monoliths.

    SOA was arguably the first architectural pattern aimed at solving the typical monolith issues by breaking down a large complex software application to sub-systems or “services”. All these services communicate over a common enterprise service bus (ESB). However, these sub-systems or services are actually mid-sized monoliths, as they share the same database. Also, more and more service-aware logic gets added to ESB and it becomes the single point of failure.

    Microservice as an architectural pattern has gathered steam due to large scale adoption by companies like Amazon, Netflix, SoundCloud, Spotify etc. It breaks downs a large software application to a number of loosely coupled microservices. Each microservice is responsible for doing specific discrete tasks, can have its own database and can communicate with other microservices through Application Programming Interfaces (APIs) to solve a large complex business problem. Each microservice can be developed, deployed and maintained independently as long as it operates without breaching a well-defined set of APIs called contract to communicate with other microservices.

    What are the advantages of Microservices architecture?

    1.Development Agility: As large complex software applications are decomposed to a number of small microservices, each microservice can be developed by small “one-pizza” or “two-pizza” teams independently. The teams can plan, build, deploy and maintain their microservices independently as long as the service boundaries are well-defined, and no breach of contract is ensured. The teams become more responsive to changes.

    2.Technology Stack Independence: In a typical monolith, the constituent modules have “compilation or build dependency” and share capabilities as “libraries“. Any changes in one module triggers compilation and/or linking of the whole software application. So, it basically implies and mandates to standardize the technology stack (such as programming language, database etc) to develop a monolith software application.

    In contrast, a microservice can be developed, deployed and maintained as a small independent application without any compilation or build dependency with other microservices. Its dependency with other microservices is handled through well-defined APIs or contract. It means that each microservice can be developed by choosing any technology stack (programming language, database, etc) best suited to realize its functionality instead of being required to take a more standardized, one-size-fits-all approach.

    3.Managing Technical Debt is easier: Let us say we find that one microservice is not vertically scaling in production. We can localize and fix the issue by modifying specific implementation part of that microservice code. Alternatively, we can choose to rewrite the microservice with a different technology stack best suited for meeting the vertical scaling goals. In either approach, as long as the consumer contracts the microservice shares are upheld, the development team is free to change the implementation without impacting the larger system.

    4.Improved Fault Isolation: In case of an error, a whole monolith application can crash and disrupt business as usual (BAU). However, microservices architecture offers improved fault isolation whereby in the case of an error in one service the whole application doesn’t necessarily stop functioning. When the error is fixed, it can be deployed only for the respective service instead of redeploying an entire application.

    For example, in a typical eCommerce application, let us say, the “product review service” is down; as a result, users will not able to read product reviews or write new reviews. But it has not impact on other services such as “product catalog management service”, “order management service” etc; as a result, users can still search, add products to cart and check-out.

    5.Scaling of Hot Services: Once developed, microservices can be deployed independently of each other. It helps in identifying “hot services” and design to scale them independent of the whole application. Similarly, microservices architecture enables auto scaling of different services resulting in optimal usage of precious computing resources. In contrast, a monolith hogs computing resources, as the whole application keeps running even though some modules are dormant.

    What are the limitations of Microservices architecture?

    If not designed carefully, microservices architecture also can become complex. Hence, certain design principles and practices must be considered.

    1.Boundary of Microservices: We need to be careful while defining boundaries of microservices. They should neither become monoliths nor be so small that it results in exchange of large volume of API calls, choking the network and degrading the performance of whole application. Domain driven design helps in defining the boundaries. Also extend Robert Martic C’s “Single Responsibility Principle” which states – “Gather things together that change for the same reason and separate things that change for different reasons”.

    2.Build and Deploy: Once boundaries are defined, a microservice should be built by a single team that can decide the best technology stack to realize its functionality. The dependencies among microservices are defined through well-defined APIs or contract. Ideally, they should run perfectly as long as the contract is upheld. However, the ideal scenarios are far off from ground reality. APIs or contracts evolve continuously in the form of different API versions and it may lead to break down of the application. Hence it is essential to setup CI/CD pipelines with any of the available CI servers (like Jenkins) to run the automated test cases and deploy these services independently to different environments (Integration, QA, Staging, Production, etc)

    3.Monitoring and Logging: Microservices are distributed by nature and monitoring and logging of individual services can be a challenge. It’s difficult to go through and correlate logs of each service instance and figure out individual errors. So, it makes a lot of sense to implement a common “log & statistics aggregation service” to monitor and control all the microservices centrally from a control panel.

    Microservices architecture and Agile software development have a lot in common.

    Just as microservice architecture is frequently defined in contrast to monolithic architecture, the agile software development approach removes the overhead and risk of large-scale software development by using smaller work increments, frequent iterations, and prototyping as a means of collaboration with users.

    Agile software development with continuous delivery, devops culture and microservice architecture are all bound by a common set of goals – to be as responsive as possible to customer needs while maintaining high levels of software quality and system availability; in other words – to be agile.

    Have you built software applications using microservice architecture? Have you decomposed a large monolith to a number of microservices? If so, please share your challenges and best practices in the comments.

    Looking to leverage technology effectively to thrive in the digital era? Our CTO focused set of solutions is what you need.

    Learn more!

  • What are the Evolving Paradigms of Open Source Software in Engineering Services

    What are the Evolving Paradigms of Open Source Software in Engineering Services

    This blog was originally published on LinkedIn by Panchanan Pradhan

    Open source software use in business has come a long way since the first LinuxWorld Conference & Expo was held in San Jose, California, in March 1999. Linux had been around as an operating system since its invention in 1991 by Finnish-American developer Linus Torvalds, but its use in business computing was just beginning to germinate by the early 2000s. Today, open source software powers the Internet, much of the world’s cloud computing infrastructure; and has permeated the engineering services space in unimaginable ways.

    Technical teams are gradually shifting focus towards open source projects to achieve business outcomes with increased efficiency and agility – two critical operational benchmarks in high-growth engineering organizations. Open source is the future of the engineering business – a recent report by Gartner and Forrester indicates that between 80%-90% of software developers use open source components within their core applications. With more organizations leveraging open source as a “foundation or complete solution” in building enterprise grade software applications, this number is only expected to surge in the coming years.

    Benefits of Open Source

    Open source software licensing doesn’t impose any restrictions on copyright and offers several benefits to the global engineering community.

    1. No need to re-invent; simply adapt and integrate: As open source components written by an experienced software engineering community are readily available, there is no need to re-invent the wheel to develop code from scratch; however, it is necessary to adapt and integrate the code to suit application specific use cases. For easier and seamless integration, an integration layer can be created to easily integrate multiple open source components keeping the interfaces separate from the implementations.

    2. Cost-effective solution leading to faster time-to-market: As the code is readily available, there is relatively low investment required as compared to writing code grounds up. This helps in creating an open source based cost-efficient solution leading to faster application deployment and time-to-market.

    3. Assurance of quality, stability, security: The code is developed by an international community of experienced software developers with stringent quality assurance processes in place. As the community becomes more and more vibrant, developers keep adding and improvising functionalities. Developers and users review and fix bugs and security lapses to make the code highly stable, secure, and reliable. After all, how can the bugs hide from millions of eyes!

    4. Better support from the user-developer community: Open source community of developers and users creates a nice ecosystem to give and receive technical support and advice. Knowledge sharing across the community enables users to benefit from the expertise of skilled developers, resulting in a symbiotic relationship among all users of open source software. Also, as more users start using open source components, the roadmap eventually evolves to have newer features and functionalities for the benefit of all users.

    5. Enhanced coding skills and sense of excellence: Open source projects set high standards in coding best practices and provide a platform for engineers to hone their code writing skills. Reviews by the global software community leave room for further improvements, challenging engineers to critically check their own code and write better in future. By writing new capabilities and bug fixes in the code, in-house developers get a sense of excellence when they are presented a chance to rub shoulders with world-class developers and their brilliantly written code snippets. Open source imbibes a sense of giving back to the community when engineers passionately work on code that is used by other users across the globe.

    6. More than just code: When engineers write open source code and contribute to the community, they bond with the community of software developers and forge important global partnerships in the process. These collaborations fuel knowledge sharing and staying abreast with the current technologies and trends across the industry. Apart from continuous innovation, this presents opportunities to engineers to position themselves as thought leaders in this space. Open source collaboration often creates opportunities to share software knowledge at industry conferences, thus upping the motivation quotient for engineers to learn and share. Also, a sense of contributing to the community and helping in creating a better world serves as a big morale boost.

    7. Top talent: The global community of smart engineers is very passionate about open source projects and prefers to be associated with organizations that promote the use of open source software. Open source empowers engineers to innovate and showcase their software development and coding skills in addition to writing just vendor-specific code. Organizations that use open source are more likely to attract top engineering talent who look for challenging and interesting opportunities.

    Future of Open Source

    With open source technology having been around since quite a long time now, a thriving global community has grown around it; so, code is shared among developers and everyone can test, re-build, and learn from one another. As the industry has begun adopting open source technologies in almost all verticals, many new technologies have used open source as their very foundation. The next few years are likely to witness certain key trends in the global open source ecosystem:

    • A Growing Focus on Security, Performance, and Innovation

    Critical open source deployments across enterprises will be governed by comprehensive security protocols given the increase in vulnerabilities and breaches across industries. The future will witness the introduction of automated tools to identify and repair open source security lapses. Also, the community will put in efforts to make the code more performant to cater to different use cases across various industries.

    • Open Source Cloud and Rise of Open FaaS

    Open source cloud computing is increasingly being deployed by enterprises to achieve transformational growth in their digital journey. Public, private, or hybrid cloud models built using open source provide IaaS, SaaS, and PaaS services that operate totally on open source technologies and offer more agility, scalability, and flexibility to engineering organizations looking to drive growth.

    One of the trending open source technologies is serverless computing including Functions-as-a-Service (FaaS). According to Gartner, OpenFaaS – the open source project for this technology – is a revolutionary cloud agnostic ecosystem that helps developers write code based on a specific standard without worrying about the underlying virtual servers or cloud providers. FaaS is evoking heightened industry interest owing to its capability to keep the lock-in potential low and help in leveraging new technologies with minimal risk and low cost.

    • Convergence of Mature, Disruptive Technologies

    The growing thrust on open source has led to the rise of new technologies built on this very foundation, such as Artificial Intelligence (AI), Machine Learning (ML), Blockchain, Big Data Analytics, the Internet of Things (IoT), Virtual Reality (VR) / Augmented Reality (AR), etc.

    Machine Learning engines – both supervised and unsupervised, frameworks, and various tools are available as open source code. ML engines that have been open sourced by various IT giants include Google Cloud Machine Learning Engine, TensorFlow by Google, Amazon’s ML engine for AWS, Unity ML Agents, Apache PredictionIO, Microsoft Distributed Machine Learning Toolkit, etc. As the adoption of ML grows across all verticals and industries, ML technologies innovation based on open source will be on a rapid growth path.

    Blockchain technology is rapidly undergoing intense development as it provides an incorruptible digital ledger of economic transactions that can be programmed to record not just financial transactions but virtually everything of value. There are various Blockchain platforms based on open source such as HyperLedger for cross industry interoperability, Etherium as a centralized platform for running smart contracts, OpenChain for distributed ledger technology, etc.

    Like open source technologies powering the Web, IoT requires the same level of ubiquitous common access in its core functions and to the Web for shared accessibility. With IoT deployments in the near future expected to connect and integrate globally with billions of devices, assets, sensors, and end points, open source IOT platforms such as Kaa IoT, ThingSpeak, DeviceHive, etc. will witness increased adoption.

    Open source software and Big Data go hand in hand these days as today’s applications can handle diverse data in an effective manner, even as it grows exponentially in variety, volume, velocity, and veracity. Various open source based platforms and tools such as Apache Hadoop, Cassandra, KNIME, RapidMiner, AVRO, etc. are widely adopted in the Big Data analytics domain.

    Open source is fast becoming mainstream with organizations leveraging the benefits of increased agility, cost savings, innovation, and engaged talent offered by the system. Open source technologies drive success today and will continue to do so in the future in reshaping the digital transformation and makeover of tech enterprises from “digital immigrants” to “digital natives”, further fueling their business growth and competitive advantage.