Replies: 5 comments 25 replies
-
@tobiemh Good idea! Would it also make sense to source from RDBMS like MySQL and PostgreSQL? I'd love it if SurrealDB could be a viable alternative to e.g. Vitess in terms of scalability and ease of data migration (I know SurrealDB has a lot wider feature set and scope so it's like comparing apple vs orange but still- depending on one's requirement those two can be comparable and the ease of data migration can be a great deal?). For example, I thought Vitess supported migrating from vanilla MySQL with some manual steps, by registering the existing MySQL via an unmanaged tablet. Similarly, If we could point a SurrealDB command to an existing MySQL to start a long-running process that continuously syncs MySQL data to SurrealDB, that would be great. Also, MySQL and PostgreSQL might still have more productions users than those NoSQL and NewSQL databases. So perhaps providing migration paths from RDBMSes would help SurrealDB adoption slightly more than others? 🤔 P.S. I'd happily try to contribute one for MySQL if that's ok for you and you could share me a big picture of this realtime snc feature(like what command to implement for this feature... |
Beta Was this translation helpful? Give feedback.
-
I'm the maintainer of that crate. This is something I'm definitely interested in and something I need. I have just submitted a PR on the nanoid repo that makes it possible to convert anything to a Nano ID. This will help with converting RethinkDB's UUID based document IDs to record IDs. |
Beta Was this translation helpful? Give feedback.
-
Hi @here, is this implemented yet? Dont see this flag ? |
Beta Was this translation helpful? Give feedback.
-
Ideally, this would only be the default, but we would allow users to pick which field(s) to use as the ID... 💯 For example, if I am migrating my |
Beta Was this translation helpful? Give feedback.
-
@tobiemh I'd like to suggest a different approach - surrealdb is already extremely ambitious, so don't recreate the wheel for something outside the core competency/focus, and instead just leverage existing CDC tools, like Conduit and Debezium, to implement this. Perhaps Benthos as well, though that's less for database CDC. Conduit is simpler, more powerful (allows transformation through a pipeline), and has far more sources/connectors than Debezium, so it probably makes sense to support that. All that would be needed is to make a connector that can receive whatever stream has been output from the pipeline, regardless of original source. https://conduit.io/docs/connectors/connector-list/ (toggle the unreleased connector filter, as that's what most of them are) Here's vitess/mysql https://github.com/conduitio-labs/conduit-connector-vitess Postgres https://github.com/ConduitIO/conduit-connector-postgres Mongo https://github.com/conduitio-labs/conduit-connector-mongo Neo4j https://github.com/conduitio-labs/conduit-connector-neo4j There's S3, and so much more. It also integrates with NATS, Kafka etc for distributed event driven architectures. Also, surrealdb could serve as a source connector as well via its live queries etc - which could then easily feed into NATS, Kafka etc. I've created an issue to request a conduit connector for surrealdb here. This wouldn't preclude native integrations with 3rd party DBs if you decide to do that someday, but it would be a very low effort way to integrate surreal with essentially all of the popular DBs, data stores, and more. |
Beta Was this translation helpful? Give feedback.
-
With the addition of 3rd party database syncing, it should be quicker and easier to get going with SurrealDB.
Any changes made on the 3rd party database will be asynchronously synced into SurrealDB.
MongoDB
For MongoDB we can use change streams to watch all changes to a database.
Document IDs would need to be converted into SurrealDB record IDs.
https://docs.rs/mongodb
RethinkDB
For RethinkDB we can use table change feeds to watch all changes to all tables in a database.
Document IDs would need to be converted into SurrealDB record IDs.
https://docs.rs/reql
Beta Was this translation helpful? Give feedback.
All reactions