HTTP: All content tagged as HTTP in NoSQL databases and polyglot persistence
A two-part article by Simon Buckle introducing the Riak HTTP API and using it with Riak pluggable Memory back-end as a caching service for a web application. Somehow I missed that Riak has a pluggable memory (non-persistent) storage. The only missing piece for making it a better caching solution would be having the option to set a per-key expiry/time-to-live (TTL) value. It might be interesting to experiment with using
Last-Modified HTTP headers to simulate this behavior. Has anyone tried it?
Original title and link: Quick Guide to Riak HTTP API and Using Riak as Cache Service ( ©myNoSQL)
This Apache module uses a rule-based engine (based on regular expression parser) to map URLs to REDIS commands on the fly. It supports an unlimited number of rules and can match on the full URL and the request method (GET, POST, PUT or DELETE) to provide a very flexible option for defining a RESTful interface to REDIS.
Original title and link: Apache Mod_redis ( ©myNoSQL)
Written in C, supporting HTTP 1.1 pipelining, using only
POST and making Redis commands part of the URI, with output in multiple formats (json, bson, txt, raw), ready to be forked or used on GitHub
So, MongoDB presented us with two problems:
- When sharding it, we can’t even use the basic security that it supports.
- The basic security that it offers is not reasonable for allowing external servers to connect to MongoDB.
Let’s just review:
you have this sharding setup:
on top of that add some Nginx
- switch from using a binary protocol to HTTP
Doesn’t sound easy or out of the box anymore.
Keep in mind that Redis-backed queues is one very often cited use case for Redis.
Original title and link for this post: Presentation: RestMQ - HTTP/Redis based Message Queue (published on the NoSQL blog: myNoSQL)
The more mature the NoSQL solutions grow the more they realize the importance of the protocols they are using. And more and more NoSQL projects try not to repeat the LDAP protocol history.
I’d say that the flagship NoSQL projects that understood the benefits of the protocol simplicity are CouchDB, the relaxed document database and SimpleDB, Amazon’s key-value store, both of them looking like being built on the web and for the web (note: as one of the MyNoSQL readers correctly pointed out, the SimpleDB HTTP use is quite incorrect though). But they are definitely not the only one.
Riak, the decentralized key-value store, is also using JSON over HTTP. Not only that but the Basho team, producers of Riak, have decided lately to completely drop their custom protocol ☞ Jiak.
Terrastore, the consistent, partitioned and elastic document database, being quite young, made its homework and debuted as HTTP/JSON friendly.
Neo4j, the graph database, has added recently a RESTful interface, which even if not available in the Neo4j 1.0 release is making it accessible for a new range of programming languages.
There are some NoSQL solutions that are still using custom protocols. Redis has defined its own protocol, but made sure to keep it “easy to parse by a computer and easy to parse by a human”. Redis also got some help from 3rd party tools/libraries to make it even more accessible through HTTP/JSON: RedBottle, a REST app for Redis and Sikwamic, a Redis over HTTP library.
GT.M, a NoSQL solution about which you can learn more from the Introduction to GT.M and M/DB or these two talks at FOSDEM: GT.M and OpenStreetMap and MDB and MDBX: Open Source SimpleDB Projects based on GTM, has also realized the importance of the protocol and is now introducing ☞ M/Wire, which was inspired by the simplicity of Redis protocol.
MongoDB is another example of a NoSQL storage that uses a custom wire protocol. While the MongoDB ecosystem already includes a lot of libraries, I’d really love to see Kristina’s ☞ Sleepy.Mongoose moving forward (nb: Krsitina, I’m also pretty sure that Sleepy.Mongoose can get much nicer RESTful URIs too ;-) ).
And the story can go on and on, but the lesson to be learned should be quite obvious: the simpler and the easier your protocol is the more accessible your data will be and the easier it will be for the community to come up with (innovative) projects and libraries. The NoSQL libraries page should give you a feeling of what NoSQL solutions are using simple protocols and which are not.
Starting a couple of days ago, there is a web interface for Redis too: Redweb ☞. Built on top of the Bottle Python web framework, this initial version supports the following features:
- adding key-values
- append lists and sets
- add/delete elements from sorted sets
- check length and cardinality
- get random elements
Ted Nyman, the creator of Redweb, has also brought us RedBottle, a REST-style app for Redis. Anyway, as for the other Redis over HTTP solution, I believe there can be some improvements in terms of the RESTfulness.