lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thu, Jun 6, 2013 at 1:16 PM, Tim Channon <tc@gpsl.net> wrote:
On 06/06/2013 15:37, Coda Highland wrote:
> On Thu, Jun 6, 2013 at 12:19 AM, Egil Hjelmeland
> <privat@egil-hjelmeland.no> wrote:
>> On 06. juni 2013 05:08, Jorge wrote:
>>>
>>> On 05/06/13 19:07, Egil Hjelmeland wrote:
>>>>
>>>> Suggestion:
>>>
>>> Thanks, added a modified version.
>>> In the hurry to do something with that great project name I forgot you
>>> may want to remove data :)
>>>
>>> Other solution was to add a supported_types.nil = function() return nil
>>> end, and leave the "nil files" in place. Way weird!
>>>
>>>
>>>
>>>
>>
>> Non-trivial suggestion:
>>
>> If I could at runtime choose to have an sqlite database file as an backend
>> as an alternative to the current folders-files-backend, I think the coolness
>> of the product would actually match the coolness of the name...
>>
>>
>>
> Why SQLite? It seems to me a key-value store like gdbm/Tokyo
> Cabinet/Kyoto Cabinet would be a much better fit/
>
> /s/ Adam
>
>

Apart from GPL it is apparently fragile, just trip over the line cord.

This might be of great interest:- sqlite4, which is parallel to sqlite3

"A greatly simplified Key/Value storage engine is used:"

http://sqlite.org/src4/doc/trunk/www/design.wiki

sqlite has a good record on robustness.

Portability, it is still in C, "However, SQLite4 will use more C99
features than did SQLite3, while still striving to maintain
compatibility with popular compilers.

I think the filesystem approach offers another interesting feature: it transparently maps the table to a directory, allowing for easy IPC and debugging by going through that directory and viewing/changing things (especially if you can tell it not to cache, so your changes are reflected immediately). It maps all the variables out nicely for you.

Granted, you could do the same with a database, but then your application needs to know how to access that database, and you won't have the convenient tree structure (unless your app also manages that). That can't be done with SQLite though since only one process can access the database at the time.


--
Sent from my Game Boy.