-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Need to manage MongoDB indexes yourself #36
Comments
+1 |
2 similar comments
+1 |
+1 |
+1 Have zero experience with this. What does this actually mean? |
+1 |
1 similar comment
+1 |
@talkaboutdesign I don't have much experience with databases but iirc indices are very important for the database performance. If the index management is done automatically by properly implemented code, we'll have less server-side stuff to worry about, which is the reason why Parse is so popular in the first place. |
+1 |
Automatic indexing is a very hard problem. At Parse, it required hundreds (if not thousands) of engineering hours to build and a sizable dedicated infrastructure... and we still don't believe it's anywhere near perfect. In all cases, the person querying the DB (the app developer in this case) is always the best person to know which indexes are going to be needed and optimal for a particular query. The good news is, for anyone migrating their existing app to a different Mongo database using the migration tool, all the existing indexes are also migrated. You will still have to add new ones or remove unused ones yourself though. That said, I guess this could be added to parse-server eventually. It was most likely too complex for this version. As always, PR welcome... |
@skinp hmm I guess I'm gonna have to learn MongoDB and Node.js. With the shutting down of Parse, if I am to continue using the Parse client sdk, it looks like I'm actually gonna have to participate in the development of this project. |
@davidaik We're all in the same boat here, but we have an opportunity to make Parse something even better than it ever was. |
@kingmatusevich I learnt of the sad news this morning and have been worndering since about whether to keep using the Parse SDK or to move to another service. But now I've decided to stick with it. I'm slowly starting to see Parse Server becoming big and awesome like Wordpress, or at least I hope so. |
I'd highly recommend deploying your MongoDB instance on http://www.mongolab.com/ if you care about this feature. They have a feature that automatically suggests indexes to add to your DB based on usage patterns and you can add an index with one click. |
Yep, if you use Parse Server, you will need to understand MongoDB, and also specifically indexing. Doing this automatically at Parse for each app was a hard problem because we had to solve the general use case, but, managing it for your own app with moderate traffic isn't too difficult (and as mentioned, folks like MongoLab actually suggest indexes for you). It is no different than using Rails with MySQL. In that case, you would have to manage your indexes in MySQL. You should understand what queries your app is making, and add the proper indexes to ensure those queries are efficient. |
@rawrmaan @jamesyu I was thinking that using MongoLab has the possibility of turning out to be the same as with Parse. What if they decide to shut down their service at some point? I know that in such a case, my data can be migrated easily. But then I think that having complete control over the database will be better now that we have to host the server code ourselves anyway. |
As you mentioned, migrating from a DBaaS like MongoLab will be much easier than something like Parse, so I wouldn't worry about that so much. However, you can also just host your own MongoDB on your own box or deploy to aws https://s3.amazonaws.com/quickstart-reference/mongodb/latest/doc/MongoDB_on_the_AWS_Cloud.pdf (yes, the AWS instructions are much more daunting, which is why I would recommend a DBaaS at least as a first experience). |
��@davidaik right there with you, except I found out last night. |
@jamesyu thanks for the suggestions. I will likely be using MongoLab, but I'll also be looking into hosting my own MongoDB if my use-case doesn't make it too hard. |
From the Parse Server guide-
I don't have any experience with MongoDB, so I would like to know if the requirement for manual management of the db will be hard work or could the Parse Server codes be updated to manage the MongoDB automatically? I'm wondering if this is a thing that can be smoothed out.
The text was updated successfully, but these errors were encountered: