Realm SDK vs own backend

To fully understand my case consider an app like Instagram, is it possible do develop a similar app (in IOS - Swift) using Realm SDK synchronized with Atlas?

Ive read a lot of info and tutorials about Realm (task tracker app too), but I think Im missing something or its impossible to make a similar app with it. Realm let user access data through a partition key but in a social app most of data is accessible to everyone (maybe only private infos like mail or phone number are not shared), so my doubt is that each time I call a sync function with a partition key to retrieve all posts it will download all posts present in atlas (since they all have the same partition value) and at the same time will merge them into my local Realm, you can imagine its impracticable.

Is this a case where choosing an own backend framework suits better or am I missing something?

MongoDB Realm can create an app like Instagram (or Twitter, or Facebook or…)

Yes, and there is public and private data in Realm as well.

That’s correct. If you want to see the posts, they need to be downloaded. However, there are a number of ways to limit the number of posts including by partitionKey (maybe posts with a certain ‘tag’) or posts from some user (limited by uid) or even by date (using the date as a partition key).

There are also server side functions and remote access that can limit the data delivered to your app.

Reading Partition Atlas Data into Realms is a great starting point - it shows how to take the large amount of data stored by your application and present it into smaller chunks needed by individual clients

Write some code and give it try. Start small, and expand the app as you gain confidence and familiarity with Realm.

@Marco_Vastolo as Jay suggests partitioning is “key” here.

I’ve just published this article on Realm partitioning strategies, which includes a lot of examples: https://developer.mongodb.com/how-to/realm-partitioning-strategies/

2 Likes