Microservies. Everybody is talking about microservices. Everybody says they do microservces. The definition of microservice architecture is quite broad and vague: functional decoupling into discrete services, hence the number of approaches, with different flavors and implementations is so great - everybody can do microservices differently.

Fact is, not everything needs to stand as autonomous Java applications communicating over HTTP with JSON as a transport language. Different architectures compromises different elements - which is great and show the true flexibility of the approach. However, regardless of implementation there is a set of practices that should be present in all solutions.

What you will learn

During the workshop we will distill, name a couple of patterns for distributed application. Patterns will be named, discussed, analyzed and applied using most common tools available on the Java platform.

The workshop is a combination of hands-on coding exercises (60% of time) with some theoretical introduction to the microservices as a concept (40% of time)

Microservices Patterns

The intention behind architecture patterns is to describe the structure of a solution to a particular problem. It’s no different among microservices, where a certain set of patterns emerged. During the workshop practical examples and exercises cover (among others) following patterns:

  • API Gateway

  • Circuit breakers

  • Load balancing

  • Service discovery and externalized configuration

  • Service orchestration and choreography

  • Consumer-driven contracts

  • Centralized loggings and monitoring

  • Authorisation and security

Training programme

1. Basics of microservices architecture

  • Different approaches to structuring architecture

  • Monolithic applications vs. microservices

  • Conway’s Law

  • Architecture around business capabilities

  • Decomposing the domain with Domain Driven Design

Tip
Module outcomes

Following problems / questions are covered within this module:

  • why microsevices in general,

  • where microservices are applicable, what problem are they trying to solve,

  • how to decompose problems space (domain) into more discrete elements and mapping them onto individual services.


2. Designing and implementins microservices

  • Smart endpoints and dumb pipes

    • REST services and their representation

    • Designing URLs; rules and patterns

    • Versioning and managing resources

    • Organizing multiple services with HATEOAS

  • Data decentralization

    • Splitting data for different microservices

    • Relational and non-relations data stores

    • Volume, speed and consistency in different database engines (CAP Theorem)

    • Desiging models for reads (CQRS)

  • User interface elements

  • Strategies for refactring monoliths

Tip
Module outcomes

Following problems / questions are covered within the module:

  • how to start with implementing individual services,

  • what frameworks and tools can be helpful (Spring Boot, Spring Cloud, Netflix OSS, Dropwizard, Spark Java etc)

  • how different rules and assumptions of microservices look like from implementation perspective (data decentralization, polyglot programming),

  • how can systems can be split and refactor into smaller pieces.


3. Communication between services

  • Synchronous vs asynchronous communication

    • Introducing "Circuit breaker" pattern

  • Defining and documenting dependencies between services

    • Introducing "API gateway" and "Service discovery" patterns

    • Modeling interactions between services (orchestration and choreography)

  • Backwards compatibility and changes

    • Introducing "Consumer Driven Contracts"

    • End-to_end tests

Tip
Module outcomes

Starting with a set of ready microservices, we observe problems that might arise:

  • how to protect services against unavailability of dependent services,

  • how to hide the inner complexity of the platform from a user,

  • how services should broadcast their health or availability status,

  • how to load balance different services and it that really needed?


4. Production deployment of microservices

  • Continious Integration / Continious Delivery

  • Infrastructure as code

    • Automation of build processes (Jenkins DSL)

    • Automation of infrastructure (Ansible)

  • Visualization and containers

  • Utilizing cloud service (Iaas, PaaS)

  • Managing distributed configuration


Tip
Module outcomes

Following problems / questions are covered within the module:

  • how to manage wide range of infrastructure,

  • how to adjust various requirements (sometimes conflicting) of different services,

  • how to build consistent and repeatable build and deployment process,

  • how to deploy different services.

5. Maintaining and managing services at scale

  • Defining and understanding standard metrics

  • Services monitoring - centralized logging

    • Tracing transactions in distributed systems

    • Business and technical metrics

  • Tracing the communication flow among different services

  • Scaling distributed systems

    • Horizontal (scale-out) and vertical (scale-up) scaling

    • Autoscaling in cloud environments

Tip
Module outcomes

We are trying to understand "What is happening in the distributed system" by understanding the following:

  • how to log and report system information,

  • where to collect logs and what are best ways to do it,

  • how to trace the information flow between services,

  • how to resolve issues and scale application.

Get in touch

I’m happy to talk. I can be reached via twitter, linkedin or traditionally through kuba.marchwicki at gmail.com