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

Integration #38

Open
gedw99 opened this issue Aug 29, 2023 · 4 comments
Open

Integration #38

gedw99 opened this issue Aug 29, 2023 · 4 comments

Comments

@gedw99
Copy link

gedw99 commented Aug 29, 2023

This would work very well with SurrealDB because

it has live queries
It needs a kv Store to make it scale out to many nodes.

Best to just google it and how it uses tikv currrently to scale out.

you can also scale it out by feeding mutations into rmqtt and rmqtt feeds into many SurrealDB. Reads go directly to SurrealDB.

@rhello2999
Copy link

Very good idea, I feel like we can implement a set of plugins for SurrealDB.

@rhello2999
Copy link

However, I don't have any scenarios involving SurrealDB in my work, so I don't know how to implement a SurrealDB plugin. Can you help me with it?

@gedw99
Copy link
Author

gedw99 commented Sep 3, 2023

I can help ..

The primary use case is edge nodes where the data mutations running through the message broker into the db.

it’s a simple CQRS pattern where reads hit the db and writes hit. the message queue. Typically a director ( or proxy ) is added to sniff the SQL and forward the request to the right thing. So then it’s automatic.

so a plugin would sit on all db nodes and subscribe to events and transact them into the db .

The main advantage is that you can have many db instances and they are serverless too. Serverless in that a new empty db can be started and it will fill up with data by getting all old messages.

you can have 3 db in each continent with all staying in sync ( eventual consistency ).

@gedw99
Copy link
Author

gedw99 commented Sep 3, 2023

I am pretty bad at rust. Am more of s golang dev.
I was thinking about the plugins being a wasm runner so that it’s possible to write plugins in any language. It’s not that hard these days with wasm rust being pretty mature.

The plugins are making network calls or direct api calls to the main rust code ? I ask because it matters in terms of interoperability complexity for wasm based plugins

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

No branches or pull requests

2 participants