Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

notifications and REST #24

Closed
pvdbosch opened this issue Jan 6, 2020 · 9 comments · Fixed by #63
Closed

notifications and REST #24

pvdbosch opened this issue Jan 6, 2020 · 9 comments · Fixed by #63
Assignees
Milestone

Comments

@pvdbosch
Copy link
Contributor

pvdbosch commented Jan 6, 2020

In GitLab by @pvdbosch on Aug 9, 2018, 11:38

experiences from eBox? (Willem)

@pvdbosch
Copy link
Contributor Author

pvdbosch commented Jan 6, 2020

In GitLab by @pvdbosch on Aug 9, 2018, 12:31

assigned to @wsalembi

@pvdbosch pvdbosch added this to the backlog milestone Jan 10, 2020
@pvdbosch pvdbosch assigned VirginieHayot and unassigned wsalembi Apr 29, 2020
@VirginieHayot
Copy link
Contributor

VirginieHayot commented May 26, 2020

REQUIREMENTS

  • Must be usable in both a broker architecure as a service architecture
  • Reusable common schemas for different institutions

OVERVIEW
image

REVIEW

event.json

  • Versioning?
  • eventId = UUID, why so strict in schema?
  • Publisher/creator URN, why enforce URN? Part of CN from X509 certificate?
  • DestinationTopic: rename (too broker-like)

content.json

  • Versioning? in filename: content-v1.json?
  • Add possibilities for payload encryption and/or signature (JWS)

custom-payload.json

  • Versioning? in filename: custom-payload-v1.json? A more explicit field, to make event designers think of versioning?

General questions/remarks

  • How would subscribers know the different schemas? Schema repository?
  • How could an encryption layer be added? Standardize this?
  • Add examples on 2 archetypes: "Event notifications" and "Event-Carried State Transfer": https://martinfowler.com/articles/201701-event-driven.html
  • Add examples for the 3 types of architectures (independent from the 2 previous archetypes):
  • Broker: no envelope needed
  • Pull REST service (classic service paradigm): add swagger + support to return multiple events at once + acknowledge
  • Push REST service (webhooks): add swagger + acknowledge
  • Add rules about additionalProperties
  • How is subscription done for SocSec? Could standardize this too.

REFERENCES

https://docs.aws.amazon.com/sns/index.html
https://refubium.fu-berlin.de/bitstream/handle/fub188/4008/03_hinze_chapter03.pdf?sequence=4&isAllowed=y
http://www.marco.panizza.name/dispenseTM/slides/exerc/eventNotifier/eventNotifier.html

@pvdbosch pvdbosch modified the milestones: backlog, in progress May 26, 2020
@pvdbosch
Copy link
Contributor Author

Some thoughts:

  • for both archetypes, at the very least an "eventId" and "eventType" (aka destinationTopic) would be needed
  • the eventType could imply the JSON schema(s) and version of the payload instead of linking these to each event
    • zalando makes distinction between event type metadata and event metadata
  • having two levels of headers seems a bit complex, I think we could manage with a single extensible header. "actor" and "concernedEntities" are business data that may not be generally applicable.

@pvdbosch
Copy link
Contributor Author

pvdbosch commented Jun 2, 2020

OpenAPI 3.1 will support specifying schemas for webhooks: https://github.com/OAI/OpenAPI-Specification/blob/v3.1.0-dev/versions/3.1.0.md#oasWebhooks

@pvdbosch
Copy link
Contributor Author

The CloudEvents specification looks quite interesting: https://github.com/cloudevents/spec
Maybe we could adopt it?

It's a a quite uncomplicated specification for events. It defines a conceptual model, protocol bindings to JSON and HTTP, and also a more formal specification of webhooks.

@VirginieHayot
Copy link
Contributor

VirginieHayot commented Jun 24, 2020

In the second OSLO session on API guidelines the challenge of data synchronisation has been sketched and introduced:

* https://data.vlaanderen.be/standaarden/standaarden-in-ontwikkeling/api-guidelines/api-guidelines-index.html

* https://data.vlaanderen.be/standaarden/standaarden-in-ontwikkeling/api-guidelines/OSLO%20API%20Guidelines%20-%20Workshop%202%2019_03_20%20-%20Verslag.docx

* https://data.vlaanderen.be/standaarden/standaarden-in-ontwikkeling/api-guidelines/19032020%20-%20API%20guidelines%20WS2.pptx

Basic topics

  • Protocol/architectuur
    ** pull vs push
    ** garantuee of sequence
    ** single or bulk accumulation
    ** fine-grained subscription
    ** security? (not mentioned in these docs)

  • Format/structure
    ** Sequence (time or number based)
    ** Content (id or id/object or id/delta)

Interesting links from these presentations:
JSON based

XML based

@bertvannuffelen
Copy link

@pvdbosch pvdbosch linked a pull request Sep 8, 2020 that will close this issue
pvdbosch added a commit that referenced this issue Sep 9, 2020
#24 recommend use of CloudEvents

Co-authored-by: Peter Van den Bosch <[email protected]>
@pvdbosch
Copy link
Contributor Author

pvdbosch commented Sep 9, 2020

merged PR with CloudEvents. For further standardization other issues can be opened. We probably best wait until we a WG member has gathered more real-world experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants