replace - What is the disadvantage of just using Redis instead of an RDBMS? -
so if example trying implement looks facebook's graph api needs quick , support millions of users, disadvantage of using redis instead of rdbms?
thanks! jonathan
there plenty of potential benefits , potential drawbacks of using redis instead of classical rdbms. different beasts indeed.
focusing on potential drawbacks:
redis in-memory store: data must fit in memory. rdbms stores data on disks, , cache part of data in memory. rdbms, can manage more data have memory. redis, cannot.
redis data structure server. there no query language (only commands) , no support relational algebra. cannot submit ad-hoc queries (like can using sql on rdbms). data accesses should anticipated developer, , proper data access paths must designed. lot of flexibility lost.
redis offers 2 options persistency: regular snapshotting , append-only files. none of them secure real transactional server providing redo/undo logging, block checksuming, point-in-time recovery, flashback capabilities, etc ...
redis offers basic security (in term of access rights) @ instance level. rdbms provide fine grained per-object access control lists (or role management).
a unique redis instance not scalable. runs on 1 cpu core in single-threaded mode. scalability, several redis instances must deployed , started. distribution , sharding done on client-side (i.e. developer has take care of them). if compare them unique redis instance, rdbms provide more scalability (typically providing parallelism @ connection level). multi-processed (oracle, postgresql, ...) or multi-threaded (mysql, microsoft sql server, ... ), taking benefits of multi-cores machines.
here, have described main drawbacks, keep in mind there plenty of benefits in using redis (very fast, concurrency support, low latency, protocol pipelining, implement optimistic concurrent patterns, usability/complexity ratio, excellent support salvatore , pieter, pragmatic no-nonsense approach, ...)
for specific problem (graph), suggest have @ neo4j or orientdb designed store graph-oriented data.
Comments
Post a Comment