Jump to: navigation, search


Add a New Backend to Oslo.Cache

Difficulty Medium
Topics storage, python, oslo
Mentor Alejandro Cabrera

Oslo Cache provides a simple, Python dictionary-like abstraction over remote object caching. Currently, only a memory backend is implemented. To make this library more valuable, it's be amazing to have a few more backends available so that system operators could choose between them as needed.

With this project, it will be your mission to implement (at least) one new backend.

Assumed Knowledge

  • Basic Python: classes, objects
  • Basic command line prowess

Anything else you need to learn or need to know, we're happy to help with!

Project Goals

  • Create a github repository for the project
  • Implement the new backend
  • Have it pass all existing unit tests
  • Add new tests, if needed

Implementing the backend consists of filling in the following methods for a child of BaseCache:

Method Description
__init__ Given a URL, connects to a client that can communicate with the cache server
_set Sets or updates a cache entry
_get Returns the value of the given key
__delitem__ Deletes a key.
_clear Flush the cache
_incr Increments/decrements the key.
_append_tail Appends a list to the given key.
__contains__ Is this key in the cache?
_set_many Sets many keys' value in a single operation.
_unset_many Deletes many keys' values.

Project Nice-to-Haves

  • Benchmark it - how fast is it?
  • Demonstrate that it works over the network
  • Provide a PyPI package (oslo-cache-X)
  • Write the Docs! Include documentation about how to deploy with it
  • Implement more than one backend
  • Compare multiple backends

Students' proposals