d e m a n d d r i v e n a r c h i t e c t u r e
play

D E M A N D D R I V E N A R C H I T E C T U R E K O VA S B O G U - PowerPoint PPT Presentation

D E M A N D D R I V E N A R C H I T E C T U R E K O VA S B O G U TA & D A V I D N O L E N , Q C O N N E W Y O R K 2 0 1 5 C L I E N T S More and more clients everyday Internet of Things How to serve N clients with 1


  1. D E M A N D D R I V E N A R C H I T E C T U R E K O VA S B O G U TA & D A V I D N O L E N , Q C O N N E W Y O R K 2 0 1 5

  2. C L I E N T S • More and more clients everyday • Internet of Things • How to serve N clients with 1 service?

  3. R E S T S E R V I C E • Define logical “resources” • Client requests a resource • But client actually needs to present joined resources • Bloat resource? Multiple requests? • Incidental complexity? Mobile client latency?

  4. S U P P LY D R I V E N A R C H I T E C T U R E • “You can have anything you want as long as it looks exactly like this” • Engineering team issues • Front end team must request changes • N front end teams attacking service team

  5. Our REST Service

  6. T H E P R O B L E M • Cannot predict what clients (especially future ones) will actually need • Cannot put all clients into lockstep with a specific version of the API (Synchronization is expensive) • Client applications are distributed systems (salad days are over)

  7. Author Jun 2, 2015, 6:59 PM database design hierarchical databases make sure clear not “This has all happened before” recommending storing data as tree

  8. R D B M S • Client specifies exactly what they need • Multiple clients not locked into same canned results • Batching (latency considerations)

  9. ? ? ? Author Jun 2, 2015, 9:10 PM known unknowns open questions we’re not just going to expose SQL but what are we going to do? • Can an endpoint provide a restrictive yet expressive query language? • Can an endpoint evolve with clients? • Can an endpoint serve multiple tiers of demand from a client?

  10. D E M A N D D R I V E N

  11. T H E B I G I D E A • Represent client demand as data • Client describes demand, service fulfills • Variation captured in data, on the client • Contract between client and service

  12. P R I N C I P L E S

  13. Demand

  14. Author Jun 2, 2015, 7:17 PM We don’t want to decide what is a resource and what isn’t Composition The payload includes a mixture of thing which are and aren’t resources (We should probably examine and respond to HATEOS)

  15. Interpretation

  16. D E M O

  17. [{:app/contacts [:person/first-name]}]

  18. [{:app/contacts [:person/first-name]}]

  19. [{:app/contacts [:person/first-name]}] ROUTER

  20. [{:app/contacts [:person/first-name]}] ROUTER QUERY

  21. [{:app/contacts [:person/first-name :person/last-name :person/address]}] ROUTER QUERY

  22. person address street first-name city last-name address zip-code

  23. ROUTER [{:app/contacts [:person/first-name QUERY :person/last-name {:person/address [:address/zip-code]}]}] SUBQUERY

  24. S U M M A RY • Client specifies exactly what it needs • Batched • Details of demand are easily modified • Decoupled from service implementation

  25. U X I M P L I C AT I O N S

  26. U S E R I N T E R FA C E S • User interfaces are trees • Graphical clients that talk to traditional REST endpoints general involve error prone reshaping code • Demand Driven Architecture can dramatically simplify rich clients

  27. AppView [{:app/contacts …}] ContactListView [:person/first-name {:person/address …}] AddressView [:zip-code]

  28. D E M O

  29. [{:app/contacts [:person/first-name {:person/address [:zip-code]}]}]

  30. C AV E AT S • Doesn’t mean no backend • Security • Routing • Caching

  31. L E V E L I N G U P

  32. D AT O M I C • Queries work out of the box (pull syntax) • Caching (peers) • Evolvable schema (not migrations) • Query arbitrary points in time (without logs) • Client can trivially receive change sets (transaction report)

  33. R E L AY / G R A P H Q L • FaceBook software layer over React • Monolithic application architecture • Relay/GraphQL deliver demand driven queries for React user interfaces

  34. J S O N G R A P H / FA L C O R • NetFlix eliminated 90% of their networking code • Can now serve many different kinds of clients • Unlike Facebook microservices based design • Still, same benefits - phones, tablets, browsers, and set-top boxes can get exactly what they need

  35. R E C A P • The pace of client innovation is only accelerating • Demand driven architecture guides us toward evolvable systems • Can remove incidental complexity from client and server by meeting on simple data

  36. R E F E R E N C E S • Relay/GraphQL (FaceBook) • JSONGraph/Falkor (NetFlix) • Datomic

  37. Q U E S T I O N S ?

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend