Difference between revisions of "GSoC2014/Incubator/Storage"
< GSoC2014
(→Project Goals: Extended project description.) |
|||
Line 27: | Line 27: | ||
* Have it pass all existing unit tests | * Have it pass all existing unit tests | ||
* Add new tests, if needed | * Add new tests, if needed | ||
+ | |||
+ | Implementing the backend consists of filling in the following methods for a child of [https://github.com/openstack/oslo-incubator/blob/master/openstack/common/cache/backends.py#L24 BaseCache]: | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |- | ||
+ | ! Method !! Description | ||
+ | |- | ||
+ | | [https://github.com/openstack/oslo-incubator/blob/master/openstack/common/cache/backends.py#L34 __init__] || Given a URL, connects to a client that can communicate with the cache server | ||
+ | |- | ||
+ | | [https://github.com/openstack/oslo-incubator/blob/master/openstack/common/cache/backends.py#L40 _set] || Sets or updates a cache entry | ||
+ | |- | ||
+ | | [https://github.com/openstack/oslo-incubator/blob/master/openstack/common/cache/backends.py#L88 _get] || Returns the value of the given key | ||
+ | |- | ||
+ | | [https://github.com/openstack/oslo-incubator/blob/master/openstack/common/cache/backends.py#L115 __delitem__] || Deletes a key. | ||
+ | |- | ||
+ | | [https://github.com/openstack/oslo-incubator/blob/master/openstack/common/cache/backends.py#L127 _clear] || Flush the cache | ||
+ | |- | ||
+ | | [https://github.com/openstack/oslo-incubator/blob/master/openstack/common/cache/backends.py#L139 _incr] || Increments/decrements the key. | ||
+ | |- | ||
+ | | [https://github.com/openstack/oslo-incubator/blob/master/openstack/common/cache/backends.py#L139 _append_tail] || Appends a list to the given key. | ||
+ | |- | ||
+ | | [https://github.com/openstack/oslo-incubator/blob/master/openstack/common/cache/backends.py#L194 __contains__] || Is this key in the cache? | ||
+ | |- | ||
+ | | [https://github.com/openstack/oslo-incubator/blob/master/openstack/common/cache/backends.py#L221 _set_many] || Sets many keys' value in a single operation. | ||
+ | |- | ||
+ | | [https://github.com/openstack/oslo-incubator/blob/master/openstack/common/cache/backends.py#L253 _unset_many] || Deletes many keys' values. | ||
+ | |} | ||
== Project Nice-to-Haves == | == Project Nice-to-Haves == |
Revision as of 21:05, 14 February 2014
Contents
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