#SeizeTheSpace - DeveloperMarch€¦ · EVOLUTIONARY ARCHITECTURE – USING MODERN/NOVEL TECHNOLOGY...

1

Transcript of #SeizeTheSpace - DeveloperMarch€¦ · EVOLUTIONARY ARCHITECTURE – USING MODERN/NOVEL TECHNOLOGY...

Page 1: #SeizeTheSpace - DeveloperMarch€¦ · EVOLUTIONARY ARCHITECTURE – USING MODERN/NOVEL TECHNOLOGY . SCALABLE, RESILIENT, AVAILABLE & HIGH PERFORMANCE AUTOMATED & DEVOPS ENABLED
Page 3: #SeizeTheSpace - DeveloperMarch€¦ · EVOLUTIONARY ARCHITECTURE – USING MODERN/NOVEL TECHNOLOGY . SCALABLE, RESILIENT, AVAILABLE & HIGH PERFORMANCE AUTOMATED & DEVOPS ENABLED

Managing Chaos – 100 Microservices, 1 Product

April 25th 2019

@ishaGoel88 2

Page 4: #SeizeTheSpace - DeveloperMarch€¦ · EVOLUTIONARY ARCHITECTURE – USING MODERN/NOVEL TECHNOLOGY . SCALABLE, RESILIENT, AVAILABLE & HIGH PERFORMANCE AUTOMATED & DEVOPS ENABLED

3

Microservices are like these small islands of functionality that can be deployed independently, and they sit atop an underlying messaging infrastructure.

Page 5: #SeizeTheSpace - DeveloperMarch€¦ · EVOLUTIONARY ARCHITECTURE – USING MODERN/NOVEL TECHNOLOGY . SCALABLE, RESILIENT, AVAILABLE & HIGH PERFORMANCE AUTOMATED & DEVOPS ENABLED

Microservices represents a fundamental shift in how IT approaches software development.

Services are modelled around Business Domain

Reuse - Services can have multiple uses

Autonomous, Cross-functional Teams

Improved Productivity and Speed

Flexibility in Using Technologies and Scalability

Resilience – fault tolerance

4

Page 6: #SeizeTheSpace - DeveloperMarch€¦ · EVOLUTIONARY ARCHITECTURE – USING MODERN/NOVEL TECHNOLOGY . SCALABLE, RESILIENT, AVAILABLE & HIGH PERFORMANCE AUTOMATED & DEVOPS ENABLED

Think of some Challenges – With Microservices

5

More Parts => More Complexity How to partition/ identify Services Inter Services Communication Security Complexity of Debugging Complex Deployments Need for Automation Complex Testing Maintain all Environment’s Sanity in a Reliable State Healthchecks & Monitoring

Page 7: #SeizeTheSpace - DeveloperMarch€¦ · EVOLUTIONARY ARCHITECTURE – USING MODERN/NOVEL TECHNOLOGY . SCALABLE, RESILIENT, AVAILABLE & HIGH PERFORMANCE AUTOMATED & DEVOPS ENABLED

AGENDA 1. A Template Microservices Implementation

2. The Unknown Challenges 3. Q & A

6

Page 8: #SeizeTheSpace - DeveloperMarch€¦ · EVOLUTIONARY ARCHITECTURE – USING MODERN/NOVEL TECHNOLOGY . SCALABLE, RESILIENT, AVAILABLE & HIGH PERFORMANCE AUTOMATED & DEVOPS ENABLED

A Template Microservices Implementation

7

Page 9: #SeizeTheSpace - DeveloperMarch€¦ · EVOLUTIONARY ARCHITECTURE – USING MODERN/NOVEL TECHNOLOGY . SCALABLE, RESILIENT, AVAILABLE & HIGH PERFORMANCE AUTOMATED & DEVOPS ENABLED

Transformation as the Key – To bring together multiple existing Systems

Technology drivers:

8

EVOLUTIONARY ARCHITECTURE – USING MODERN/NOVEL TECHNOLOGY

SCALABLE, RESILIENT, AVAILABLE & HIGH PERFORMANCE

AUTOMATED & DEVOPS ENABLED

SEAMLESS & STANDARDIZED INTEGRATION

FLEXIBLE & RESPONSIVE USER EXPERIENCE

Page 10: #SeizeTheSpace - DeveloperMarch€¦ · EVOLUTIONARY ARCHITECTURE – USING MODERN/NOVEL TECHNOLOGY . SCALABLE, RESILIENT, AVAILABLE & HIGH PERFORMANCE AUTOMATED & DEVOPS ENABLED

GUIDING PRINCIPLES

Architectural options and decisions have to be based on industry best practices and Sapient’s depth of experience, in order to de-risk implementation and establish a simple, strategic, enduring and extensible architectural solution.

9

Page 11: #SeizeTheSpace - DeveloperMarch€¦ · EVOLUTIONARY ARCHITECTURE – USING MODERN/NOVEL TECHNOLOGY . SCALABLE, RESILIENT, AVAILABLE & HIGH PERFORMANCE AUTOMATED & DEVOPS ENABLED

REFERENCE TECHNOLOGY STACK

10

Page 12: #SeizeTheSpace - DeveloperMarch€¦ · EVOLUTIONARY ARCHITECTURE – USING MODERN/NOVEL TECHNOLOGY . SCALABLE, RESILIENT, AVAILABLE & HIGH PERFORMANCE AUTOMATED & DEVOPS ENABLED

REFERENCE LOGICAL ARCHITECTURE

11

Page 13: #SeizeTheSpace - DeveloperMarch€¦ · EVOLUTIONARY ARCHITECTURE – USING MODERN/NOVEL TECHNOLOGY . SCALABLE, RESILIENT, AVAILABLE & HIGH PERFORMANCE AUTOMATED & DEVOPS ENABLED

Challenges with the Architectural decision

12

Page 14: #SeizeTheSpace - DeveloperMarch€¦ · EVOLUTIONARY ARCHITECTURE – USING MODERN/NOVEL TECHNOLOGY . SCALABLE, RESILIENT, AVAILABLE & HIGH PERFORMANCE AUTOMATED & DEVOPS ENABLED

The Unknown Challenges

13

Multiple Parallel Releases Development

Configuration Management

API Orchestration & Logging

Monolithic Database

Deployments

Page 15: #SeizeTheSpace - DeveloperMarch€¦ · EVOLUTIONARY ARCHITECTURE – USING MODERN/NOVEL TECHNOLOGY . SCALABLE, RESILIENT, AVAILABLE & HIGH PERFORMANCE AUTOMATED & DEVOPS ENABLED

The Unknown Challenges

14

Multiple Parallel Releases Development

Configuration Management

API Orchestration & Logging

Monolithic Database

Deployments

Page 16: #SeizeTheSpace - DeveloperMarch€¦ · EVOLUTIONARY ARCHITECTURE – USING MODERN/NOVEL TECHNOLOGY . SCALABLE, RESILIENT, AVAILABLE & HIGH PERFORMANCE AUTOMATED & DEVOPS ENABLED

Multiple Parallel Releases Development

15

Challenges with parallel multi Release development • Merging multiple Release Streams • Days required to stabilize Environments post merge. High Regression • Last minute Rush to Turn off Feature or cherry picking to merge feature from another release

PC: gocd.org

Page 17: #SeizeTheSpace - DeveloperMarch€¦ · EVOLUTIONARY ARCHITECTURE – USING MODERN/NOVEL TECHNOLOGY . SCALABLE, RESILIENT, AVAILABLE & HIGH PERFORMANCE AUTOMATED & DEVOPS ENABLED

16

Feature Toggles – • In a single branch development, particularly when we want to keep integrating frequently, we might find

ourselves not ready to release a certain piece of functionality. Feature flags can come in handy to enable us to keep releasing without making our changes available until complete.

• In Environment specific configuration, we could take advantage of feature flags to toggle the right setup in the right environment.

Page 18: #SeizeTheSpace - DeveloperMarch€¦ · EVOLUTIONARY ARCHITECTURE – USING MODERN/NOVEL TECHNOLOGY . SCALABLE, RESILIENT, AVAILABLE & HIGH PERFORMANCE AUTOMATED & DEVOPS ENABLED

17

Approach • Segregate functions, classes. Apply patterns, for e.g., Strategy. • API Versioning – Create new Endpoints altogether. • Apply If-else conditions based on the feature flag.

Post Release Cleanup • Cleanup would be an important activity after the Main Release. • Its important to tag Code that needs to be cleaned up after the Release. Deprecated Annotation (@Deprecated) or

Javadoc tag needs to be used wherever applicable. • A Custom annotation might come handy to identify the removable code.

Page 19: #SeizeTheSpace - DeveloperMarch€¦ · EVOLUTIONARY ARCHITECTURE – USING MODERN/NOVEL TECHNOLOGY . SCALABLE, RESILIENT, AVAILABLE & HIGH PERFORMANCE AUTOMATED & DEVOPS ENABLED

The Unknown Challenges

18

Multiple Parallel Releases Development

Configuration Management

API Orchestration & Logging

Monolithic Database

Deployments

Page 20: #SeizeTheSpace - DeveloperMarch€¦ · EVOLUTIONARY ARCHITECTURE – USING MODERN/NOVEL TECHNOLOGY . SCALABLE, RESILIENT, AVAILABLE & HIGH PERFORMANCE AUTOMATED & DEVOPS ENABLED

Configuration Management

19

All application properties were maintained in deployment repositories for each environment. • Property change needed deployment of application resulting in downtime • Property misses between environment upgrades • Effort intensive

Page 21: #SeizeTheSpace - DeveloperMarch€¦ · EVOLUTIONARY ARCHITECTURE – USING MODERN/NOVEL TECHNOLOGY . SCALABLE, RESILIENT, AVAILABLE & HIGH PERFORMANCE AUTOMATED & DEVOPS ENABLED

20

Configuration Service –

• All properties to be managed in environment specific branch • One property file specific to each Service and common properties across services to be kept in

application.properties file • Configuration Service to expose endpoint to poll the Git repositories for property changes and publish to all

the Services via MQ.

Page 22: #SeizeTheSpace - DeveloperMarch€¦ · EVOLUTIONARY ARCHITECTURE – USING MODERN/NOVEL TECHNOLOGY . SCALABLE, RESILIENT, AVAILABLE & HIGH PERFORMANCE AUTOMATED & DEVOPS ENABLED

The Unknown Challenges

21

Multiple Parallel Releases Development

Configuration Management

API Orchestration & Logging

Monolithic Database

Deployments

Page 23: #SeizeTheSpace - DeveloperMarch€¦ · EVOLUTIONARY ARCHITECTURE – USING MODERN/NOVEL TECHNOLOGY . SCALABLE, RESILIENT, AVAILABLE & HIGH PERFORMANCE AUTOMATED & DEVOPS ENABLED

API Orchestration & Logging

22

API orchestration provides • An approach to integration that decouples APIs from each other • Capabilities for message routing, security, transformation and reliability • A way to manage and monitor your integrations centrally • Mediation, to provide multiple channels/interfaces for the same underlying implementation

Page 24: #SeizeTheSpace - DeveloperMarch€¦ · EVOLUTIONARY ARCHITECTURE – USING MODERN/NOVEL TECHNOLOGY . SCALABLE, RESILIENT, AVAILABLE & HIGH PERFORMANCE AUTOMATED & DEVOPS ENABLED

23

• Centralized and Externalized Log Storage

• Log Structured Data • Searchable Logs

• Generate Correlation Id on the 1st Microservice call and pass the same to all the downstream Services.

• We used UserId to work as the Correlation Id.

Page 25: #SeizeTheSpace - DeveloperMarch€¦ · EVOLUTIONARY ARCHITECTURE – USING MODERN/NOVEL TECHNOLOGY . SCALABLE, RESILIENT, AVAILABLE & HIGH PERFORMANCE AUTOMATED & DEVOPS ENABLED

The Unknown Challenges

24

Multiple Parallel Releases Development

Configuration Management

API Orchestration & Logging

Monolithic Database

Deployments

Page 26: #SeizeTheSpace - DeveloperMarch€¦ · EVOLUTIONARY ARCHITECTURE – USING MODERN/NOVEL TECHNOLOGY . SCALABLE, RESILIENT, AVAILABLE & HIGH PERFORMANCE AUTOMATED & DEVOPS ENABLED

25

Monolothic Database

Ideally, Microservices should follow: - Distributed Data Management - Domain Driven Design - Event driven architecture, no distributed transactions

Limitation for not going with Distributed Databases.

Page 27: #SeizeTheSpace - DeveloperMarch€¦ · EVOLUTIONARY ARCHITECTURE – USING MODERN/NOVEL TECHNOLOGY . SCALABLE, RESILIENT, AVAILABLE & HIGH PERFORMANCE AUTOMATED & DEVOPS ENABLED

The Unknown Challenges

26

Multiple Parallel Releases Development

Configuration Management

API Orchestration & Logging

Monolithic Database

Deployments

Page 28: #SeizeTheSpace - DeveloperMarch€¦ · EVOLUTIONARY ARCHITECTURE – USING MODERN/NOVEL TECHNOLOGY . SCALABLE, RESILIENT, AVAILABLE & HIGH PERFORMANCE AUTOMATED & DEVOPS ENABLED

Challenges with Deployments – • Time consuming deployments • Zero-downtime deployment

Deployments

27

Content & Service

System, Domain, UI Services

Database Scripts

Deployable Artefacts

Page 29: #SeizeTheSpace - DeveloperMarch€¦ · EVOLUTIONARY ARCHITECTURE – USING MODERN/NOVEL TECHNOLOGY . SCALABLE, RESILIENT, AVAILABLE & HIGH PERFORMANCE AUTOMATED & DEVOPS ENABLED

References:

1.https://paulhammant.com/2013/04/05/what-is-trunk-based-development/

2.https://spring.io/guides/gs/centralized-configuration/

3.https://dzone.com/articles/correlation-id-for-logging-in-microservices

4.https://dzone.com/articles/zero-downtime-deployments-with-containers

5.https://dzone.com/articles/blue-green-deployments-ab-testing-and-canary-relea-2

28

Page 30: #SeizeTheSpace - DeveloperMarch€¦ · EVOLUTIONARY ARCHITECTURE – USING MODERN/NOVEL TECHNOLOGY . SCALABLE, RESILIENT, AVAILABLE & HIGH PERFORMANCE AUTOMATED & DEVOPS ENABLED

thank you

copyright publicis sapient | confidential 29

Page 31: #SeizeTheSpace - DeveloperMarch€¦ · EVOLUTIONARY ARCHITECTURE – USING MODERN/NOVEL TECHNOLOGY . SCALABLE, RESILIENT, AVAILABLE & HIGH PERFORMANCE AUTOMATED & DEVOPS ENABLED

30

Page 32: #SeizeTheSpace - DeveloperMarch€¦ · EVOLUTIONARY ARCHITECTURE – USING MODERN/NOVEL TECHNOLOGY . SCALABLE, RESILIENT, AVAILABLE & HIGH PERFORMANCE AUTOMATED & DEVOPS ENABLED