Closed WardCunningham closed 8 years ago
Very interesting.
Previously we have talked about giving each of the page storage systems their own project/package. And, I still think this is the way to go, and it would make a lot of sense for the LevelDB package to use this pre-built binaries package, together with the LevelUP package.
Just looking at this again. Not sure about the pre-built binaries, they don't appear to have been updated since April.
Moving the storage systems to their own project/package looks to work nicely, as does adding testing, but does have a longer configuration --database '{"type": "wiki-storage-leveldb/lib/leveldb"}'
. Would be quite nice to just use --database '{"type": "leveldb"}'
but...
I discussed this briefly with @nrn a few months ago. My concern at the time was scary error messages for the optional dependency. He confirmed that a separate package might save time and avoid error messages. But wouldn't we get the same error messages trying to build the dependent?
My plan that I never got around to was not depend on it at all, its on the user to install their db driver, then type is the require string ('wiki-leveldb').
In 0e6d4d85ba0877f102f67b68e3d1fec0853556c7 if the database type
parameter does not start with a .
the type is prefixed with wiki-storage-
in the construction of the package name.
I think this makes sense, so the type parameter is simply the database type and does not need to be concerned by internal package names. Also should make things simpler adding support for database URLs, in a PaaS variant of wiki-node.
This project takes an optional dependency on level. This leads to slower installs and sometimes scary red output from npm install. It also means an install requires c build infrastructure, not necessarily a given.
The DAT project has recently switched to pre-built binaries for LevelDB to much cheering. This makes me wonder if we want to do likewise. This is the project that makes the binaries:
https://github.com/mafintosh/node-leveldown
Another approach would be to make page storage systems be their own projects.