Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
SOA Patterns <br />© 2008 Studio MikMik<br />
ArnonRotem-Gal-Oz<br />
Another quiet day at the office…<br />© Todd Bonita 2009<br />
Before we begin<br />
SOA<br />Policy<br />Adheres to<br />governed by<br />End Point<br />Binds to<br />Exposes<br />Serves<br />Service <br />...
Pipes and Filters<br />Client Server<br />Distributed<br />Agents<br />Layered<br />System<br />Stateless<br />Comm.<br />...
SOA vs. REST<br />Pipes and Filters<br />Client Server<br />Uniform Interface<br />Virtual Machine<br />Distributed<br />A...
SOA also means challenges…<br />
…and patterns can help mitigate them<br />Virtual Endpoint<br />Service Instance<br />Workflodize<br />Edge Component<br /...
Xsights, meet audienceAudience, xsights<br />
Mobile Integration<br />Services<br />Applications<br />Advertizing<br />Management<br />Resources<br />Reporting<br />Ric...
Mobile Integration<br />Services<br />3G Video Calls<br />MMS<br />Dedicated<br />Client<br />3rd parties<br />Monitoring<...
Load balancer<br />Smart<br />phones<br />Web Server<br />(IIS/Apache<br />Web Server<br />(IIS/Apache<br />MMS<br />Gatew...
ServiceHost<br />Edge<br />Business<br />Logic<br />WD<br />Agent<br />Resource<br />Allocator<br />Event<br />Broker<br />
The Service host sets up the common components and services for each Component<br />
Challenge – Service Availability<br />
What’s in a 9<br />
0.99 reliability <br />We have a nice little  legacy<br /> business component<br />
And we move it to SOA<br />
Failsafe hardware <br />Status Technologies<br />FT Server<br />
Or try to detect failure , handle it and minimize its effect on overall service<br />© Rosendahl<br />
What’s the effect of a failure - Server<br />Call Flow<br />Service<br />E1 line = 30 concurrent  video calls<br />
Service Instance<br />Service Business<br />logic<br />End point<br />reaction<br />Distribute<br />Request/Reply<br />Dis...
What’s the effect of a failure - Channel<br />Call Flow<br />Channel<br />Call Flow<br />Channel<br />Call Flow<br />Chann...
Service Instance with NLB<br />Real IP : 1.1.1.2<br />Real IP : 1.1.1.3<br />Real IP : 1.1.1.4<br />Cluster Host<br />Clus...
Alternative : Virtual Endpoint<br />
Challenge  - Flexibility<br />
Request/Reply<br /> EndPoint<br />2.<br />1. Request<br />Synchronous <br />processing<br />3. Reply<br />Service<br />Ser...
Things look Cool & Simple ™ <br />3G Call<br />
Parallel Pipelines<br />Key<br />Queue<br />SOA Component<br />Pattern Component<br />Relation<br />Concern/attribute <br ...
IVP (RV)<br />3G GW<br />(RV)<br />SIP Listner<br />3G VAS (Cestel)<br />RTP Image Extractor<br />3G Builder  (Cestel)<br ...
Inversion of Communications<br />
Consumer view<br />http://www.flickr.com/photos/crimson_wolf/2851737125/sizes/l/<br />
Service view<br />[ServiceContract]<br />[DataContract]<br />publicclassSendMmsEvent : ImEvent<br />    {<br />///<summary...
Edge translates external structures to internal ones<br />
Sagas tie instances together for conversations<br />
Call Recovery<br />X<br />
Alternative : Orchestration<br />Service<br />Service<br />request<br />reaction<br />Protocol<br />Manage<br />Process<br...
Be Wary of Nano-Services<br />
Challenge - Management<br />
Blogjecting Watchdog<br />Edge<br />Service<br />EndPoint<br />Monitor<br />Watchdog <br />Agent<br />Watchdog <br />Edge<...
Blogjects concept  is about collaborating objects<br />
RESTful resource management<br />
http://devrig:52141/RM/Sessions/abc/<br />ATOMPUB<br />Session details<br />URI (ID)<br />State (start/end/status etc.)<br...
ServiceHost<br />Edge<br />Business<br />Logic<br />WD<br />Agent<br />Resource<br />Allocator<br />Event<br />Broker<br />
WatchDog<br />WDWatcher<br />Service B<br />Service A<br />
WatchDog<br />Call Recovery<br />X<br />
Service Monitor<br />Collect<br /> Metrics <br />collection<br />Status<br />Fault <br />Monitoring<br /> Reporting &<br /...
Image of the site-manager<br />
Keep the BIT<br />http://www.flickr.com/photos/37643027@N00/2050024263/sizes/o/<br />
WatchDog<br />Call Recovery<br />X<br />WatchDog<br />3G Call<br />Liveliness Monitor<br />
Challenge - Reporting<br />
Reporting?!  BI?   but the data is fragmented<br />
Aggregated Reporting<br />EndPoint<br />Produce <br />reports<br />Request<br />Request<br />Report<br />ODS<br />report<b...
Challenge – Multi-tennancy(lies, I tell you, all lies)<br />
Same event different subscribers<br />Call Flow<br />Player<br />(interaction Renderer)<br />Play Movie<br />Event<br />Ca...
Routing<br />
Raise a saga initiating event<br />Initiator A<br />Participant A<br />Capacity : 2<br />Participant B<br />Capacity : 1<b...
Reservation Pattern<br />
Business <br />Logic<br />Control<br />Edge<br />Event<br />Broker<br />Resource<br />Allocator<br />Service Host<br />Ser...
Good old 2PC to the rescue<br />
Upcoming SlideShare
Loading in …5
×

SOA patterns

3,138 views

Published on

Building SOAs from unreliable components

Published in: Technology
  • Login to see the comments

SOA patterns

  1. 1. SOA Patterns <br />© 2008 Studio MikMik<br />
  2. 2. ArnonRotem-Gal-Oz<br />
  3. 3. Another quiet day at the office…<br />© Todd Bonita 2009<br />
  4. 4. Before we begin<br />
  5. 5. SOA<br />Policy<br />Adheres to<br />governed by<br />End Point<br />Binds to<br />Exposes<br />Serves<br />Service <br />Consumer<br />Service<br />Contracts<br />implements<br />Understands<br />describes<br />Key<br />Component<br />Messages<br />Sends/Receives<br />Sends/Receives<br />Relation<br />
  6. 6. Pipes and Filters<br />Client Server<br />Distributed<br />Agents<br />Layered<br />System<br />Stateless<br />Comm.<br />SOA is derived from other styles<br />SOA<br />
  7. 7. SOA vs. REST<br />Pipes and Filters<br />Client Server<br />Uniform Interface<br />Virtual Machine<br />Distributed<br />Agents<br />Layered<br />System<br />Replicated Repository<br />Code On<br />Demand<br />Stateless<br />Comm.<br />Cacheable<br />REST<br />SOA<br />
  8. 8. SOA also means challenges…<br />
  9. 9. …and patterns can help mitigate them<br />Virtual Endpoint<br />Service Instance<br />Workflodize<br />Edge Component<br />Gridable Service<br />Blogjecting Watchdog<br />Inversion of Communications<br />Orchestrated Choreography<br />Composite Frontend<br />Transactable Service<br />Identity Provider<br />Request/Reply<br />Parallel Pipelines<br />Service Firewall<br />Decoupled Invocation<br />Saga<br />Aggregated Reporting<br />Client/Server/Service<br />Service Monitor<br />
  10. 10. Xsights, meet audienceAudience, xsights<br />
  11. 11. Mobile Integration<br />Services<br />Applications<br />Advertizing<br />Management<br />Resources<br />Reporting<br />Rich Client<br />Link management<br />Web based<br />Link Managment<br />
  12. 12. Mobile Integration<br />Services<br />3G Video Calls<br />MMS<br />Dedicated<br />Client<br />3rd parties<br />Monitoring<br />Usage Datmart<br />Ad Management<br />Applications<br />Acquisition<br />Interactions<br />branding<br />Targeted Advertizing<br />Campaign Mgmt.<br />Billing<br />Resources<br />Reporting<br />Interactions<br />Reference <br />Data<br />Links<br />Data mining & Statistics<br />Link Managment<br />Reports<br />Publishing tools integration<br />Interaction<br />Designer<br />Web<br />Front-end<br />Data Interfaces<br />
  13. 13. Load balancer<br />Smart<br />phones<br />Web Server<br />(IIS/Apache<br />Web Server<br />(IIS/Apache<br />MMS<br />Gateway<br />3G<br />Gateway<br />3G<br />Gateway<br />Camera<br />Phones<br />DMZ<br />Firewall<br />Load balancer<br />App Server<br />App Server<br />App Server<br />App Server<br />App Server<br />App Server<br />App Server<br />Operational<br />Firewall<br />Backend<br />BI & Reporting<br />Links Registeration<br />Sync.<br />Server<br />NMS<br />Paper<br />Editor<br />Web Server<br />(IIS/Apache<br />Firewall<br />Advertizing clients<br />DB<br />Links<br />Datamart<br />usage<br />DB<br />References<br />Admin<br />Console<br />DMZ<br />
  14. 14. ServiceHost<br />Edge<br />Business<br />Logic<br />WD<br />Agent<br />Resource<br />Allocator<br />Event<br />Broker<br />
  15. 15. The Service host sets up the common components and services for each Component<br />
  16. 16. Challenge – Service Availability<br />
  17. 17. What’s in a 9<br />
  18. 18. 0.99 reliability <br />We have a nice little legacy<br /> business component<br />
  19. 19. And we move it to SOA<br />
  20. 20. Failsafe hardware <br />Status Technologies<br />FT Server<br />
  21. 21. Or try to detect failure , handle it and minimize its effect on overall service<br />© Rosendahl<br />
  22. 22. What’s the effect of a failure - Server<br />Call Flow<br />Service<br />E1 line = 30 concurrent video calls<br />
  23. 23. Service Instance<br />Service Business<br />logic<br />End point<br />reaction<br />Distribute<br />Request/Reply<br />Dispatcher<br />request<br />Edge<br />Service Instance<br />
  24. 24. What’s the effect of a failure - Channel<br />Call Flow<br />Channel<br />Call Flow<br />Channel<br />Call Flow<br />Channel<br />Call Flow<br />Channel<br />Call Flow<br />Channel<br />Call Flow<br />Channel<br />E1 line = 30 concurrent video calls<br />Call Flow<br />Channel<br />Call Flow<br />Channel<br />Call Flow<br />Channel<br />Call Flow<br />Channel<br />Call Flow<br />Channel<br />Call Flow<br />Channel<br />Call Flow<br />Channel<br />Call Flow<br />Channel<br />Call Flow<br />Channel<br />Call Flow<br />Channel<br />Call Flow<br />Channel<br />
  25. 25. Service Instance with NLB<br />Real IP : 1.1.1.2<br />Real IP : 1.1.1.3<br />Real IP : 1.1.1.4<br />Cluster Host<br />Cluster Host<br />Windows Host<br />Service <br />Service <br />Edge<br />Instance<br />Instance<br />Windows Kernel<br />Windows Kernel<br />Windows Kernel<br />TCP/IP<br />TCP/IP<br />TCP/IP<br />NLB Driver<br />NLB Driver<br />NIC Driver<br />NIC Driver<br />NIC Driver<br />NIC<br />NIC<br />NIC<br />Virtual IP : 1.1.1.1<br />
  26. 26. Alternative : Virtual Endpoint<br />
  27. 27. Challenge - Flexibility<br />
  28. 28. Request/Reply<br /> EndPoint<br />2.<br />1. Request<br />Synchronous <br />processing<br />3. Reply<br />Service<br />Service Consumer<br />
  29. 29. Things look Cool & Simple ™ <br />3G Call<br />
  30. 30. Parallel Pipelines<br />Key<br />Queue<br />SOA Component<br />Pattern Component<br />Relation<br />Concern/attribute <br />pipeline<br />pipeline<br />Edge<br />Request<br />EndPoint<br />Request 1<br />EndPoint<br />EndPoint<br />Perform <br />Task<br />Request 2<br />Perform <br />Task<br />Reaction<br />pipeline<br />EndPoint<br />Perform <br />Task<br />Service<br />
  31. 31. IVP (RV)<br />3G GW<br />(RV)<br />SIP Listner<br />3G VAS (Cestel)<br />RTP Image Extractor<br />3G Builder (Cestel)<br />WS<br />Alg. Engine<br />WebRenderer<br />Resource Manager<br />Dispatcher<br />WebConnector<br />Turn out Complicated & Ugly ™ <br />
  32. 32. Inversion of Communications<br />
  33. 33. Consumer view<br />http://www.flickr.com/photos/crimson_wolf/2851737125/sizes/l/<br />
  34. 34. Service view<br />[ServiceContract]<br />[DataContract]<br />publicclassSendMmsEvent : ImEvent<br /> {<br />///<summary><br />/// end user's number. should be in international format: +[country-code]number. Example: +491737692260<br />///</summary><br /> [DataMember]<br />publicstringToNumber { get; set; }<br />///<summary><br />/// service's number, usually a short-code. Example: 84343<br />///</summary><br /> [DataMember]<br />publicstringFromNumber { get; set; }<br />///<summary><br />/// Text, as byte array. Use Encoding classes to do it.<br />///</summary><br /> [DataMember]<br />publicbyte[] TextAsByteArray { get; set; }<br />///<summary><br />/// Image, as byte array. Can be: jpg, gif, png, bmp. (jpg rulez!!)<br />///</summary><br /> [DataMember]<br />publicbyte[] ImageAsByteArray { get; set; }<br />///<summary><br />///Remeber<c>ImageAsByteArray</c>? - This is where you manaually tell us what's the extension. Yes, we can inspect the signature, but why?<br />///</summary><br /> [DataMember]<br />publicstringImageExtension { get; set; }<br />///<summary><br />/// the mms message should have a subject. just put something there.<br />///</summary><br /> [DataMember]<br />publicstring Subject { get; set; }<br />
  35. 35. Edge translates external structures to internal ones<br />
  36. 36. Sagas tie instances together for conversations<br />
  37. 37. Call Recovery<br />X<br />
  38. 38. Alternative : Orchestration<br />Service<br />Service<br />request<br />reaction<br />Protocol<br />Manage<br />Process<br />Schedule<br />Coordinator<br />route<br />request<br />monitor<br />Workflow instance<br />Offline<br /> designer<br />Host<br />Workflows<br />Auxiliary tools<br />Workflow Engine<br />Orchestration platform<br />
  39. 39. Be Wary of Nano-Services<br />
  40. 40. Challenge - Management<br />
  41. 41. Blogjecting Watchdog<br />Edge<br />Service<br />EndPoint<br />Monitor<br />Watchdog <br />Agent<br />Watchdog <br />Edge<br />Monitor<br />Request<br />Heal<br />EndPoint<br />Reports<br />Monitor<br />Report<br />Monitor<br />Monitor<br />Log<br />
  42. 42. Blogjects concept is about collaborating objects<br />
  43. 43. RESTful resource management<br />
  44. 44. http://devrig:52141/RM/Sessions/abc/<br />ATOMPUB<br />Session details<br />URI (ID)<br />State (start/end/status etc.)<br />Resources<br />Knows status<br />URI for the Resource representation on the RM<br />URI for the Resource itself<br />
  45. 45. ServiceHost<br />Edge<br />Business<br />Logic<br />WD<br />Agent<br />Resource<br />Allocator<br />Event<br />Broker<br />
  46. 46. WatchDog<br />WDWatcher<br />Service B<br />Service A<br />
  47. 47. WatchDog<br />Call Recovery<br />X<br />
  48. 48.
  49. 49. Service Monitor<br />Collect<br /> Metrics <br />collection<br />Status<br />Fault <br />Monitoring<br /> Reporting &<br />Dashboarding<br />Edge/Service<br />Security <br />monitoring<br />Status<br />Policy<br />governance<br />Notify<br />Commands<br />Control<br />In<br />Monitor<br />Act<br />Edge/Service<br />Service Monitor<br />
  50. 50. Image of the site-manager<br />
  51. 51. Keep the BIT<br />http://www.flickr.com/photos/37643027@N00/2050024263/sizes/o/<br />
  52. 52. WatchDog<br />Call Recovery<br />X<br />WatchDog<br />3G Call<br />Liveliness Monitor<br />
  53. 53. Challenge - Reporting<br />
  54. 54. Reporting?! BI? but the data is fragmented<br />
  55. 55. Aggregated Reporting<br />EndPoint<br />Produce <br />reports<br />Request<br />Request<br />Report<br />ODS<br />report<br />Transpose<br />Out<br />EndPoint<br />Join<br />Convert<br />Send<br />Poll Data<br />Save Data<br />Clean<br />Pre-Proces<br />Subscribed/<br />Polled data<br />Load<br />Transform<br />Edge<br />Aggregated Reporting Service<br />
  56. 56. Challenge – Multi-tennancy(lies, I tell you, all lies)<br />
  57. 57. Same event different subscribers<br />Call Flow<br />Player<br />(interaction Renderer)<br />Play Movie<br />Event<br />Call Flow<br />Bridge to 3rd<br />Party<br />
  58. 58. Routing<br />
  59. 59. Raise a saga initiating event<br />Initiator A<br />Participant A<br />Capacity : 2<br />Participant B<br />Capacity : 1<br />Initiator B<br />Now what ?!<br />
  60. 60. Reservation Pattern<br />
  61. 61. Business <br />Logic<br />Control<br />Edge<br />Event<br />Broker<br />Resource<br />Allocator<br />Service Host<br />Service Instance #1<br />Service Instance #2<br />Business <br />Logic<br />Control<br />Edge<br />Business <br />Logic<br />Control<br />Edge<br />Business <br />Logic<br />Control<br />Edge<br />Service Host<br />Reservation <br />Event<br />Broker<br />Event<br />Broker<br />Event<br />Broker<br />Resource<br />Allocator<br />Resource<br />Allocator<br />Resource<br />Allocator<br />Service Host<br />Service Host<br />Service Host<br />Service Host<br />Service Host<br />Service Host<br />
  62. 62. Good old 2PC to the rescue<br />

×