(free src: https://learn.particular.net/courses/take/SOA/lessons/1517272-it-ops-service ) Course: Advanced Distributed System Design - Udi Dahan

ToC

  1. SOA tenets
  2. Service example _) Q&A (no notes, not in free src)
  3. Services modelling: Workflows, boundaries and business capabilities
  4. UI composition and Branding service
  5. IT/Ops service

related: Session: Service Boundaries - Tjen Wellens



1) SOA Tenets

Microsoft original “tenets of SO” ./resources/course-adsd-intro-to-soa.resources/screenshot.png 1. autonomous 2. explicit boundaries 3. share contract & schema not class or type (or anything, or db) 4. interaction controlled by policy

1+2 = “encapsulation is a good idea” whatever is on the inside, is sufficiently rich, to do meaningful, stuff by itself

4= interaction policy./resources/course-adsd-intro-to-soa.resources/screenshot.1.png

Udi: What is a service ./resources/course-adsd-intro-to-soa.resources/screenshot.2.png

A service is the technical authority for a specific business capability All data and business rules reside within the service

[alignment with business] Nothing is “left over” Everything must be in some service

-–

./resources/course-adsd-intro-to-soa.resources/screenshot.3.png wrapping a DB in REST does not change it’s responsibility



2) Service example

./resources/course-adsd-intro-to-soa.resources/screenshot.4.png services are in the logical view

-–

./resources/course-adsd-intro-to-soa.resources/screenshot.5.png

./resources/course-adsd-intro-to-soa.resources/screenshot.6.png



4) Services modelling: Workflows, boundaries and business capabilities https://learn.particular.net/courses/take/SOA/lessons/1517267-services-modelling-workflows-boundaries-and-business-capabilities

./resources/course-adsd-intro-to-soa.resources/screenshot.8.png

service boundary = business capability

why not a lot of services? -> because each service spans multiple system boundaries -> team needs skills for each system

system boundaries = - mobile - backend - portal

What code is left, if each service took it’s code out? -> lego green foundation board -> not much else

-–

./resources/course-adsd-intro-to-soa.resources/screenshot.9.png

Sales: OrderSold “what data goes in the event?” parent-record pointing to the children - orderId - shippingId (assumes no digital goods) - credit-card id (assumes no cash-on-delivery / bitcoin)

alternative: children point to the parent when is orderId created? (eg. proceed to checkout) How to share orderId? (eg. session state)

Sales: OrderReceived - orderId

Billing: CustomerBilled - orderId Yyy

Shipping: OrderShipped - orderId

=> less data has to be passed between services

-–

A service owns a piece of data - across system boundaries => in a given service, there will be multiple technologies

team per service? cross functional team



5**)** UI composition and Branding service https://learn.particular.net/courses/take/SOA/lessons/1517270-ui-composition-and-branding-service

so we have “something-like-widgets in the UI that a service owns”

but there are common elements ./resources/course-adsd-intro-to-soa.resources/screenshot.10.png

Branding Service “we want all of our communications to be consistent and on brand”

price service does not care about the color or font it is presented

View Models ./resources/course-adsd-intro-to-soa.resources/screenshot.11.png Whatever.js “the latest new”

spectrum of solutions - simple css classes - … - fullblown ViewModel

Complex solution: (grid of info) Traditional ViewModel: List {name,price,stock}

SOA-friendly ViewModel Dict<product_id, name> Dict<product_id, price> Dict<product_id, inventory>

Branding Service “is it in the middle column?” “is it in blue or green?”

Simpler solution: css class ./resources/course-adsd-intro-to-soa.resources/screenshot.12.png

-–

Q: how does the client get it’s data? A: request response is allowed within the service boundary

via IT/Ops? ./resources/course-adsd-intro-to-soa.resources/screenshot.13.png

-–

Branding is coupled to how the data is presented

try to keep branding as passive/neutral as possible

-–

Who owns the workflow / page flow / url flow every service: “is this a url I need to act on”

traditional routing: - uri_a = controller_a - uri_b = controller_b

soa routing each service: “these are my controllers, those are the URIs I need to be registered for”

sample code ./resources/course-adsd-intro-to-soa.resources/screenshot.14.png https://github.com/Particular/Workshop

-– Q: How can I see my changes - debug / view A: requires a deeper investment in build run with all dependencies, but with your latest local changes



6**)** IT/Ops service “technological glue” “keeping the information flowing and secure across the enterprise”

phyisical config - which server - connection string to db - error queue

auth - sign in - users permissions - impersonation

which ORM? IT/Ops decision

which MessageQueue tech

Logging

-–

design services so there is no direct dependency on the actual infrastructure

-–

authentication be careful to keep business rules out of IT/Ops “given a user is authenticated, are they allowed to access system A or system B” - ITOps - basic level authentication - ITOps - basic level can they access system A or system B - BusinessRule - Is the user allowed to transfer money out of this account

careful of centralized identity management solution that contains info of who can do which action on which entity, roles like account owner “once moved from generic roles to entity specific, you’ve gone too far”

-–

also: IT/Ops does integration

./resources/course-adsd-intro-to-soa.resources/screenshot.7.png