This repository has been archived on 2018-06-04. You can view files and clone it, but cannot push or open issues/pull-requests.
cassandra-sessions/README.markdown

42 lines
1.4 KiB
Markdown
Raw Permalink Normal View History

2010-05-10 18:30:49 +00:00
cassandra-sessions
==================
This is a session backend for Django that stores sessions in Cassandra
The advantage to using this over other solutions is that your data is persistent
unlike memcached, and Cassandra is designed to store key-value data like
this, so performance is much closer to that of memcached than with a database.
2010-05-12 19:39:31 +00:00
Note: This work was initially based off of [tokyo-tyrant-sessions](http://github.com/ericflo/django-tokyo-sessions) by @ericflo.
2010-05-10 18:34:49 +00:00
2010-05-10 18:42:38 +00:00
Dependencies
------------
2010-05-10 18:51:11 +00:00
* [Lazyboy](http://github.com/ieure/lazyboy/) (Use Ian Eure's version as it supports 0.6.1 of Cassandra)
2010-05-10 18:42:38 +00:00
2010-05-10 18:30:49 +00:00
Installing cassandra-sessions
-----------------------------
2010-05-10 18:51:11 +00:00
1. download the source and run
`python setup.py install`
2010-05-10 18:30:49 +00:00
2. Set 'cassandra-sessions' as your session engine, like so:
2010-05-10 18:51:11 +00:00
`SESSION_ENGINE = 'cassandra-sessions'`
2010-05-10 18:30:49 +00:00
3. Add settings describing where to connect to Cassandra:
2010-05-10 19:01:26 +00:00
`CASSANDRA_POOL = ('127.0.0.1:9160',)
2010-05-10 18:51:11 +00:00
CASSANDRA_SESSION_KEYSPACE = 'Testing'`
2010-05-10 18:30:49 +00:00
4. Create the Keyspace and Column Family in Cassandra:
2010-05-10 19:01:26 +00:00
`<Keyspace Name="Testing">
<ColumnFamily Name="Sessions" CompareWith="UTF8Type"/>
<ReplicaPlacementStrategy>org.apache.cassandra.locator.RackUnawareStrategy</ReplicaPlacementStrategy>
<ReplicationFactor>1</ReplicationFactor>
<EndPointSnitch>org.apache.cassandra.locator.EndPointSnitch</EndPointSnitch>
2010-05-10 18:51:11 +00:00
</Keyspace>`