SlideShare a Scribd company logo
1 of 41
Enterprise Developers Guild
9/26/2017
Microservices
Primer for
Monolithic Devs
1
2
3
4
5
Agenda
Microservices Overview
Service and API Boundaries
Designing for Distributed Data
Managing Microservices
Demo with Azure Service Fabric
GOAL: Understand what to expect on Microservices projects
Impact of Modern Apps
 Users expect more features without downtime
 Developers have to figure out a solution
Monolith vs. Microservices
Monolithic SOA Microservices
Evolution of Architectures
GoF Patterns, SOLID, Hexagonal, Testable
Use Cases – App Features
 SaaS product
 Availability critical
 Variable I/O & Scale
 Variant feature changes
Use Cases – Business Features
 Remain competitive – QTM
 Evolving business model
 Acquisition-based model
When to start with monoliths
(Realistically – Most of the time)
 Unknown growth/adoption
 Boundaries not well-defined
 No DevOps culture
MSDN
Determining
Service
Boundaries
DDD: Bounded Context
“Bounding contexts gives team
members a clear and shared
understanding of what has to
be consistent and what can
develop independently.”
- Eric Evans, Domain-Driven Design, 2003
Bounded Context Example
Course
Subject
Student
Class Schedule
Faculty
Advisor
Bounded Context Example
Course
Subject
Student
Class ScheduleCourse ID Faculty
Member
Advisor ID
(Faculty Member)
Add/Edit courses
Add/Edit students,
Set semester class schedule
Add/Edit
faculty members
The Microservices Version
Entities & Processes
Services boundaries tend to be separated by nouns & verbs
Student
Service
Course
Service
NOUNS (Entity CRUD)
Batch
Enrollment
Search
Prospects
VERBS (Business Process)
Optional Monolithic Start
 Bounded Contexts
 Variable Scaling
 Change Frequency
 Business Process
Start large and break down based on:
EXAMPLE: EF Bounded Context
// Typical EF setup with all data models in single DB context
public class SchoolDbContext : DbContext, ISchoolDbContext
{
public DbSet<Student> Students { get; set; }
public DbSet<Course> Courses { get; set; }
public DbSet<Subject> Subjects { get; set; }
public DbSet<Faculty> Faculty { get; set; }
public DbSet<FacultyMember> FacultyMembers { get; set; }
}
EXAMPLE: EF Bounded Context
// Contexts grouped by entities w/ related, specific operations
public class StudentDbContext : DbContext
{
public DbSet<Student> Students { get; set; }
public DbSet<ClassSchedule> ClassSchedules { get; set; }
}
public class CourseDbContext : DbContext { }
public class FacultyDbContext : DbContext { }
MSDN
Managing
APIs
API Death Stars
API Gateway
Follow good REST principles
 Resource hierarchies
 HTTP methods & status codes
GET /students/123/schedule/2017 | 200
POST /students/123/schedule | 201
PUT ...
PATCH ...
DELETE ...
Versioning
URI
/v1/students/123
Query String
/students/123?v=1.0
Accept Header
/students/123
Accept: x.student-api.v1+json
MSDN
Managing
Distributed
Data
Monolith Queries
SELECT -- Syllabus and advisor info
FROM StudentSyllabus ss
INNER JOIN Syllabus s ON ss.SyllabusId = s.Id
INNER JOIN Course c ON s.CourseId = c.Id
INNER JOIN Advisor a ON ss.AdvisorId = a.Id
INNER JOIN [User] u ON a.UserId = u.Id
WHERE ss.[Year] = @currentYear
AND ss.StudentId = @studentId
AND ss.IsActive = 1
Querying Distributed Databases
Cross-Service Queries
Cross-Service Queries
fetch('/api/v1/students/12345/schedule/2017')
.then((response) => response.json())
.then(function(student) {
// Call the other services to get “join” data
var advisorApi = '/api/v1/faculty/members/' + student.advisorId;
var courseApis = [];
student.courses.forEach(function(course) {
courseApis.push('/api/v1/courses/' + course.id);
}, this);
// Create promises, merge results, data binding, etc.
});
Materialized Views
Materialized Views
fetch('/api/v1/students/12345/syllabus/2017')
.then((response) => response.json())
.then(function(student) {
// Call the other services to get “join” data
var advisorApi = '/api/v1/faculty/members/' + student.advisorId;
var courseApis = [];
student.courses.forEach(function(course) {
courseApis.push('/api/v1/courses/' + course.id);
}, this);
// Create promises, merge results, data binding, etc.
});
// Trade-off is more backend code for event publishing
fetch('/api/v1/students/12345/schedule/2017’).then(...)
Monolith Commands
using (IDbContext db = _dbFactory.GetContext())
{
Syllabus syllabusDataModel = db.Syllabus.Single(s =>
s.Id == syllabusDomainModel.Id);
Mapper.MapChanges(
syllabusDataModel, syllabusDomainModel);
// Built-in transactions for related tables
db.SaveChanges();
}
Eventually Consistent Services
Event Sourcing
Managing
Microservices
Team DevOps
Repos Builds Releases
Unit Testing
Internal Logic
• In-memory only
• Mock/fake dependencies
Unit Testing
Owned Dependencies
• Provisioning/Teardown
• Longer duration
Unit Testing
Non-Owned Dependencies
• Contracts
• Consumer vs. Provider
Platform Checklist
 Frameworks
 Logging
 Monitoring
 Auto Scaling
 Service Discovery
 Instant Rollback
 Auto Versioning
 Failure Resistance
 Self-Service Provisioning
 Rapid Deployment
To run microservices, you need:
Platforms
PaaS CaaS IaaS
 Azure Service Fabric
 Pivotal Cloud Foundry
 Cloud w/ Frameworks:
 Netflix OSS
 Mantl
 Amazon ECS
 Azure Container
Services
 Google Container
Engine
 VMs
Tools/Frameworks/Libraries
Event Stores
 Eventuate
 Cosmos DB Change Feed
 eventstore.org
Service Discovery
 Service Fabric Naming Service
 Consul
 Netflix Eureka
API Gateway
 Azure/AWS API Management
 Mulesoft
 Google Apigee
Event Messaging
 Azure/AWS queue services
 Apache Kafka
 RabbitMQ
More Info
Questions? lfaulkner@cardinalsolutions.com
Design patterns and technical approaches:
http://microservices.io/
https://docs.microsoft.com/en-us/azure/architecture/ (Cloud Patterns PDF)
https://martinfowler.com/articles/microservices.html
How they did it:
http://searchmicroservices.techtarget.com/ (RSS)
https://medium.com/netflix-techblog
https://blogs.msdn.microsoft.com/bharry/ (How the VSTS team does it)

More Related Content

Similar to Microservices Primer for Monolithic Devs

Designing Java EE Applications in the Age of CDI
Designing Java EE Applications in the Age of CDIDesigning Java EE Applications in the Age of CDI
Designing Java EE Applications in the Age of CDIMichel Graciano
 
Lessons learned teaching a groovy grails course
Lessons learned teaching a groovy grails courseLessons learned teaching a groovy grails course
Lessons learned teaching a groovy grails courseJacobAae
 
JavaScript and jQuery for SharePoint Developers
JavaScript and jQuery for SharePoint DevelopersJavaScript and jQuery for SharePoint Developers
JavaScript and jQuery for SharePoint DevelopersRob Windsor
 
Scalable java script applications
Scalable java script applicationsScalable java script applications
Scalable java script applicationsGood Robot
 
ZZ BC#7.5 asp.net mvc practice and guideline refresh!
ZZ BC#7.5 asp.net mvc practice  and guideline refresh! ZZ BC#7.5 asp.net mvc practice  and guideline refresh!
ZZ BC#7.5 asp.net mvc practice and guideline refresh! Chalermpon Areepong
 
1. Mini seminar intro
1. Mini seminar intro1. Mini seminar intro
1. Mini seminar introLeonid Maslov
 
jquery summit presentation for large scale javascript applications
jquery summit  presentation for large scale javascript applicationsjquery summit  presentation for large scale javascript applications
jquery summit presentation for large scale javascript applicationsDivyanshGupta922023
 
Java Technology
Java TechnologyJava Technology
Java Technologyifnu bima
 
Building a scalable web application by combining modern front-end stuff and A...
Building a scalable web application by combining modern front-end stuff and A...Building a scalable web application by combining modern front-end stuff and A...
Building a scalable web application by combining modern front-end stuff and A...Chris Klug
 
Getting Started with Spring Framework
Getting Started with Spring FrameworkGetting Started with Spring Framework
Getting Started with Spring FrameworkEdureka!
 
Principles of MVC for Rails Developers
Principles of MVC for Rails DevelopersPrinciples of MVC for Rails Developers
Principles of MVC for Rails DevelopersEdureka!
 
A Groovy Way to Interface With Cascade Server
A Groovy Way to Interface With Cascade ServerA Groovy Way to Interface With Cascade Server
A Groovy Way to Interface With Cascade Serverhannonhill
 
Introduction to design_patterns
Introduction to design_patternsIntroduction to design_patterns
Introduction to design_patternsamitarcade
 
CORE JAVA & ADVANCE JAVA
CORE JAVA & ADVANCE JAVACORE JAVA & ADVANCE JAVA
CORE JAVA & ADVANCE JAVABALUJAINSTITUTE
 
Sakai and IMS LIS Integration
Sakai and IMS LIS IntegrationSakai and IMS LIS Integration
Sakai and IMS LIS IntegrationCris Holdorph
 
3.java database connectivity
3.java database connectivity3.java database connectivity
3.java database connectivityweb360
 

Similar to Microservices Primer for Monolithic Devs (20)

Cursos sql server .net visual basic octubre 2010
Cursos sql server .net visual basic octubre 2010 Cursos sql server .net visual basic octubre 2010
Cursos sql server .net visual basic octubre 2010
 
Designing Java EE Applications in the Age of CDI
Designing Java EE Applications in the Age of CDIDesigning Java EE Applications in the Age of CDI
Designing Java EE Applications in the Age of CDI
 
Lessons learned teaching a groovy grails course
Lessons learned teaching a groovy grails courseLessons learned teaching a groovy grails course
Lessons learned teaching a groovy grails course
 
JavaScript and jQuery for SharePoint Developers
JavaScript and jQuery for SharePoint DevelopersJavaScript and jQuery for SharePoint Developers
JavaScript and jQuery for SharePoint Developers
 
MVC & backbone.js
MVC & backbone.jsMVC & backbone.js
MVC & backbone.js
 
GraphQL 101
GraphQL 101GraphQL 101
GraphQL 101
 
Scalable java script applications
Scalable java script applicationsScalable java script applications
Scalable java script applications
 
ZZ BC#7.5 asp.net mvc practice and guideline refresh!
ZZ BC#7.5 asp.net mvc practice  and guideline refresh! ZZ BC#7.5 asp.net mvc practice  and guideline refresh!
ZZ BC#7.5 asp.net mvc practice and guideline refresh!
 
1. Mini seminar intro
1. Mini seminar intro1. Mini seminar intro
1. Mini seminar intro
 
jquery summit presentation for large scale javascript applications
jquery summit  presentation for large scale javascript applicationsjquery summit  presentation for large scale javascript applications
jquery summit presentation for large scale javascript applications
 
Java Technology
Java TechnologyJava Technology
Java Technology
 
Building a scalable web application by combining modern front-end stuff and A...
Building a scalable web application by combining modern front-end stuff and A...Building a scalable web application by combining modern front-end stuff and A...
Building a scalable web application by combining modern front-end stuff and A...
 
Data access
Data accessData access
Data access
 
Getting Started with Spring Framework
Getting Started with Spring FrameworkGetting Started with Spring Framework
Getting Started with Spring Framework
 
Principles of MVC for Rails Developers
Principles of MVC for Rails DevelopersPrinciples of MVC for Rails Developers
Principles of MVC for Rails Developers
 
A Groovy Way to Interface With Cascade Server
A Groovy Way to Interface With Cascade ServerA Groovy Way to Interface With Cascade Server
A Groovy Way to Interface With Cascade Server
 
Introduction to design_patterns
Introduction to design_patternsIntroduction to design_patterns
Introduction to design_patterns
 
CORE JAVA & ADVANCE JAVA
CORE JAVA & ADVANCE JAVACORE JAVA & ADVANCE JAVA
CORE JAVA & ADVANCE JAVA
 
Sakai and IMS LIS Integration
Sakai and IMS LIS IntegrationSakai and IMS LIS Integration
Sakai and IMS LIS Integration
 
3.java database connectivity
3.java database connectivity3.java database connectivity
3.java database connectivity
 

Recently uploaded

The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...ranjana rawat
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...Call girls in Ahmedabad High profile
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 

Recently uploaded (20)

The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
High Profile Call Girls Dahisar Arpita 9907093804 Independent Escort Service ...
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 

Microservices Primer for Monolithic Devs

Editor's Notes

  1. Poll audience – have used microservices; have not but experienced with monoliths; have just heard the buzzwords Walk away with enough info to research on your own, so will table deep dive questions.
  2. Users want more features, no downtime, and have other options Microservices provides agility and flexibility to application design
  3. Independent services, own data storage, deployed independently
  4. This graphic really clarified microservices for me Monoliths – Tightly integrated, changes have ripple effects to rest of app SOA – Looser coupling, but had to be orchestrated to fit together Microservices – Independently developed and deployed Earlier – Mainframes New – Serverless
  5. Does this apply to you? Technical approaches we’re about to discuss have complexity trade-offs. Like with any architecture, make sure to use right tool for the job
  6. Going straight to microservices is a risk. A lot more technical complexity
  7. What are the boundaries
  8. DDD provides a holistic view of software design. Bounded context is one of its patterns. Small models that support specific operations Quote gets to the heart of what microservices “Delimited applicability”
  9. Group into sets that represent related, specific operations. How micro is micro? Add, Edit as separate services would be a nanoservice. Group by related but specific operations
  10. Independent services, own data storage, deployed independently
  11. As mentioned in earlier slide, if bounded contexts are unknown or you’re not sure ROI there for the technical complexity trade-off, option to start as a monolith and break it down.
  12. Illustrate breaking down monoliths with EF contexts.
  13. Contexts grouped by specific operations/transactions.
  14. As microservices grow, becomes difficult for web and mobile developers to understand how to use them.
  15. Consolidate/orchestrate calls, provide single API call for consumers Good REST design (DX, Developer Experience. API UX for web/mobile developers) API gateway Versioning
  16. Isolated databases Calling other services Duplicated data is ok Event-driven architecture CQRS
  17. Direct DB access creates a tight coupling that loses the benefit of microservices
  18. Have to call out to other services to get “join” data Still gain scale advantages of other endpoints Plus, the other services might be doing their own gets. Slippery slope
  19. Call each service and aggregate the results Also can push aggregation to server, e.g., API Gateway, or inter-service calls
  20. Note the use of messaging, not a tightly coupled replication feature Also an example of CQRS Trade off is more code for pub/sub, but less code on query
  21. Replace the logic that aggregates results to directly calling the materialized view That’s queries, now let’s look at commands (saves)
  22. Switch from SQL to ORM to more easily illustrate transactions Same deal, don’t create tight coupling by saving directly to other service db’s
  23. 2pc not an option (not all db types support it) Event-driven, eventually consistent approach Pros: Consistency across services Cons: More complex, event publishing must be reliable
  24. Use an event store Add only, so faster and no local transaction needed Replay events for current state Services still subscribe Most event stores have snapshots for performance - Eventuate, Cosmos DB change feed Others – transaction log tailing/mining (Linkedin w/ Oracle, AWS)
  25. (depends on your IT setup)  Teams own repos, builds, releases
  26. Demo if time