Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
I am working on a React Native app using Realm, Atlas Flexible Sync, and MongoDB, and I'm super confused about how subscriptions work. I'm coming from a .NET SQL background, so I'm completely new t...
#4: Post edited
Can someone explain how to use ReactNative SDK with flexible sync using a code first approach
- How to use ReactNative SDK with flexible sync using a code first approach
#3: Post edited
I am working on a React Native app using Realm, Atlas Flexible Sync, and MongoDB, and I'm super confused about how subscriptions work. I'm coming from a .NET SQL background, so I'm completely new to this type of architecture. I've been reading MongoDB's documentation for the React Native SDK and Atlas Sync for roughly a month and I'm still lost. On the backend I have my cluster set up with a database and an app synced with Flexible Sync. I have created my schemas on the client side and am trying to initialize them in Atlas, and maybe seed some data when the application first runs. Flexible sync says that you have to create a subscription to do this. And a subscription seems to be some kind of query, that creates a queryable field that some specific user can now access. From the examples I've seen, I don't understand if I have to open a synced Realm for every query, or if I can just read and write to Realm normally and it will Sync changes up to Atlas. I basically just want data to be partitioned by who created a document and the custom user role that I added to them. Do I even need to use flexible sync for this, or can I just use partitioned based sync and specify all of my permissions for the user types on the backend? I really just want to migrate my schemas to Atlas with a code first approach, and then write my read and write operations as normal without having to create a different subscription each time. Any advice and can anyone explain to me how this works and what subscriptions actually are?
- I am working on a React Native app using Realm, Atlas Flexible Sync, and MongoDB, and I'm super confused about how subscriptions work. I'm coming from a .NET SQL background, so I'm completely new to this type of architecture. I've been reading MongoDB's documentation for the React Native SDK and Atlas Sync for roughly a month, and I'm still lost.
- On the backend I have my cluster set up with a database and an app synced with Flexible Sync. I have created my schemas on the client side and am trying to initialize them in Atlas, and maybe seed some data when the application first runs. Flexible sync says that you have to create a subscription to do this.
- And a subscription seems to be some kind of query, that creates a queryable field that some specific user can now access. From the examples I've seen, I don't understand if I have to open a synced Realm for every query, or if I can just read and write to Realm normally and it will Sync changes up to Atlas. I basically just want data to be partitioned by who created a document and the custom user role that I added to them.
- Do I even need to use flexible sync for this, or can I just use partitioned based sync and specify all of my permissions for the user types on the backend?
- I really just want to migrate my schemas to Atlas with a code first approach, and then write my read and write operations as normal without having to create a different subscription each time. Any advice and can anyone explain to me how this works and what subscriptions actually are?
#2: Post edited
I am working on a React Native app using Realm, Atlas Flexible Sync, and MongoDB, and I'm super confused about how subscriptions work. I'm coming from a .NET SQL background, so I'm completely new to this type of architecture. I've been reading MongoDB's documentation for the React Native SDK and Atlas Sync for roughly a month and I'm still lost. On the backend I have my cluster set up with a database and an app synced with Flexible Sync. I have created my schemas on the client side and am trying to initialize them in Atlas, and maybe seed some data when the application first runs. Flexible sync says that you have to create a subscription to do this. And a subscription seems to be some kind of query, that creates a queryable field that some specific user can now access. From the examples I've seen, I don't understand if I have to open a synced Realm for every query, or if I can just read and write to Realm normally and it will Sync changes up to Atlas. I basically just want data to be partitioned by who created a document and the custom user role that I added to them. Do I even need to use flexible sync for this, or can I just use partitioned based sync and specify my all of my permissions for the user types on the backend? I really just want to migrate my schemas to Atlas with a code first approach, and then write my read and write operations as normal without having to create a different subscription each time. Any advice and can anyone explain to me how this works and what subscriptions actually are?
- I am working on a React Native app using Realm, Atlas Flexible Sync, and MongoDB, and I'm super confused about how subscriptions work. I'm coming from a .NET SQL background, so I'm completely new to this type of architecture. I've been reading MongoDB's documentation for the React Native SDK and Atlas Sync for roughly a month and I'm still lost. On the backend I have my cluster set up with a database and an app synced with Flexible Sync. I have created my schemas on the client side and am trying to initialize them in Atlas, and maybe seed some data when the application first runs. Flexible sync says that you have to create a subscription to do this. And a subscription seems to be some kind of query, that creates a queryable field that some specific user can now access. From the examples I've seen, I don't understand if I have to open a synced Realm for every query, or if I can just read and write to Realm normally and it will Sync changes up to Atlas. I basically just want data to be partitioned by who created a document and the custom user role that I added to them. Do I even need to use flexible sync for this, or can I just use partitioned based sync and specify all of my permissions for the user types on the backend? I really just want to migrate my schemas to Atlas with a code first approach, and then write my read and write operations as normal without having to create a different subscription each time. Any advice and can anyone explain to me how this works and what subscriptions actually are?
#1: Initial revision
Can someone explain how to use ReactNative SDK with flexible sync using a code first approach
I am working on a React Native app using Realm, Atlas Flexible Sync, and MongoDB, and I'm super confused about how subscriptions work. I'm coming from a .NET SQL background, so I'm completely new to this type of architecture. I've been reading MongoDB's documentation for the React Native SDK and Atlas Sync for roughly a month and I'm still lost. On the backend I have my cluster set up with a database and an app synced with Flexible Sync. I have created my schemas on the client side and am trying to initialize them in Atlas, and maybe seed some data when the application first runs. Flexible sync says that you have to create a subscription to do this. And a subscription seems to be some kind of query, that creates a queryable field that some specific user can now access. From the examples I've seen, I don't understand if I have to open a synced Realm for every query, or if I can just read and write to Realm normally and it will Sync changes up to Atlas. I basically just want data to be partitioned by who created a document and the custom user role that I added to them. Do I even need to use flexible sync for this, or can I just use partitioned based sync and specify my all of my permissions for the user types on the backend? I really just want to migrate my schemas to Atlas with a code first approach, and then write my read and write operations as normal without having to create a different subscription each time. Any advice and can anyone explain to me how this works and what subscriptions actually are?