2 ms·
This claim seems completely specious: With a config file you have to hunt around for the right stanza, type in the right exact change, restart the server, and
by cageface 16y ago
This claim seems completely specious:
With a config file you have to hunt around for the right stanza, type in the right exact change, restart the server, and pray it works. With SQL you can actually query the database, and run updates (then pray that works) which are much easier to get right and do.
With apache, I make an edit, check the syntax with apachectl configtest, then restart if the syntax checks out. The kinds of errors that get by the syntax check (bad regex in rewrite rule, typo in a host name etc) are just as likely in SQL. Text files allow me to use the same version control tools, text editors etc I use for the rest of development. Deployment is just a matter of copying a simple text file around etc.
Putting this all in SQL is a solution in search of a problem.
- zedshaw 16y agoNope, it's a different solution to the same problem. Like you said, if they're equivalent solutions, yet the sqlite3 one is simpler (code is smaller by far) and has other advantages (migrations, tooling, schema) then sqlite3 wins. Also, I still stand by that getting a SQL update correct is much easier than editing an apache config file. Only The Spaghetti Monster knows how Apache configs actually work (and he works for Microsoft).
- cageface 16y agoThey may be equivalent in terms of functionality, but I'm having a very hard time guessing how they might be equivalent in ergonomics. For instance, how would you represent something like this in SQL? http://topfunky.net/svn/shovel/nginx/conf/nginx.conf http://topfunky.net/svn/shovel/nginx/conf/nginx.conf
- zedshaw 16y agoOhhhhhh, I see you want huge swathes of commented out sections, bizarre syntax for routing, and lots of nesting that makes no sense and has lots of repetition. I'll get right on that. Seriously though, SQL's been proven capable of doing all of this, and for the half-assed turing tarpit if-statements in these files you'll get something better. I'm aiming for Lua or similar to let you really control it. But if your worry is that there will be some monster data structure you have to understand and work with manually in order to do anything then have no fear, you will get good tools.