watch your communication
play

Watch your communication How communication drives design Uwe - PowerPoint PPT Presentation

Watch your communication How communication drives design Uwe Friedrichsen (codecentric AG) GOTO Berlin Berlin, 13. November 2016 @ufried Uwe Friedrichsen | uwe.friedrichsen@codecentric.de | http://slideshare.net/ufried |


  1. Watch your communication How communication drives design Uwe Friedrichsen (codecentric AG) – GOTO Berlin – Berlin, 13. November 2016

  2. @ufried Uwe Friedrichsen | uwe.friedrichsen@codecentric.de | http://slideshare.net/ufried | http://ufried.tumblr.com

  3. The “one-size-fits-all” trap

  4. Standardization as a virtue

  5. We see that a lot • One programming language • One framework • One build system • One type of runtime unit • One data store • One type of database access • One application server • One ... • One communication paradigm

  6. Why are we doing it?

  7. Reducing complexity • Avoid intellectual overload • Easier to understand • Easier to change • Faster to change • Easier to operate • Less error-prone • Cheaper

  8. These are valid and important reasons …

  9. ... but that is just one side of the coin

  10. The complexity of a solution 
 must match 
 the complexity of the problem to solve

  11. If your task is to build a box from pre-cut boards, 
 only using a hammer might be adequate

  12. If your task is also to paint the box you just built, 
 only having a hammer might be a problem …

  13. Now imagine building a whole house 
 just with a hammer …

  14. Yet, in IT we often tend to build whole houses 
 just with a hammer because boxes can be built with a hammer

  15. Complexity mismatch means • Increased accidental complexity • Harder to understand • Harder to change • Slower to change • Harder to operate • More error-prone • More expensive

  16. Problem complexity Essential complexity Complexity Adds direct Adds indirect accidental complexity accidental complexity Ideal solution complexity

  17. Problem complexity Complexity More “tooling” than needed Increased accidental to get the job done well complexity Overly complex solution

  18. Problem complexity Complexity Not enough “tooling” Increased accidental to get the job done well complexity Over- simplified solution

  19. Overall Solution Complexity := Essential Problem Complexity + Solution Complexity Mismatch Solution Complexity Mismatch a.k.a. Accidental Complexity Be aware that mismatch in both directions 
 adds to overall solution complexity

  20. Problem complexity Essential complexity Complexity Aim for the least complex solution 
 with respect to the problem you have to solve (Yes, it is about trade-offs – as always in architecture)

  21. Communication paradigms

  22. Communication paradigms • Dimensions of communication • Synchronous vs. asynchronous • Request/response vs. message passing • Commands, Events and Documents • Sender/Receiver dependency

  23. Communication paradigms • Typical communication patterns • Synchronous request/response • Asynchronous commands 
 (with known receiver) • Asynchronous events 
 (without known receiver)

  24. The “synchronous request/response everywhere” trap

  25. Why are we doing it?

  26. Remember the “one-size-fits-all” trap?

  27. Yes, but why this paradigm?

  28. Why synchronous R/R? • “It’s how the internet works” • “The library support is better” • “It is easier to reason about” • Matches the way we consciously think • Matches the way we learned to do design

  29. Do not forget the other side of the coin

  30. The flipside of the coin • HTTP was designed for a specific use case Access hypermedia content • Not an ubiquitous communication solution • • The world outside a process is different Non-determinism kills easy reasoning • Latency creep kills easy reasoning • • Solution mismatch adds complexity Compromises functional encapsulation • Changes and extensions become more complicated • Longer activation paths compromise robustness •

  31. Designing communication

  32. An (invidious) example …

  33. Order fulfillment

  34. Let us begin with the well-known 
 synchronous request/response design ...

  35. Order fulfillment Initial version with limited functionality 
 • Order includes Items • Amounts • Price per item • T otal price • • Credit card payment • Only non-digital items

  36. Online Shop Order Fulfillment 
 Service Coordinate Payment 
 Shipment 
 Service Service Credit Card Warehouse Credit Card Warehouse Provider System <Own Service> <Foreign Service>

  37. Order fulfillment Add coupons 
 • Order additionally includes Optional coupon ID • Optional remaining coupon value • Coupon is already charged against total price • • Validate coupon

  38. Online Shop Order Fulfillment 
 Service Coordinate Payment 
 Shipment 
 Coordinate Service Service Coupon Credit Card Warehouse Coupon Credit Card Warehouse Management Provider System <Own Service> <Foreign Service>

  39. Order fulfillment Add promotions 
 • Order additionally includes Optional promotion ID • Promotion is already applied to order • • Notify Campaign Management System about promotion usage

  40. Online Shop Order Fulfillment 
 Service Coordinate Campaign Payment 
 Shipment 
 Promotion Coordinate Management Service Service Coupon Credit Card Warehouse Coupon Credit Card Warehouse Management Provider System <Own Service> <Foreign Service>

  41. Order fulfillment Add customer accounts 
 • Order additionally includes Payment type (Credit card/Account) • • Charge customer account

  42. Online Shop Order Fulfillment 
 Service Coordinate Campaign Payment 
 Shipment 
 Promotion Coordinate Management Service Service Coupon Credit Card Warehouse Coupon Account Credit Card Warehouse Management service Provider System Accounts Receivables <Own Service> <Foreign Service>

  43. Order fulfillment Add PayPal 
 • Order additionally includes More payment types (Credit card/PayPal/Account) • • Payment via PayPal

  44. Online Shop Order Fulfillment 
 Service Coordinate Campaign Payment 
 Shipment 
 Coordinate Management Service Service Promotion Coupon Warehouse Coupon Account Payment Warehouse Credit Card Management service provider System PayPal Accounts Credit Card Receivables Provider PayPal <Own Service> <Foreign Service>

  45. Order fulfillment Add digital music library 
 • New shipment method Activate music assets in digital music library • Notify customer via email including access link • • Digital music library has its own API

  46. Online Shop Order Fulfillment 
 E-Mail Server Service Coordinate Campaign Payment 
 Shipment 
 Coordinate Coordinate Notify Cust. Management Service Service Promotion Coupon Warehouse Music Coupon Account Payment Warehouse Credit Card Music Library Management service provider System PayPal Accounts Credit Card Receivables Provider PayPal <Own Service> <Foreign Service>

  47. Order fulfillment Add digital video library 
 • New digital shipment channel Activate video assets in digital video library • Notify customer via email including access link • • Digital video library has its own API Different from the music library API •

  48. Online Shop Order Fulfillment 
 E-Mail Server Service Coordinate Campaign Payment 
 Shipment 
 Coordinate Coordinate Notify Cust. Management Service Service Promotion Coupon Warehouse Assets Coupon Account Payment Warehouse Credit Card Music Library Video Library Management service provider System PayPal Accounts Credit Card Receivables Provider PayPal <Own Service> <Foreign Service>

  49. Order fulfillment Add e-book library 
 • New digital shipment channel Activate e-books in e-book library • Notify customer via email including access link • • E-Book library has its own API Different from the other asset library APIs •

  50. Online Shop Order Fulfillment 
 E-Mail Server Service Coordinate Campaign Payment 
 Shipment 
 E-Book Coordinate Coordinate Notify Cust. Management Service Service Library Promotion Coupon Warehouse Assets Coupon Account Payment Warehouse Credit Card Music Library Video Library Management service provider System PayPal Accounts Credit Card Receivables Provider PayPal <Own Service> <Foreign Service>

  51. Order fulfillment Add bonus card 
 • Order additionally includes Optional bonus card ID • Potential discount is already applied to order • • Notify Loyalty Management System about customer purchase

  52. Online Shop Loyalty Order Fulfillment 
 E-Mail Server Management Service Coordinate Campaign Payment 
 Shipment 
 E-Book Loyalty Coordinate Coordinate Notify Cust. Management Service Service Library Promotion Coupon Warehouse Assets Coupon Account Payment Warehouse Credit Card Music Library Video Library Management service provider System PayPal Accounts Credit Card Receivables Provider PayPal <Own Service> <Foreign Service>

  53. Order fulfillment More requirements to come …

Recommend


More recommend