Well, elasticsearch will definitely be slower than redis, by how much its
hard to say. Realtime get is pretty fast, but still goes to disk.
Versioning can be used to implement atomic updates. You can get the
document you want, change it, and try and index it back with the version you
got, if it succeeds, all is well, if not, you need to retry. Note though,
that the whole document needs to be reindexed...
On Tue, Oct 18, 2011 at 8:46 AM, datadev firstname.lastname@example.org wrote:
Yes I think using an ES index in association with version should be
able to implement a redis-style list.
In regards to #2 (implementing an atomic counter), according to
http://www.elasticsearch.org/guide/reference/api/index_.html - this
seems to imply that it is only possible to pass in a REPLACEMENT
version value for the current version value, instead of a positive or
negative # to that be added to the existing version number. Or, is
there a way in which an increment by X (EG: +200, -150, etc...) can be
On Oct 17, 11:12 am, Karussell tableyourt...@googlemail.com wrote:
the third one could be handled with one index (instead of the list)
and using the _version field to avoid problems (can be used to solve
point 2 as well) when adding or deleting items and sort against a
timestamp or similar.
the other mentioned points are probably better implemented with redis
(there are no transactions in ES) ... you could try point 1 with ES:
but even with a ids-request
100k req/sec seems to be high of course all depends on a lot things
e.g. putting it all into RAM ... let me know how it compares !
On 17 Okt., 08:08, karmi karel.mina...@gmail.com wrote:
In all three points you mention: GET, INCRBY, atomic LPOP, I'd
consider Redis superior to ElasticSearch.
I wouldn't get rid of Redis just to "simplify the stack". There's
always something where Redis fits as a glove.
(And I love ElasticSearch as much as Redis, possible more
On Oct 16, 11:20 pm, datadev n...@adinfocenter.com wrote:
I am currently considering replacing redis with elasticsearch to
simplify the stack and have run into the following 3 use cases:
- I am currently using redis for caching. Redis is benchmarked at
around 100,000 GETs per second when querying by key (
topics/benchmarks). How does ES stack in terms simple GET by _id
performance (assuming real-time get)?
- I am currently using redis to store counters (EG: 'foo = foo +
1280' types of commands). Is there any way to implement the concept
counters in ES with support atomic updates (maybe using the script
- I am currently using redis to store lists for queuing use cases
which items are added to a list and then popped off). Can something
like that be effectively implemented in ES?
Thanks and keep up the great work!