際際滷

際際滷Share a Scribd company logo
Introduction to
Microservices with
NServiceBusEventually
Consistent
Service
Oriented
Message
Based
Highly
Scalable
Fault
Tolerant
WWW.PRINCIPLEDPROGRAMMER.COM
@PRINCIPLEDPROG
Introduction to Microservices with NService Bus
1.
2.
3.
4.
5.
6.
7.
8.
Introduction to Microservices with NService Bus
 A WEB SERVICE OR REST SERVICE
 A CLASS WITH SERVICE IN THE NAME
 JUST FUNCTIONALITY
 E.G., CALCULATION AND VALIDATION
 ONLY HAS DATA
 E.G., CRUD ENTITY
Introduction to Microservices with NService Bus
Introduction to Microservices with NService Bus
Service
Service
Service
Service ServiceService
Service
User Interfaces Middle Tiers Databases
Service
Caches
Service
Business
Capability
Business
Capability
 SYNCHRONOUS
 REQUIRES A RESPONSE
 HTTP REQUEST/RESPONSE
 QUERIES
 ASYNCHRONOUS
 NO RESPONSE REQUIRED
 IDEMPOTENT
 MESSAGE PASSING, EVENTS AND COMMANDS
 NOT ASYNC/AWAIT
PaymentOrder
PaymentG
ateway
UI
var orderId = orderService.PlaceOrder(items);
var paymentId = paymentService.MakePayment(order.id, paymentMethodId, amount);
3
Timeline
Temporal Coupling
Subscriber Publisher
subscribe
publish
publish
I would like to be notified of
certain events and here is
the address of where you
should send those
notifications to.
Payment
Order
Payment
Gateway
UI
3
bus.Send<Placeorder>(order);
Service Bus
Timeline
Dead Letter Queue
Error Queue
Host
Host
Host
External
API
UI
3
NSERVICEBUS
Composite UI
Web APIs / API Gateway
Command
Handlers
Event
Handlers
Sagas
Message Bus
Data
ServerClientUI
MVVM Framework
Client Side Service Bus
Web APIs
Service Bus
Databases
Composite UIs
UI Element Controller Web API
R
UI Element Controller Web API
MessageBus
MessageBus
W
Host
Host
Introduction to Microservices with NService Bus
1. SOURCE CODE - HTTPS://GITHUB.COM/CRMORGAN/NSERVICEBUS-INTRO
2. ADVANCED DISTRIBUTED SYSTEMS DESIGN COURSE - HTTPS://PARTICULAR.NET/ADSD
3. LOOSELY COUPLED ORCHESTRATION WITH MESSAGING -
HTTPS://WWW.YOUTUBE.COM/WATCH?V=FPBKZ24QKZI&F
4. SO YOU THINK YOU KNOW PUB/SUB - HTTPS://WWW.INFOQ.COM/PRESENTATIONS/PUB-SUB-DOMAINS
5. HTTPS://DOCS.PARTICULAR.NET/GET-STARTED/
6. HTTPS://PARTICULAR.NET/VIDEOS
7. HTTPS://MICRO-FRONTENDS.ORG/

More Related Content

Introduction to Microservices with NService Bus

Editor's Notes

  • #5: "Big balls of mud usually happen not because of the technology but because you don't have the discipline on the team to maintain the quality of the design over time. "A broken, dysfunctional organization driven by meeting unhealthy goals and metrics will produce broken, dysfunctional systems." Jimmy Bogard (NDC London Avoiding Microservice Megadisasters) In a distributed monolith, it is hard to make isolated changes in just one part (or service) without requiring changes to several other parts of the system. Therefore deploys are slow and risky and continuous delivery is impractical. This can have profound business implications. Making changes in lots different places is slower, and deploying lots of services at once is risky both of which we want to avoid. - Sam Newman
  • #6: Latency is Zero: Many times slower than in-memory access) OMG slower! In process 5-10 nanoseconds Multiple processes on same box microseconds Local network 100-200 microseconds WAN 50 milliseconds Internet 100s of milliseconds
  • #13: Having an asynchronous business processes and using a queueing based architecture to do it are two different things.