A High Level Overview of Concepts in Microservice Style Architecture

Destan Sarpkaya, April 2019
selam@kodgemisi.com

Introduction to Microservices

  • Yeditepe University, 2011
  • Consultant at Kod Gemisi
  • Java, Spring Framework

About Me

Destan Sarpkaya

  • Graduate?
  • Career plans?
  • Microservices?
  • Java?

About You

Definitions & Concepts

Microservice vs Monolith

Loosely coupled service oriented architecture with bounded contexts

 Adrian Cockcroft

An approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API.

Martin Fowler

 Microservices ...

How Small Should a Microservice Be?

Single Responsibility Principle

Gather together those things that change for the same reason, and separate those things that change for different reasons.

Robert C. Martin

Line of Codes?

something that could be rewritten in two weeks?

The smaller the service, the more you maximize the benefits and downsides of microservice architecture.

Sam Newman

How Small Should a Microservice Be?

Unix philosophy

Do one thing and do it well.

Bounded Context

Conway's Law

Any organization that designs a system (defined broadly) will produce a design whose structure is a copy of the organization's communication structure.

Melvyn Conway, 1967

Conway's Law

Conway's Law

Principles of Microservices

intentionally lacking some in this presentation...

Teams own the product

  • Products, not projects
  • You built it you run it!
  • Assist its users to enhance the business capability
  • Personal relationships between developers and users

Hide Implementation Details

Service A

Service B

Hide Database Access!

Smart Endpoints and Dumb Pipes

Avoid Enterprise Service Bus (ESB)

which includes sophisticated facilities for: 

  • message routing
  • choreography
  • transformation
  • applying business rules

Microservices:

  • aim to be as decoupled and as cohesive as possible
  • own their own domain logic

Autonomy

  • Decentralize all the things
  • Teams own the product. Remember?
  • Give teams freedom to choose

Polyglot Services

Sales

<<Java>>

Web

<<Node.js>>

Support

<<.NET>>

Application

Polyglot Persistence

Culture of Automation

  • Continuous Integration
  • Continuous Delivery
  • Infrastructure Automation

Observability

Log Aggregation 

Elastic Stack (ELK): Elasticsearch, Logstash, and Kibana

Prerequisites

  • Rapid provisioning
  • Basic Monitoring
  • Rapid application deployment

Prerequisites

Benefits

Scalability

Quick Response

  • Easy to change
  • Easy to fix
  • Easy to re-write
  • Easy to dispose!

New developers won't be afraid

Caveats

Microservice architecture is just

distributed computing

More Complex Cross-Cutting Concerns

Logging, monitoring and security are just got more complex!

Operational Complexity

  • Automatic provisioning
  • Continuous delivery
  • Load balancing
  • Monitoring
  • ...

they are not free

Human Factor

  • Requires cultural change
  • Requires new skill set
  • Communication overhead

We trade off operational complexity for development simplicity

Microservices approach just moves complexity from one point to another

The most important benefit is agility

  • Decreased inertia
  • Increased responsiveness

What are Microservices? (light edition)

By KodGemisi

What are Microservices? (light edition)

A high level introduction and overview of microservice architecture and related concepts

  • 360