Re: [mongrel2] sqlite config file
- From:
- Zed A. Shaw
- Date:
- 2010-12-20 @ 17:16
On Mon, Dec 20, 2010 at 07:57:00PM +0530, deepak kannan wrote:
> hi,
> i have not been consistently following mongrel2 and i am not a sysadmin so
> forgive me is this sounds stupid.
Cool, it's not stupid.
> Seems to me that it is like saying i will checkin a binary rather than the
> src (not a perfect anology, but in both the cases it is not git friendly)
Nope, you'd check in whatever source you use to generate the sqlite
file. Same way you check in the .c files for other software you build.
That's how my deployment of http://hype.la/ is done.
> I see how a sqlite config file will be better:
> 1) can have constraints - a txt file will have a config check
> 2) one file to deploy - can just do a rsync
> 3) any other benefits?
The main benefit is that you can then control mongrel2 from any language
you're using and integrate it with your web framework. If you look at
my little Lua framework Tir:
http://tir.mongrel2.org/
You'll see how I have Tir read the routes and configuration it needs
from the sqlite config for mongrel2. This makes it so you don't have to
duplicate configuration and potentially get it wrong.
--
Zed A. Shaw
http://zedshaw.com/
Re: [mongrel2] sqlite config file
- From:
- Daniel Huckstep
- Date:
- 2010-12-20 @ 17:16
Sure you can't diff the sqlite file directly, but the first step in
configuring Mongrel2 is the text based config file:
http://mongrel2.org/doc/tip/docs/manual/book.wiki#x1-240003.3
You can keep this in git (as you said) and diff it no problem.
Another bonus with the sqlite system is you can easily change it
programmatically. Messing with any "free-form" text based file is way more
of a pain in the ass than just running some SQL queries.
- Daniel
On Mon, Dec 20, 2010 at 7:27 AM, deepak kannan <kannan.deepak@gmail.com>wrote:
> hi,
> i have not been consistently following mongrel2 and i am not a sysadmin so
> forgive me is this sounds stupid.
>
> i just read zedshaw's blog:
> http://sheddingbikes.com/posts/1286736953.html
>
> and about the sqlite config file. It is a binary format, if it is a text
> file we can see the diff on the git cli/ui.
> Seems to me that it is like saying i will checkin a binary rather than the
> src (not a perfect anology, but in both the cases it is not git friendly)
>
> I see how a sqlite config file will be better:
> 1) can have constraints - a txt file will have a config check
> 2) one file to deploy - can just do a rsync
> 3) any other benefits?
>
> Would it be a good idea to check the a txt file into git and as a deploy
> step create/modify a sqlite file.
>
> cheers,
> deepak
>