Getting started with microservices

Microservices are an architectural approach to develop modern software. Each core function, or service, represents a related business context that is independently built and deployed. Microservices provide agility in building and maintaining applications and represent a contrast to the monolithic approach followed in legacy software development. Application modernization today is synonymous with microservices.

In learning more about microservices, you will see the contrast with monolithic architectures, considerations for adopting microservices architecture, communication mechanisms, 12-factor deployment methodology, deployment in Kubernetes, data-persistence, service mesh, and best practices for designing microservices.

Benefits of microservices

  • Simplified deployment

    Accelerate time to market for new features by enabling continuous integration and continuous deployment supporting blue-green deployment models for services.

  • Scale performance on demand

    Scale services containers or data platforms independently per service to meet the demand of that feature.

  • Highly available by design

    Replace or retire independent services without impacting the entire application, individual service failures are gracefully handled by degrading service, rather than crashing the entire application

Learn how to build a microservice on Oracle Cloud Infrastructure(OCI).

Oracle Converged Database advantage

An important aspect for data-driven microservices is the deployment of the data management platform to deploy a variety of data types, support multiple databases in a container, and offer autonomous management capabilities. Oracle Autonomous Database on OCI provides ease of deployment for building intelligent ,data-driven microservices.

Achieve transaction consistency across microservices based applications

Oracle Transaction Manager for Microservices (MicroTx) simplifies application development and operations by enabling distributed transactions to ensure consistency across polyglot microservices deployed in Kubernetes and/or other environments.

Complete and open platform for microservices

For application modernization, multiple technologies need to be integrated to build the right multi-cloud microservices foundation. Oracle LiveLabs give you access to Oracle’s tools and technologies to run a wide variety of labs and workshops. These workshops show how to use open technologies alongside Oracle to build simpler architectures that provide deployment flexibility. Build microservices in Oracle LiveLabs with cloud and hybrid components available in OCI, including Autonomous Database, Helidon, Micronaut, MicroTx, WebLogic Server, Java, Docker, Kubernetes, and Istio Service Mesh. To get you started on your microservices journey, there are multiple labs to help you modernize your monolithic enterprise apps or simplify them if you’ve already started down this path.

Table of open platforms

Data-Driven Microservices with Oracle Converged Database

This Oracle LiveLab builds out a mobile food delivery application called GrabDish to highlight the simplicity of the data architecture, with a modern development stack. It contrasts the complexity of special purpose databases traditionally employed as Lambda and Kappa architectures in the industry, (with separate systems for relational, text, spatial, graph, and messaging systems) with the simplicity of building data-driven microservices with Oracle Converged Database. The lab is geared for developers and architects to design new microservices. It also helps DBAs understand the role of Oracle Database in application modernization projects. Autonomous Database, Kubernetes clusters with docker containers, Oracle Advanced Queuing and Transactional Event Queues, and Helidon are used to show Java, Node.js, and Python microservices working with relational, JSON, spatial, and graph data, with a tracing and monitoring set up with Kiali, Jaeger, Prometheus, and Grafana. Microservices patterns, such as event sourcing, CQRS, and SAGAs, are illustrated.

Data-Driven Microservices with Oracle Converged Database

Transaction consistency across microservices with Oracle Transaction Manager for Microservices

As microservices architecture is gaining popularity, developers often run into problems associated with data consistency as each microservice typically has its own database or other resource. MicroTx provides a transaction coordination microservice to maintain consistency in the state of various databases participating in a transaction. MicroTx supports several distributed transaction protocols, such as XA, long-running actions (LRAs), and try-confirm/cancel (TCC). It supports distributed transactions across polyglot microservices, such as Java, node.js, C/C++, and PL/SQL. In this LiveLab, developers can learn how to achieve data consistency across various microservices used in a sample application.

Transaction consistency across microservices with Oracle Transaction Manager for Microservices

Building blocks

Complete and Open Platform for Microservices

For application modernization, multiple technologies need be integrated to build the right multicloud microservices foundation. Oracle LiveLabs give you access to Oracle’s tools and technologies to run a wide variety of labs and workshops. These workshops show how to use open technologies alongside Oracle to build simpler architectures that provide deployment flexibility. Build Microservices in Oracle LiveLabs with cloud and hybrid components available in OCI, Autonomous Database, Helidon, Micronaut, Weblogic, Java, Docker, Kubernetes, and Istio Service Mesh, in a wholesome Microservices platform stack. There are multiple labs to help you modernize monolith enterprise apps to get you started on your Microservices journey, or simplify it if you’re already down this path.

Microservices terms

Serverless - No persistent state needed in a data store, tasks are executed on the fly—fire and forget style. For example, lambda functions and API gateways.

API driven - Microservices communicate with each other using REST APIs, for example, an API gateway. Each microservice has an API definition.

Async microservices - Loose coupling is achieved with async messaging through queues or streaming software, for example, with Oracle Advanced Queuing or Apache Kafka.

Workflow actions - Business flows (with humans in the loop) also representing long running transactions, for example, with BPMN frameworks, such as Camunda, Zeebe, or temporal.io flow.

Automated workflow - Tasks that run as a simple workflow in an automated manner (with no human in the loop), for example, with Apache Airflow and Argo (CNCF).

Data-driven - Data architecture drives consumption of data in the app for operations and decision-making, usually with a persistent store, for example, Oracle Converged Database or with special purpose databases.

Cloud-native - An application developed entirely for the cloud, for example, with CNCF components and OCI services.

Hybrid cloud microservices - Microservices that work across the customer’s data center (private cloud) and a public cloud, for example, with Kubernetes/service mesh to orchestrate across a private cloud and public cloud (cloud bursting use cases).

Multi cloud microservices - Microservices that work across at least two public clouds and a private cloud, for example, with Kubernetes/service mesh to orchestrate across multiple clouds (to provide risk mitigation and preventing a lock-in to one public cloud).

Microservices challenges

While Microservices are synonymous with application modernization, and it is the way forward for all application development, there are a few considerations that make the journey to microservices architectures more efficient.

  • Choosing the number of independent microservices for an application. A microservices deployment becomes complex when thousands of microservices have to be deployed and are expected to perform in harmony when the context of each service is very tiny. Experience indicates that when 20 to 50 microservices are identified with the right bounded contexts, transitioning to microservices has delivered better on the promised advantages.
  • Implementing transactions across microservices boundaries has been a challenge with the XA transactions (synchronous and performance limiting in some cases). Synchronous SAGAs have shown to be a higher performing and robust, which are further being simplified with support in the converged Oracle Database.
  • The need for loose coupling between microservices poses a challenge with using synchronous REST API services, and messaging/queuing systems make this communication asynchronous and more scalable in deploying applications in a hybrid cloud environment.
  • Tracing and observability is not only important at the application tier or the mid-tier, but also at the data tier, for a holistic end-to-end deployment and support of microservices architectures. Tools and analytics integrations are just beginning to address this important aspect for hybrid deployments.

Microservices customer successes