I need to serialize a data which requires high performance. Separated thread will be accessing it each second and must to load data to memory. There will be about 1000 - 10000 dictionary-like entries about user sessions (id, sessid, login date). Some data will be frequently updated because login time has some time.
These data will be shared between python server and Django application. I think to use pickle or its faster version cPickle. I also found marshal.
What is the best way to do that? Is cPickle efficient enough? Or maybe marshal?
EDIT: Very important thing is access time. It's going to be a realtime websocket server so I need very low delays. Is it faster to access cPickle data once a second or to connect to database like Redis?