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

Add external support for streaming relationships into and out of SpiceDB #2015

Open
tstirrat15 opened this issue Aug 7, 2024 · 0 comments
Open
Labels
kind/proposal Something fundamentally needs to change

Comments

@tstirrat15
Copy link
Contributor

tstirrat15 commented Aug 7, 2024

Problem Statement

One common solution to the dual-write or two-phase-commit problem is to make the writes happen one after the other with some sort of streaming or queueing behavior. Concrete examples of this include a transactional outbox pattern using something like debezium to publish events out of an outbox table or using a CQRS pattern approach mediated by a durable stream or queue such as Kafka.

Additionally, consuming Watch API messages can be useful for use cases such as audit, but the Watch API is non-durable; if you want to write to a durable queue, you have to take the messages coming from the Watch API and put them somewhere.

It'd be nice if we had additional building blocks to make streaming relationships into and out of SpiceDB easier.

Solution Brainstorm

The canonical way to solve this problem for Kafka is with Kafka Connect, where agents that live on the Kafka broker do the work of subscribing to external sources and publishing to topics or reading from topics and pushing to external sources. We could write a Kafka connector that would be relatively easy for users to integrate against their existing brokers, and the Connect framework takes care of the state required for interruption and resumption.

For the more general case, we could look at adding to a project like Bento, which is a generalized interface (albeit still tied to the Golang ecosystem) for which we could write an input, an output, and a processor, which should broadly cover the use cases.

Other suggestions and approaches are also welcome.

@tstirrat15 tstirrat15 added the kind/proposal Something fundamentally needs to change label Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/proposal Something fundamentally needs to change
Projects
None yet
Development

No branches or pull requests

1 participant