UnQLite - An Embeddable NoSQL Database Engine
unqlite.org
unqlite.org
I understand that NoSQL literally means "no SQL," but typically it's a buzzword reserved for unconventional datastores used under heavy distribution.
Maybe you'd want a local embedded "NoSQL" to act as a local datacache? But then for that use case why create an impedance mismatch with the central datastore by rolling your own?
Jx9? So wait, I need another language to interact with the thing that's already embedded directly within my program?
Local offline data analysis? Now that makes sense. Does this have intelligent/optimized paging mechanisms? I have a feeling not, since the author seems to be couching this as an alternative to sqlite for people who like NoSQL.
I'd sincerely love to hear more about what's motivating this project. Was it just for yucks, or is there some problem that the author(s) needed to solve that wasn't well-solved by another tool?
Serverless NoSQL embedded datastore aren't really that unusual. BerkeleyDB, Tokyo Cabinet, LevelDB are all commonly used serverless NoSQL.
When I think of NoSQL, I think of something like MongoDB or Cassandra which are designed to handle tons of data under heavy load. When I think of BerkeleyDB and friends, I think local persistence. It's a true statement that these too are NoSQL stores, but, at least for me, they're not of the variety that first comes to mind.
Whether or not it's useful to myself or this community, it's something which someone very intelligent spent a significant amount of time to build. I'd argue that its usefulness is unrelated to how interesting it is. It genuinely makes me want to know more about the author(s) and what their motivation was.
But yeah, requiring a new obscure language pretty much obliterates any reason you'd want to use this. Lua is fast, popular, made for this exact use case and already used by Redis.
Like I said elsewhere, to me NoSQL tends to mean "big, distributed storage thing that isn't RDBMS, usually with an emphasis on horizontal scalability." Others have said correctly that some also take it first to mean schemaless and relax the "big" requirement. However I'm still confused on what value a general-purpose "schemaless" datastore provides in an embedded context. I write schemaless in quotes there because there's still an impedance mismatch between the format in which your application works with and the format in which the datastore works.
All of these rely on some general-purpose abstraction. But your application, if designed properly, probably makes use of a number of varying data structures. What are you gaining by pushing all of these through some abstraction? Assuming that all you're after is simple persistence, I have to ask - is writing data to disk really that hard?
That said, I've used local persistence libraries plenty, usually as a persistent local cache, and/or as a tool to enforce a schema which allows for data migration between constantly updating versions of software.
I would be more inclined to simply have my object structure in memory, using a more convenient high-level language, and do a load/dump from .json.gz files as needed. It's fast enough, and worst case scenario, I can backup/extract and read/write in any number of programming languages.
If you need multiple records, that may be easier, having an index, and using line delimited flat json structures can work as well... (breaking on \n)
This really seems like an also ran, where you could have abstracted out an SQLite db with a single table of (key VARCHAR(100) PRIMARY KEY, value VARCHAR(4000)) or something similar.
Since the Jx9 language is fully embedded (even stated as " All C source code for UnQLite and Jx9 are combined into a single source file."), they seem to contradicting their own licensing. The resulting library would also retain the copyleft SPL license.
The base code may be BSD, but incorporating the whole database into your code infects it with their SPL too.
Quote http://jx9.symisc.net/downloads.html
> Request access to the Jx9 source tree.
I think this post will clarify the license issues http://unqlite.org/forum/note-on-the-licensing-situation
http://www.reddit.com/r/programming/comments/1etfxi/sqlite_n... was heavily downvoted for saying its an order of magnitude faster than SQLite
http://www.reddit.com/r/programming/comments/1etkix/unqlite_... raises concerns about the license, and there's a Global Lock in there too? The scripting performance gives cause for pause too.
I love the description of the scripting language as "Turing complete" based on "JSON". That is the first time I have ever heard turing complete used to market a programming language!
The scripting language is incredible, I have never seen a more verbose way to program. It is a scripting language, yet seems to combine JSON, PHP and C standard library functions with C type casting. Look at the samples: http://unqlite.org/jx9_samples.html
I am speechless, the description of the project is the most vacuous collection of buzzwords imaginable. "Built with a powerful disk storage engine which support O(1) lookup." "Support Terabyte sized databases." Of course with a global lock and after taking a look at the scripting language I have reason to doubt the claims made
Or maybe not: http://stackoverflow.com/a/7580013/15721 ;) )
https://code.google.com/p/leveldb/
It's also well engineered (written by some of the best Google engineers) and well supported.
Why use something new with no apparent benefits? (and a lot of drawbacks)
http://en.wikipedia.org/wiki/Berkeley_DB
http://en.wikipedia.org/wiki/Kyoto_Cabinet
Edit: For extra points, read this: http://www.aosabook.org/en/bdb.html
There are some decent benchmarks put out by the mdb guys here: http://symas.com/mdb/microbench/ .
> UnQLite is 100% hand-coded, written in ANSI C, Thread-safe, _Full reentrant_ ...
It also uses its own scripting language
> [jx9] uses a clean and familiar syntax similar to C, JavaScript and JSON
The copy on this site leaves me puzzled.
This is useful for small projects that don't need the power of a behemoth like MongoDB and want to be installable by a simple git-clone + npm install
I am very interested in feedback on it! https://github.com/louischatriot/nedb
This UnQLite developer is a first-class tool.
In this case though, it's all embedded so I don't gain any of the benefits.
A good example would be something like an address book data store. Especially if you want it to be dynamic so that the user can add/remove fields (e.g. allowing the user to attach as many phone numbers as they like to the contact, rather than just a static 5 numbers). If you have to implement this in SQLite, then you have to develop the schema for it, and the (de)serialization code. With a document-store, you can just do something like say "store these fields" and you're done with it.
| giving up ACID (yes I know this has it)
If you know that this has ACID, then why are you talking about giving up ACID? The fact that many NoSQL implementations give up ACID doesn't have any bearing on this discussion.It seems this developer just blatantly ripped off the exact name Hipp was planning to use. He also ripped off some of the core SQLite code (the VFS, etc.), which is legal to do since SQLite is in the public domain, but still...
Not cool.
It would be good if you can make it clear on your website, somehow, that yours is an unaffiliated project. Otherwise, people might go complaining to me when they find bugs in your code. (Don't laugh - that sort of thing happens a lot.)
Other than that, you are welcomed to use the name.
You might want to have a look at the LSM storage engine that Dan Kennedy is working on for SQLite4. It is faster than the clunky and dated B-Tree used by SQLite3. It is also faster than LevelDB. And it supports nested transactions, with rollback. And concurrency. And it is more NAND-flash friendly. See http://www.sqlite.org/src4/timeline for the latest code.
http://en.wikipedia.org/wiki/Dbm#Successors
I'm yet to see a good replacement to Kyoto cabinet both in terms of ease of use and performance. I feel it'd be better energy to pick up kyoto cabinet and maintain it than re-write something from scratch.
Although I'm not sure how difficult it would be to get a license, the author now works for google and doesn't seem to answer to that email (when asking technical question anyway - offering money might get a different reaction).
Can anyone recommend one?
The default BLOB limit is around 1GB.
Where and how would you use it? What, if anything, do you currently use in its place? If nothing, is there something you could use instead? Why is it better than a serializing your own domain model (assuming you have a domain model), or other alternatives?
These are all the things I'm used too using in MongoDB, I don't want to go back to SQL type databases. I thought I saw a SQLite driver that mimicked a MongoDB like system but I can't seem to find it.
Would something like this fit the bill? http://www.db4o.com/s/monodb.aspx
Good write up about Object Serialization vs. Database Performance here using protobuf.net. http://jakemdrew.wordpress.com/2011/11/01/object-serializati...
I'm starting to think you're right. Maybe a traditional serialized object store is the way to go.
exactly what you wanted.
It's a real question because I haven't actually used them. SQLite is fine, but if you don't need sql they probably fare better.
Of course, neither of these systems have indexing. If you want to use them directly, you have to organise your data so that you can translate your queries into range queries on an ordered set. The FoundationDB guys talk about this here: http://foundationdb.com/documentation/beta1/data-modeling.ht...
from sqliteshelf import SQLiteShelf
d = SQLiteShelf("filename.sdb", "tablename")
# now use d like any other dictionary, but this one has
# persistent storage
https://github.com/shish/sqliteshelfI can't wait for the day malloc appears on a page with bullet points citing all the latest buzzwords.
https://github.com/stochastic-technologies/goatfish
It also supports indexing on arbitrary fields and is only a few lines of code. It did come in very handy.
It's unfortunate that it's called UnQLite. Richard Hipp, the creator of SQLite is now involved with the UnQL specification[1], which looks unrelated to this. In fact, there's an interview where Hipp states his plans to make an UnQlite[2], which makes this, intentional or not, a namespace grab.
I'm sure it's much more than that, but one wonders where this stacks up compared to existing solutions.
http://www.infoq.com/news/2011/08/UnQL
If that's the case, I'm surprised there's no obvious link to UnQL, so people know they're building off previous ideas. The article says Richard Hipp was planning on building a UnQLite embedded database; the website, though, says the sole developer is not Richard Hipp.
(Keep clicking "more" in my comment history for detail)
Unfortunately the pitch is hitting some of the wrong notes by being a bit loose with the truth in some of the narrative (e.g. implies that Berkeley DB doesn't have concurrency or transactions, and claims of significant benchmark superiority with no benchmarks at all to back it up), not to mention the buzzword soup on a page and for a product that is targeted at buzzword-adverse developers.
Someone should write a android/java wrapper for it in the same way Google has a built in wrapper for sqlite.
http://code.google.com/p/android/issues/detail?id=10127
and SQLite can corrupt databases (for sure back in 2010, with some discussion on whether or not this is still an issue)
http://code.google.com/p/android/issues/detail?id=8427
Combined, this means the db file gets damaged (usually manually repairable) so the Android OS just deletes it.