Event driven architecture in practice

938
-1

Published on

Published in: Technology, Education
0 Comments
7 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
938
On Slideshare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
34
Comments
0
Likes
7
Embeds 0
No embeds

No notes for slide
  • I’m a bit scared about where agile is goingOnly process no codeImportant to have technical sessions here
  • I’m a bit scared about where agile is goingOnly process no codeImportant to have technical sessions here
  • I’m a bit scared about where agile is goingOnly process no codeImportant to have technical sessions here
  • I’m a bit scared about where agile is goingOnly process no codeImportant to have technical sessions here
  • Mention mail about no architecture planning
  • Do not do any architecture planning at allDo as little as possible to keep taking decisions as the project goes forwardArchitecture is about how the whole system is structured and how different components communicate between each otherDesign is about how the code of a single component is structured..what kind of OO patterns are used for exampleArchitecture is a business concernIs about what is important for the business
  • No design, no database tables defined
  • In the morning you open your IDE and you wait 10 minutes to load, wait more and more
  • EDA is not for everything, not required for small systems
  • This solution scale also in terms of resources. You can have different teams working on different areas of the systemHow bc communicate with each other ?
  • SOA is not web servicesProblem is point to point integration
  • Extremely decouplingThey are both producers and consumers
  • Extremely decoupling
  • Extremely decoupling
  • Usually when we talk about event we talk about a pull model
  • In this model u should have an info back that says to u that the command was executed
  • Push model
  • Read only/ catalog data across business capabilities
  • Notifications ha bisognodelle email degli users, dove le prende ?
  • Facebook example
  • Share schemas, not types
  • Event driven architecture in practice

    1. 1. Event Driven Architecture in practice Domenico Musto @mimmozzo domenico.musto@gmail.com
    2. 2. Who am I ?
    3. 3. What do I do ? .NET Web REST AgileAutomation Testing C# Team leading Ruby
    4. 4. Agenda • SOA • EDA • Communication patterns • Advantages • Disadvantages • Q & A
    5. 5. Where is Agile going ?
    6. 6. PROCESS MATTERS
    7. 7. CODE MATTERS
    8. 8. Agile = no work upfront
    9. 9. Agile = no work upfront No work upfront = no architecture planning
    10. 10. Architecture is not design
    11. 11. Agile = no work upfront No work upfront = no architecture planning
    12. 12. Agile = no work upfront No work upfront = no architecture planning Agile = no design upfront
    13. 13. We can start now
    14. 14. A big code base…
    15. 15. • Build time • Difficult to test • No real boundaries
    16. 16. Does not scale
    17. 17. Event Driven Architecture
    18. 18. • Architecture is mainly business driven • Business capabilities
    19. 19. Business capability • Owns a part of the system • Well defined responsibilities • Owns a model (set of entities) • Set of components (services, api) • Isolated database • Isolated deploy
    20. 20. SOA
    21. 21. FILES DISCUSSIONS MEETINGS TASKS SOA FLOW
    22. 22. FILES DISCUSSIONS MEETINGS TASKS SOA FLOW
    23. 23. FILES DISCUSSIONS MEETINGS TASKS SOA FLOW
    24. 24. FILES DISCUSSIONS MEETINGS TASKS SOA FLOW
    25. 25. EDA FLOW FILES DISCUSSIONS MEETINGSTASKS COMMUNICATION CHANNEL
    26. 26. Upload document with SOA FILESCLIENT Upload document TASKS NOTIFICATION PREVIEW
    27. 27. Upload document with EDA FILESCLIENT Upload document COMMUNICATION CHANNEL TASKS NOTIFICATION PREVIEW
    28. 28. Communication patterns • Database • Files • Messaging
    29. 29. Channels • Logical address • Datatype
    30. 30. • Events • Commands • Document Messages Types of messages
    31. 31. A simple event • ID • Past sequence • Informing the outside world that something happened
    32. 32. NewDocumentUploaded { Id:1, DocumentId:100 }
    33. 33. Commands SendEmail { Id: 100, To: ‘domenico.musto@gmail.com’, From: ‘info@huddle.com’, Subject: ‘Welcome to huddle’, Content: ‘Enjoy’ }
    34. 34. Document Message UserRegistered { Id: 100, Name: ‘Domenico’, LastName: ‘Musto’, Email: ‘domenico.musto@gmail.com’, Twitter: ‘@mimmozzo’, Avatar: ‘http://my.huddle.net/mimmozzo/avatar’ }
    35. 35. Reference Data
    36. 36. COMM. CHANNEL NOTIFICATION NewDocumentUploaded { Id:1, DocumentId:100, WorkspaceId:200 } FILES
    37. 37. PEOPLE COMM.CHANNEL UserRegistered { Id: 100, Name: ‘Domenico’, LastName: ‘Musto’, Email: ‘domenico.musto@gmail.com’, Address: ‘London’, Twitter: ‘@mimmozzo’, Avatar: ‘http://my.huddle.net/mimmozzo/avatar’ }
    38. 38. COMM. CHANNEL NOTIFICATION Recipient Id : int Email : string
    39. 39. Eventual consistency
    40. 40. PEOPLE COMM.CHANNEL UserUpdated { Id: 100, Email: ‘mynewemail@gmail.com’ SomeField: ‘some_value’ } NOTIFICATION
    41. 41. COMM. CHANNEL NOTIFICATION RECIPIENTS
    42. 42. Messages order
    43. 43. Versioning
    44. 44. PEOPLE COMM.CHANNEL UserUpdated { Id: 100, Email: ‘mynewemail@gmail.com’, SomeField: ‘some_value’, Version: 3 } COMM. CHANNEL NOTIFICATION Recipient Id : 100 Email : ‘oldmail@gmail.com’ Version: 1
    45. 45. PEOPLE COMM.CHANNEL UserUpdated { Id: 100, Email: ‘mynewemail@gmail.com’, SomeField: ‘some_value’, Version: 2 } COMM. CHANNEL NOTIFICATION Recipient Id : 100 Email : ‘email@gmail.com’ Version: 3
    46. 46. Idempotency
    47. 47. Ability to replay messages
    48. 48. Events publisher
    49. 49. PEOPLE PEOPLE EVENTS PEOPLE EVENT PUBLISHER COMMUNICATION CHANNEL
    50. 50. Testing
    51. 51. Our infrastructure • RabbitMQ • Reactive Extensions • JSON as message format
    52. 52. Business monitoring
    53. 53. Big picture
    54. 54. Thanks. @mimmozzo domenico.musto@gmail.com
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×