Skip to content

Getting started with Postgres #3254

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

Closed
lolobosse opened this issue Dec 17, 2016 · 5 comments
Closed

Getting started with Postgres #3254

lolobosse opened this issue Dec 17, 2016 · 5 comments

Comments

@lolobosse
Copy link

lolobosse commented Dec 17, 2016

Good evening everyone,

I've a running-in-prod Parse System at the moment with a classical MongoDB behind.

However, because of some external reasons, I need to move to a running SQL System.
Therefore, I read with a lot of interest every Postgres related issues and I found great that this project is already gone so far.
However, I really find it not-well-documented in a sense that a motivated guy, not really expert with DB nor Parse Codebase cannot start anything which is, to me, bad for the project itself (having crazy dudes testing your stuff in prod helps finding bugs! See the bugs I found 😉 ).

In a more concret way, I have following questions:

First Problem: How should I move/migrate my data to a PSQL DB?

  1. Is there some specific Schema to respect?
  2. Is there some software for it? Is that included in Parse? Should I use MoSQL?
  3. I read that the adapter do not support binary file yet, what is the alternative? External file Adapter?

Second Problem: Should I do that?

My company is entering a phase where we need to have more stable & reliable systems. Parse was and is still great but we may need have stored procedures and that kind of stuff...

I really have this question since few months now: should I rather write my own whateverlanguage (Go, Ruby, Scala) server with a Parse Interface (for backwards compatibility of the clients) and PSQL DB or go on with Parse and PSQL Adapter? Is there some big projects running on Parse-Server and did they move to PSQL?

I'd like to have a honest feedback on these questions and it won't change my opinion on the project: Parse-Server is the best solution to get something up and running in a minimum amount of time (and if my company is still there today it's also because of Parse 😉 🎉 👏 )

@cherukumilli
Copy link
Contributor

cherukumilli commented Dec 22, 2016

@lolobosse
From the recent PR's, I see @kulshekhar worked on some recent postgres changes. I am hoping he can answer your question. I am also interested in the answers to these questions :)

@kulshekhar
Copy link
Contributor

kulshekhar commented Dec 22, 2016

However, I really find it not-well-documented

I should probably have submitted some documentation along with the PRs but my priority was to add as much Postgres support as I could in the limited time I could spare.

As a workaround, looking at the test setup for Travis should give you an idea of how to start using Postgres. If you have any specific questions, you can post a question on StackOverflow and ping me.

Is there some specific Schema to respect?

No. All you need is a running postgres server and database credentials. Parse server takes care of the rest. You might still want to create indices (just like in mongodb) once you've finalized your schema.

I read that the adapter do not support binary file yet, what is the alternative? External file Adapter?

Yes, using an external file adapter would be the way to go.

Should I do that?

Bear in mind that for a long time, Parse used MongoDB very successfully. There are companies now that are built solely around providing 'parse server with mongodb' as a service. If it works for them, I'd say that unless there's a compelling reason, stick with MongoDB.

we may need have stored procedures and that kind of stuff

When you need things like these, take a moment to figure out whether parse server itself is the right option for you. If it is and if you need stored procedures, you'll have to figure out how to access them. Will you maintain another system in parallel? Or will you maintain a patched version of parse server? And so on.

should I rather write my own whateverlanguage (Go, Ruby, Scala) server with a Parse Interface (for backwards compatibility of the clients) and PSQL DB or go on with Parse and PSQL Adapter

This is what I was going to do because I needed Postgres. That was until I realized that some folks had already added quite a bit of Postgres support to parse server. At that point, it was a no brainer. Since parse server + postgres served almost 90% of my requirements, I didn't bother wasting time writing what would have essentially been a parse server clone.

Is there some big projects running on Parse-Server and did they move to PSQL?

I think there are quite a few projects using parse server. I really doubt any of them is using postgres though. I suspect that I'm the only one (the guinea pig) using it in production. Although to be fair, I haven't really tried to find out who is using parse server with Postgres. There may be more but I can't say with any certainty

@hramos hramos closed this as completed Feb 10, 2017
@danepowell
Copy link

danepowell commented Aug 7, 2018

@lolobosse did you ever end up finishing the migration to Postgres? Do you (or anyone else involved in this thread) have advice on how to perform a migration from Mongo to Postgres?

I need to switch a production Parse app from Mongo to AWS RDS or Aurora (Postgres) for financial reasons. I have no idea where to start setting up such a migration, other than to start banging around with MoSQL and see what breaks.

@flovilmart
Copy link
Contributor

I’m not sure migrating the DB would help financially. That being said; if you look into the internals, you can probably move all your data from one DB to the other, using the parse representation.

@lolobosse
Copy link
Author

lolobosse commented Jan 25, 2019

@danepowell I missed your message. Yes we moved to Postgres but dropped Parse 😞 (good old rewrite)

I agree with @flovilmart: not sure that it will better financially however it will be waaay faster ⚡️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants