-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
Use CloudEvents for enabling event-driven notifications including cross-posting. #671
Labels
Comments
clemensv
added a commit
to clemensv/dasblog-core
that referenced
this issue
Dec 28, 2022
clemensv
added a commit
to clemensv/dasblog-core
that referenced
this issue
Dec 28, 2022
clemensv
added a commit
to clemensv/dasblog-core
that referenced
this issue
Dec 28, 2022
clemensv
added a commit
to clemensv/dasblog-core
that referenced
this issue
Dec 28, 2022
clemensv
added a commit
to clemensv/dasblog-core
that referenced
this issue
Dec 28, 2022
clemensv
added a commit
to clemensv/dasblog-core
that referenced
this issue
Jan 2, 2023
clemensv
added a commit
to clemensv/dasblog-core
that referenced
this issue
Jan 2, 2023
clemensv
added a commit
to clemensv/dasblog-core
that referenced
this issue
Jan 4, 2023
clemensv
added a commit
to clemensv/dasblog-core
that referenced
this issue
Jan 4, 2023
clemensv
added a commit
to clemensv/dasblog-core
that referenced
this issue
Feb 25, 2023
clemensv
added a commit
to clemensv/dasblog-core
that referenced
this issue
Feb 25, 2023
clemensv
added a commit
to clemensv/dasblog-core
that referenced
this issue
Nov 1, 2024
clemensv
added a commit
to clemensv/dasblog-core
that referenced
this issue
Nov 1, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The skeleton of the old Pingpack/Trackback/Crosspost logic is all still there, but that the workers are gone or have been commented out. Given that this is all old-style stuff, that's very reasonable.
I propose we replace all of that by a set of CloudEvents that are raised when the post collection or posts change state, and an API that allows pulling the post details and especially the full content as JSON or XML. We might put that underneath the RSS feed so that you can drill straight into the RSS items. We'd label all RSS with an id="{guid}" attribute to make the relation obvious.
type
:dasblog.post.added
source
:https://example.com[/path]/feed/rss
subject
:https://example.com[/{path]/feed/rss/b45fc16c-2e72-4d7e-a0c1-394e0875b556
data
: JSON containing all metadata but not the actual content due to size.type
:dasblog.post.changed
source
:https://example.com[/path]/feed/rss
subject
:https://example.com[/{path]/feed/rss/b45fc16c-2e72-4d7e-a0c1-394e0875b556
data
: JSON containing all metadata but not the actual content due to size.type
:dasblog.post.deleted
source
:https://example.com[/path]/feed/rss
subject
:https://example.com[/{path]/feed/rss/b45fc16c-2e72-4d7e-a0c1-394e0875b556
data
: JSON containing all metadata but not the actual content due to size.id
,time
are required on all events.The ..../rss/{guid} endpoint will return the full content even if that might be enormously long and if the RSS feed itself may thus choose to truncate it.
The CloudEvents are posted to a configurable HTTP endpoint using CloudEvents JSON structured format leveraging the CloudEvents WebHook convention.
For authorization, the site security config should include configuring an API key or API token either as a header-name/value pair or a query-parameter/value pair. While the webhook spec mandates some mechanisms, it's safer to assume that some targets may use different headers/parameters for passing keys and tokens.
The
tags
attribute is an extension that allows subscribers to filter events by the presence of certain tags. An event subscriber that forwards posts to mastodon might look for a particular tag like#social
or even#mastodon
and only be interested in posts that contain it.All cross-posting and integration with foreign APIs could then be externalized to a service that knows how to handle them. That CloudEvent handler and dispatcher might quite well be co-hosted with dasBlog and does not need to be some cloud service.
Personally, I will hook that up to Azure Event Grid and then write a few Azure Functions that know how to talk to Twitter and Mastodon and maybe some other sites and probably host those in the same plan as the site.
The text was updated successfully, but these errors were encountered: