Jeffrey Drake | 5 Sep 2012 09:53
Picon
Gravatar

How to pick a backend


I just finished putting together a sample website that is a sort of demo from our old site using yesod and after reading the relevent portions of the book and some other difficulties I have the equivalent of a news listing main page and an arbitrary named page retrieve system backed by SQLite in just under three hours.

But I want to think towards deployment in not too long of time, which means I have to consider a few things. I don't think SQLite is appropriate for long term usage. I have considered Postgres and Mysql, but I also noticed persistent has a mongodb backend as well.

I appreciate Postgres for its good database properties, but both it and mysql are a little more difficult to configure (although in fairness, mysql is already configured on our server). But I observed that Mongodb is extremely simple to configure.

The only question then becomes to me is what choice to pick? I really want something I can easily backup and restore which currently I feel good with SQL based, but I haven't explored other options.
tazjin | 5 Sep 2012 13:45
Picon
Gravatar

Re: How to pick a backend

You should prefer PostgreSQL over MySQL if you stick with SQL-based DBs (there are tons of reasons for this,
you can easily google them). As far as I know, keter (the Yesod deployment tool) can automatically create
the PostgreSQL DB for you.

What OS are you deploying to?

Also important: What kind of traffic are you expecting? MongoDB is relatively easy to scale for high
traffic sites.

On Sep 5, 2012, at 9:53 AM, Jeffrey Drake <jptdrake@...> wrote:

> 
> I just finished putting together a sample website that is a sort of demo from our old site using yesod and
after reading the relevent portions of the book and some other difficulties I have the equivalent of a news
listing main page and an arbitrary named page retrieve system backed by SQLite in just under three hours.
> 
> But I want to think towards deployment in not too long of time, which means I have to consider a few things. I
don't think SQLite is appropriate for long term usage. I have considered Postgres and Mysql, but I also
noticed persistent has a mongodb backend as well.
> 
> I appreciate Postgres for its good database properties, but both it and mysql are a little more difficult
to configure (although in fairness, mysql is already configured on our server). But I observed that
Mongodb is extremely simple to configure.
> 
> The only question then becomes to me is what choice to pick? I really want something I can easily backup and
restore which currently I feel good with SQL based, but I haven't explored other options.

geoff | 5 Sep 2012 15:11
Picon

Re: How to pick a backend

I am an amateur with Yesod/Haskell at best; I made my first Yesod app with a mongo backend; and while mongo itself was easy to configure; getting everything running smoothly did not go as smooth as sqlite or postgres, for me.


My next app was using postgres, and I really went with it because it appears to be the most well-vetted in conjuction with Yesod, and Keter (Michael's awesome deployment tool) works with postgres.

It was a much smoother experience for me, and I definitely plan on using postgres as the default for any further yesod work I do.

Barring any other information (like a crazy-heavy-traffic service), I would go with postgres, if for no other reason than you are likely to get better support on here if you need it, since it seems to be what the strongest contributors are mostly using.



On Wed, Sep 5, 2012 at 7:45 AM, <tazjin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
You should prefer PostgreSQL over MySQL if you stick with SQL-based DBs (there are tons of reasons for this, you can easily google them). As far as I know, keter (the Yesod deployment tool) can automatically create the PostgreSQL DB for you.

What OS are you deploying to?

Also important: What kind of traffic are you expecting? MongoDB is relatively easy to scale for high traffic sites.

On Sep 5, 2012, at 9:53 AM, Jeffrey Drake <jptdrake-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

>
> I just finished putting together a sample website that is a sort of demo from our old site using yesod and after reading the relevent portions of the book and some other difficulties I have the equivalent of a news listing main page and an arbitrary named page retrieve system backed by SQLite in just under three hours.
>
> But I want to think towards deployment in not too long of time, which means I have to consider a few things. I don't think SQLite is appropriate for long term usage. I have considered Postgres and Mysql, but I also noticed persistent has a mongodb backend as well.
>
> I appreciate Postgres for its good database properties, but both it and mysql are a little more difficult to configure (although in fairness, mysql is already configured on our server). But I observed that Mongodb is extremely simple to configure.
>
> The only question then becomes to me is what choice to pick? I really want something I can easily backup and restore which currently I feel good with SQL based, but I haven't explored other options.


Jeffrey Drake | 5 Sep 2012 17:16
Picon
Gravatar

Re: How to pick a backend

FreeBSD 9 and it is very little traffic. We are a student run server that could be described as obscure.

On Wednesday, September 5, 2012 7:45:51 AM UTC-4, Vincent Ambo wrote:

You should prefer PostgreSQL over MySQL if you stick with SQL-based DBs (there are tons of reasons for this, you can easily google them). As far as I know, keter (the Yesod deployment tool) can automatically create the PostgreSQL DB for you.

What OS are you deploying to?

Also important: What kind of traffic are you expecting? MongoDB is relatively easy to scale for high traffic sites.

On Sep 5, 2012, at 9:53 AM, Jeffrey Drake <jptd...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

>
> I just finished putting together a sample website that is a sort of demo from our old site using yesod and after reading the relevent portions of the book and some other difficulties I have the equivalent of a news listing main page and an arbitrary named page retrieve system backed by SQLite in just under three hours.
>
> But I want to think towards deployment in not too long of time, which means I have to consider a few things. I don't think SQLite is appropriate for long term usage. I have considered Postgres and Mysql, but I also noticed persistent has a mongodb backend as well.
>
> I appreciate Postgres for its good database properties, but both it and mysql are a little more difficult to configure (although in fairness, mysql is already configured on our server). But I observed that Mongodb is extremely simple to configure.
>
> The only question then becomes to me is what choice to pick? I really want something I can easily backup and restore which currently I feel good with SQL based, but I haven't explored other options.


Gmane