Recommendation for in-memory database

I would like to remove the sql dependency of small pieces of data that I load (almost) every request in a web application. Most of the data is structured by keywords / documents, but a relational solution is not excluded. The data is not too large, so I want to keep it in memory for increased availability.

Which solution would you recommend?

+5
source share
8 answers

The simplest and most widely used keyword keyword storage in memory is MemcacheD . The input page repeats what you ask for:

Memcached - (, ) , API .

. . . API . . , Memcached - .

MemBase.

+6

Redis . .

Django, / - , , (SET views = views + 1 ) .

Redis , , Python:

def seen_user(user, doing, item=None):
    """
    Stores what a User was doing when they were last seen and updates
    their last seen time in the active users sorted set.
    """
    last_seen = int(time.mktime(datetime.datetime.now().timetuple()))
    redis.zadd(ACTIVE_USERS, user.pk, last_seen)
    redis.setnx(USER_USERNAME % user.pk, user.username)
    redis.set(USER_LAST_SEEN % user.pk, last_seen)
    if item:
        doing = '%s <a href="%s">%s</a>' % (
            doing, item.get_absolute_url(), escape(str(item)))
    redis.set(USER_DOING % user.pk, doing)
+6

sql, db , sqlite (. http://www.sqlite.org/inmemorydb.html).

sql, -, /- ?

+3

, H2 - .

+2

: Berkeley DB. Berkeley DB , , . - (NoSQL), SQL API. Berkeley DB -, , ( ), . - e-Retail, Berkeley DB , Amazon.com.

+2

, , , (-, , ). , , . , , , .

, , , . , - , , . , , , .

+1

? ( -)? (, , , , )?

, , , , Redis. - , Tarantool .

0
0

All Articles