Building Scalable and Robust Solutions with Service Bus in Cloud and Server

1,322 views
1,199 views

Published on

More info on http://www.techdays.be

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,322
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
23
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Building Scalable and Robust Solutions with Service Bus in Cloud and Server

  1. 1. Building Scalable and RobustSolutions with Service Bus in Cloudand ServerClemens Vasters (@clemensv)Principal Technical Lead / ArchitectWindows Azure Application Platform Team – Service Bus
  2. 2. Appliances Phones & Tablets PC SaaS Cloud app  Queues Topics Relays Notifications Team SharePointLOB Apps Event Aggregator site ....
  3. 3. *cloud-only for now **cloud-only for the forseeable future
  4. 4. • Building cloud services• Enable Hybrid configurations• Connected client scenarios
  5. 5. XBox Leaderboard Game Stats Devices DevicesXBox Gateway Role Service Bus Queues Halo Backend Role Xbox LiveXBox 1. Game scores fan-in to Queues 2. Sessions used to correlate games 3. Scheduled messages to track completionXBox 4. Halo backend produces finalized stats
  6. 6. Retail Services ISVPOSPOS Retail Web Services Service Bus Queues IT AdminPOS Service Bus Topics Marketing Sales data fan-in to Queues Messages processed and appropriate messages sent Topics used to support Publish-Subscribe for messagesPOS Real-time monitoring as well as decoupled inventory updates
  7. 7. Enterprise Services ISV Service Bus Relay ISV Suite Policy Updates Remote Management Enterprise Private Cloud Central RepositoryISV Private Cloud • ISV Suite offers a turn-key solution for security & management of BYOD • Deployed on enterprise networks behind firewalls/NATs • Uses Service Bus Relay to push policy updates/templates and perform remote management of the Suite
  8. 8. CRM Online CRM Online ServiceWindows 8 1. Devices Authenticate with CRM 2. Registration sent to Notification Hub 3. Message initiated by CRM Online Service 4. Customized Notifications to all devices Service Bus Notification HubWin Phone 8 WNS Filter w/ Tags Broadcast Scale Templates iOS APNS
  9. 9. Apps.NET WCF Service Model C/C++ Java/JMS (incl Embedded) Node.j Any Python PHP NetMessagingBinding Apache Qpid s HTTP client client Apache JMS AMQP client client Proton-C 1.0 .NET Service Bus Messaging APISB Messaging Protocol AMQP 1.0 HTTP(S) (net.tcp, proprietary) Service Bus
  10. 10. © JPMorgan Chase & Co.
  11. 11. Sender Replay BufferIdempotence Barrier Receiver
  12. 12. Service Bus Message Sys Properties Key Value Key Value Key Value Custom Properties Key Value Key Value Key Value Key Value Body Body (Bag of Bytes)
  13. 13. Broker Receive and DeleteBroker 1. Peek/Lock 2. Delete/Unlock
  14. 14. Service Bus 1.0 for WindowsServer
  15. 15. Why & WhatOn-Premises pub-sub •Enterprise applications developed and deployed on-premise.Develop& Deploy •Scale ; HA ; Manageability ; Rich messaging feature setDevelop On-premise •High fidelity develop, test, debug experience Develop Deploy •DevBox deployment (HW&SF pre-reqs) ; Tools (VS); debug mode ; symmetryFlexible Deployment •Driven by enterprise desire for deployment choice (or perception Deploy Deploy thereof) •Full symmetry ; Ease of migrationTiered Deployment •Maintain control of mission critical data / systems Data App •Unable/unwilling to migrate legacy systems •Gradual migration to cloud •Message Federation ; Store-and-Forward
  16. 16. • Clustered deployment Node• Identical nodes SB Gateway SB Messaging Backend Message• Stateless gateways Store Node SB Messaging Message SB Gateway Backend Store• Backend Node Message Store SB Messaging SB Gateway Backend Message• Databases Store Gateway DB
  17. 17. Windows Server 2008 R2 SP1Windows Server 2012SQL Server 2008 R2 SP1 SQLServer 2012Web PI-based
  18. 18. HardwareMeasured performance for flow rates 20,000 messages/s 14,200 messages/s 26 messages/sAlways able to get more by using faster machines.
  19. 19. Messaging Patterns
  20. 20. Queue
  21. 21. Queue
  22. 22. Queue
  23. 23. SubTopic Sub Sub
  24. 24. Broker Message Properties Reply Queue Broker Broker Message Send Queue Properties Body
  25. 25. Broker Message Properties Reply Queue Broker Message Properties Broker Send Queue BodyBroker Message Reply Queue Properties
  26. 26. var sender = QueueClient.CreateFromConnectionString(cs, "test");sender.Send(new BrokeredMessage { Label = "Hello" });// Send a message with system and application properties setvar bm = new BrokeredMessage();bm.Label = "PurchaseOrder123";bm.TimeToLive = new TimeSpan(0, 5, 0);bm.Properties["PurchaseOrderID"] = 1234;sender.Send(bm);
  27. 27. var receiver1 = QueueClient.CreateFromConnectionString(cs, "test",ReceiveMode.ReceiveAndDelete);var msg1 = receiver1.Receive();var receiver2 = QueueClient.CreateFromConnectionString(cs, "test",ReceiveMode.PeekLock);var msg2 = receiver2.Receive();try{ // Process msg2 msg2.Complete();}catch{ msg2.Abandon(); throw;}
  28. 28. <predicate ::= { NOT <predicate> } | <predicate> AND <predicate> | <predicate> OR <predicate> | <expression> { = | <> | != | > | >= | < | <= } <expression> | <property> IS [NOT] NULL | <expression> [NOT] IN ( <expression> [, ...n] ) | <expression> [NOT] LIKE <pattern> [ESCAPE <escape_char>] | EXISTS ( <property> ) | ( <predicate> ) <expression> ::= <constant> | <property> | <expression> { + | - | * | / | % } <expression> | { + | - } <expression> | ( <expression> )var filter = new SqlFilter("InvoiceTotal < 10000");
  29. 29. <statements> ::= <statement> [, ...n] | <action> [;] <action> ::= SET <property> = <expression> | REMOVE <property> <expression> ::= <literal> | <function> ::= newid() | <property> | <expression> { + | - | * | / | % } <expression> | { + | - } <expression> | ( <expression> )var rule = new SqlRuleAction("SET FullName = FirstName + + LastName");
  30. 30. QueueDescription destinationQ = new QueueDescription("myQ2");QueueDescription sourceQ = new QueueDescription("myQ1");sourceQ.ForwardTo = "myQ2";NamespaceManager nm = NamespaceManager.Create();nm.CreateQueue(destinationQ);nm.CreateQueue(sourceQ);
  31. 31. DeviceId = ‘123’ OR UserId = ‘clemensv’ OR Group IN (‘A’, ‘B’, ‘C’)Group IN (‘A’, ‘B’, ‘C’, ‘D’, ‘E’) DeviceId = ‘456’ OR UserId = ‘clemensv’ OR Group IN (‘A’, ‘B’, ‘C’)
  32. 32. HTTP SBMP/AMQP HTTP 1 Entity per Socket 1 Pending Operation per Socket 60s operation timeout (NAT/Prx) SBMP/AMQP Unlimited Multiplexed Entities and Unlimited Pending Ops per Socket No fixed operation timeout Session Support (coming in AMQP)
  33. 33. Browsers Long Polling, Web Sockets, Server-Side Events, Forever-Frame ConnectionsKey Value IMessageBus key1 Filtered key2 Receive … keyN
  34. 34. Composite Cursor Node A Node B IMessageBus IMessageBus Topic A B Throughput Topic A B Scale-Out Topic A BClient Pinning
  35. 35. Node A Node B Socket.io Socket.io Topic A B Throughput Topic A B Scale-Out Topic A B
  36. 36. Notification Hubs
  37. 37. Client app Platform Notification ServiceApp back-end
  38. 38. iOS app Windows Store appApp back-end APNs WNS Service Bus Notification Hub
  39. 39. Tag:”Beatles” Tag:”Beatles” Service BusApp back-end Notification Hub Tag:”Wailers”
  40. 40. <toast> <visual> <binding template="ToastText01"> <text id="1">$(message)</text> </binding> </visual> </toast> Hello! { message: ‚Hello!‛ } Service BusApp back-end Notification Hub Hello! { aps: { alert: ‚$(message)‛ } }
  41. 41. Thank You ForListening!

×