Nidhi Saini
Nidhi Saini

Reputation: 47

Android and Parse: How to fetch the results faster with large number of users ?

I am developing a social networking android app. I am currently using parse as my back end. I am using Parse.com to store the text messages and fetch those messages.

The first problem with parse is that it runs very-2 slow. The second problem is that I have to set limit to 1000 users. How can I access large number of users or data? How can i fetch the results faster with large number of users?

Should i consider using any other backend like google app engine, etc.

I want to fetch and store results quickly, just like facebook and WhatsApp? I would really appreciate your ideas/feedback/suggestion. Thanks

Upvotes: 0

Views: 769

Answers (2)

gimenete
gimenete

Reputation: 2669

For a better answer you should probably paste some of your code to know how is the query you are making and how is your data model. That is the only way you can optimize your query because you cannot make Parse itself faster and you cannot remove its limits.

By the way, I work in Backbeam. It is a fast backend as a service and it has support for complex queries such as making joins. Maybe you want to give it a try.

Upvotes: 0

Marius Waldal
Marius Waldal

Reputation: 9942

The problem is not that parse is slow, but more likely that your data model is not optimized for use on a NoSQL database service like parse. You probably have SQL experience and created your data model like you would for a SQL database.

With NoSQL (and especially mobile apps), you need to model for queries; not normalisation and consistency.

When designing your backend, first create a list of the most commonly used queries your app will have. Then design your model around how to minimize the number of queries necessary for retrieving the dataset you need.

Why do you need to get 1000 or more users in one query?

I recommend you take a look at the data model behind the Anypic app on parse.com. The model is very simple, yet extremely versatile.

If you are a SQL-person (like I was), you need to "unlearn" your relation thinking and start thinking about query speed :-)

Upvotes: 2

Related Questions