17
How to Create Resilient Microservices With a PostgreSQL Dependency Glen Gomez Zuazo Senior Solutions Architect September 13, 2019

How to Create Resilient Microservices With a PostgreSQL ...€¦ · Monolithic vs. Microservices Multiple Identities Operational Coupling Binary Coupling Synchronous Communication

  • Upload
    others

  • View
    11

  • Download
    0

Embed Size (px)

Citation preview

Page 1: How to Create Resilient Microservices With a PostgreSQL ...€¦ · Monolithic vs. Microservices Multiple Identities Operational Coupling Binary Coupling Synchronous Communication

How to Create Resilient Microservices With a PostgreSQL DependencyGlen Gomez ZuazoSenior Solutions ArchitectSeptember 13, 2019

Page 2: How to Create Resilient Microservices With a PostgreSQL ...€¦ · Monolithic vs. Microservices Multiple Identities Operational Coupling Binary Coupling Synchronous Communication

Confidential 2

User Profile● Senior Solutions Architect● On the Go - Running● LatinX Representative

User Pain Point● Time Allocation● Where is Glen?● Accent :)

Meet Glen

Page 3: How to Create Resilient Microservices With a PostgreSQL ...€¦ · Monolithic vs. Microservices Multiple Identities Operational Coupling Binary Coupling Synchronous Communication

Confidential 3

User Requirements

“I want to return to my community and help encourage STEM learning in early stages (middle and high school)”

“I want to help my teams build well-architected solutions using new and emerging technologies”

“I want a 28-hour day...”

Glen Wants

Page 4: How to Create Resilient Microservices With a PostgreSQL ...€¦ · Monolithic vs. Microservices Multiple Identities Operational Coupling Binary Coupling Synchronous Communication

Confidential 4

Microservices, why should I care?

● Understanding Cost (Operational and Cultural)○ Operational Cost (CI/CD Pipeline, Login, Monitoring, Tracing)○ Cultural Cost (Collaboration, Waterfall Mentality, Coordination, Colocation)

● Capabilities and Bounded Context○ How to identify and why do I need them? Which context I should care? Business or

technology● Understanding the Spectrum of Enterprise Applications

○ Existing Applications■ Web Tomcat■ Fast Monoliths■ Java EE MSA

○ New Applications■ Spring MSA■ Reactive■ Serverless■ Reactive JS

Li & Shi

Connect & Extend

Rip & Re-Write

API or Microservice: What’s the difference?

Page 5: How to Create Resilient Microservices With a PostgreSQL ...€¦ · Monolithic vs. Microservices Multiple Identities Operational Coupling Binary Coupling Synchronous Communication

Confidential 5

Change for Insulation

UI Monolith

Dependent Services

Data Monolith

UI per Subdomain

Independent Services

Data per Service

Monolithic setups slow down delivery and innovation

Page 6: How to Create Resilient Microservices With a PostgreSQL ...€¦ · Monolithic vs. Microservices Multiple Identities Operational Coupling Binary Coupling Synchronous Communication

Confidential 6

Microservices are the key to creating small, independent, and fully functional bits of soware

Monolithic User Interface

Monolithic Backend Processing

Monolithic Database

Product Owner

Product Owner

Product Owner

Monolith API-Enabled

UI

Monolithic Backend Processing

Monolithic Database

Product Owner

Product Owner

Product Owner

UI UI

API API API

Microservices

UI

Product Owner

Product Owner

Product Owner

UI UI

API API API

Backend Backend Backend

Database DatabaseDatabase

Page 7: How to Create Resilient Microservices With a PostgreSQL ...€¦ · Monolithic vs. Microservices Multiple Identities Operational Coupling Binary Coupling Synchronous Communication

Confidential 7

Interconnected services are helping us reduce cross-team dependencies

Monolith API-Enabled Microservices

Page 8: How to Create Resilient Microservices With a PostgreSQL ...€¦ · Monolithic vs. Microservices Multiple Identities Operational Coupling Binary Coupling Synchronous Communication

Confidential 8

Restructuring Delivery Model

User Interface

Model A (Current Implementation)

Core Integration Services

Product Service

Product Service

Product Service

UI Team

Product Teams

Same TechnologyMonolith

User Interface

Model B (Service Model)

L1 Landing Pages

Product Service

Product Service

Product Service

UI Team

Product Teams Integration

ServicesIntegration

ServicesIntegration

Services

Product A L2 Page

Product B L2 Page

Product C L2 Page

Core Integration Services

Micro-Frontends

Full Stack Team A

Back end Services

Integration Services

UI

Feature A

Full Stack Team B

Back end Services

Integration Services

UI

Feature B

Full Stack Team C

Back end Services

Integration Services

UI

Feature C

UI Design Team

Same Technology

Same or Different

Technology

Each micro-frontend can be a different technology

Preferred

Page 9: How to Create Resilient Microservices With a PostgreSQL ...€¦ · Monolithic vs. Microservices Multiple Identities Operational Coupling Binary Coupling Synchronous Communication

Confidential 9

Restructuring Team Ownership

Page 10: How to Create Resilient Microservices With a PostgreSQL ...€¦ · Monolithic vs. Microservices Multiple Identities Operational Coupling Binary Coupling Synchronous Communication

Confidential 10

Monolithic vs. Microservices

Multiple Identities

Operational Coupling

Binary Coupling

Synchronous Communication

Only Java

Weekly Release

Data Monolith

UI Monolith

Singular Identity

Operational Isolation

No Binary Coupling

Asynchronous Communication

Beyond Java (Polyglot Support)

Anytime Release

Explicit Data

Micro Frontend

Fitness Function Guided Evolutionary Architecture

Page 11: How to Create Resilient Microservices With a PostgreSQL ...€¦ · Monolithic vs. Microservices Multiple Identities Operational Coupling Binary Coupling Synchronous Communication

Confidential 11

Fitness FunctionMove to an architecture that supports evolution

Page 12: How to Create Resilient Microservices With a PostgreSQL ...€¦ · Monolithic vs. Microservices Multiple Identities Operational Coupling Binary Coupling Synchronous Communication

Confidential 12

AWS RDS, Aurora, EC2, or Azure PostgreSQL (Citrus)

Considerations● No OS Patch (Server Maintenance)● Optimized Performance 3x● Full DB Admin Control● Hyperscale (Single- & Multi-Nodes)

Page 13: How to Create Resilient Microservices With a PostgreSQL ...€¦ · Monolithic vs. Microservices Multiple Identities Operational Coupling Binary Coupling Synchronous Communication

Confidential 13

Why PostgreSQL

● Open Source● Cloud Provider Agnostic● Scalable and Highly Available● Hybrid (JSONB) - Key/Value

Page 14: How to Create Resilient Microservices With a PostgreSQL ...€¦ · Monolithic vs. Microservices Multiple Identities Operational Coupling Binary Coupling Synchronous Communication

Confidential 14

Synchronous MicroservicesAl

exa

Voic

e Sk

ill

BFF

API

Even

t Log

…Microservice

Slac

k Ch

atbo

tW

eb +

Mob

ile

App

Microservice

BFF

API

Microservice

BFF

API

Microservice

…Microservice

…Microservice

…Microservice

Page 15: How to Create Resilient Microservices With a PostgreSQL ...€¦ · Monolithic vs. Microservices Multiple Identities Operational Coupling Binary Coupling Synchronous Communication

Confidential 15

Asynchronous CQRS & ES Microservices

Orc

hest

rati

on

API

Orc

hest

rati

on

API

Mes

sagi

ng

…Microservice

API

…Microservice

API

…Microservice

API

…Microservice

…AP

I

Orc

hest

rati

on

API

Alex

a Vo

ice

Skill

Slac

k Ch

atbo

tW

eb +

Mob

ile

App

Page 16: How to Create Resilient Microservices With a PostgreSQL ...€¦ · Monolithic vs. Microservices Multiple Identities Operational Coupling Binary Coupling Synchronous Communication

Confidential 16

Q&A

Page 17: How to Create Resilient Microservices With a PostgreSQL ...€¦ · Monolithic vs. Microservices Multiple Identities Operational Coupling Binary Coupling Synchronous Communication

Confidential 17

Thank You