270 likes | 359 Views
.NET Services Framework. Udi Dahan – The Software Simplist .NET Development Expert & SOA Specialist. One way messaging always works. and scales. One-way, Fire & Forget. Server. Client. Boring!. Store and Forward. adds resilience. Server. MSMQ Outgoing Incoming. MSMQ
E N D
.NET Services Framework • Udi Dahan – The Software Simplist • .NET Development Expert & SOA Specialist
Server Client
Store and Forward adds resilience
Server MSMQ OutgoingIncoming MSMQ OutgoingIncoming Client
Full Duplex is more interesting But nothing new
Server MSMQ OutgoingIncoming MSMQ OutgoingIncoming Client
Broadcast & Pub/Sub change things
Subscriber Publisher Subscribe Subscriber Subscriber Subscriber Subscriber
Subscriber Publisher abcdefgh abcdefgh abcdefgh abcdefgh abcdefgh Subscriber Subscriber Subscriber Subscriber
Worker Publisher Subscribe to Order Received Worker Return Address: Distributor Worker Distributor Worker Worker
Worker Publisher Order Received Order Received Worker Worker Distributor Choose available worker Worker Worker
Revenue Revenue Revenue Cost Revenue Cost Revenue Cost Revenue Cost Statefull Business ProcessesWhen things occur matters … Out-of-stock,perpetual Inventory 3 PL Providers In-transit visibility Automatic Receiving Real time inventorylocation and count Invoice reconciliation Better promotionexecution and planning Local Supplier(s) Automated Shippingand Verification In Process Visibility Low asset utilization MajorRetailers Open and Closeloop Asset Tracking Automated Inventory counts Real time alerts Automatic Receiving ASN Regional Warehouse/ Cross-Docking Center InternationalSupplier Counterfeit, Shrinkage Missedshipment ManufacturingPlants National Warehouse SmallerRetailers Missed orincomplete shipments WIP inventory,shipping errors OverseasSupplier(s)
Sagas: State Machine SolutionsDistributing instances of the same state
Create Saga For Message Bus Start Saga Message Saga Dispatch Message Send Saga Messages Saga Persister Save Saga Persist DB
Saga Message Saga Persister Bus Get Saga by Message.SagaId 2.New 3.Fill Dispatch Message Saga 4.Return Saga Complete Saga Complete Delete 1.Get Timeouts are regular messages Can occur on multiple machines concurrently DB
Save State Get State DB Publisher Remind me Reminder Rush Job Job Late Job Job Timeout Manager Step 1 Complete Distributor Worker Client
Supporting different Service-Level Agreements Use different distributor-worker sets per SLA
Worker3 Worker3 Worker1 Worker1 Worker2 Worker2 Grid UI Worker3 Distributor2 Worker1 Worker2 Adjust maximum worker threads per process Worker3 Distributor1 Worker1 Worker2 Worker3 Distributor3 Worker3 Worker1 Worker1 Worker2 Worker2
.NET Services Framework • Thank you • Udi Dahan – The Software Simplist • .NET Development Expert & SOA Specialist • www.nServiceBus.com • www.UdiDahan.com