tewhatuora / api-standards

Health New Zealand | Te Whatu Ora API Development and Security Standards
https://apistandards.digital.health.nz
Other
9 stars 1 forks source link

[FEEDBACK] - Point-to-point #131

Closed jdttaylor closed 5 months ago

jdttaylor commented 6 months ago

Summary

This page needs some review. I think I understand what it is trying to say but someone new to EDA may get confused between pub/sub and point to point.

Fundamentally point-to-point is a one to one connection between a producer and a consumer. It is correct that you can have multiple consumers, but I would say they compete. If you are using a broker, the broker should support round robin, or fail over, however I think this is an advanced topic (not an event term) and will confuse the reader.

The example Immunization administered, its a little misleading, I'm assuming the consumer is AIR. If implementing the point to point pattern, there would be multiple producers, and AIR would need to establish a direct connection with each producer. Obviously a broker is in the mix which enables you to break the rules, but if you explain how a broker can simply the immunization administered use case, you are moving away from the point-to-point definition.

This sentence doesn't make sense. The messages are put onto a queue and consumers consume the messages, before acknowledging them as consumed where they are removed from the queue

This sentence is not true, only once consumer will read the message, as point to point guarantees delivery, if multiple consumers process the same message there will be a high chance of duplicates / conflict management. If ordering is also important then multiple consumers causes complexity. If there is more than one consumer, they each read messages from the queue Also its a little confusing as you are explaining point-to-point is a one-to-one exchange. This advanced topic really needs to be introduced.

Link to standards item

https://apistandards.digital.health.nz/draft/api-development/Asynchronous%20APIs/Async%20Patterns/PointToPoint

Which area of the standards does this apply to?

kyle-mwnz commented 5 months ago

Hi @jdttaylor thank you for the feedback - we are working on some updates to improve this page

mathusmith commented 5 months ago

This pattern is valid and relevant, but it would benefit from some refinement. Some additional comments for clarity

kyle-mwnz commented 5 months ago

Hi @jdttaylor and @mathusmith - some updates based on the feedback provided in this issue have been made to the point to point page on the Draft site. If you could take a look that would be great. Thanks

swithinfoote commented 5 months ago

Closing this issue - @jdttaylor please open a new issue if you would like further changes /clarifications.

mathusmith commented 4 months ago

Confirming that the revisions adequately resolve the issue.