| From | Sent On | Attachments |
|---|---|---|
| Olivier Lamy | Feb 19, 2012 6:23 am | |
| Daniel Manzke | Feb 19, 2012 11:52 am | |
| Simone Tripodi | Feb 19, 2012 12:47 pm | |
| Daniel Manzke | Feb 19, 2012 1:33 pm | |
| Simone Tripodi | Feb 19, 2012 1:41 pm | |
| Raffaele P. Guidi | Feb 19, 2012 1:59 pm | |
| Olivier Lamy | Feb 19, 2012 3:28 pm | |
| Daniel Manzke | Feb 19, 2012 3:34 pm | |
| Simone Tripodi | Feb 20, 2012 12:31 am | |
| Simone Tripodi | Feb 20, 2012 12:37 am | |
| Simone Tripodi | Feb 20, 2012 12:41 am | |
| Olivier Lamy | Feb 20, 2012 12:55 am | |
| Simone Tripodi | Feb 20, 2012 1:40 am | |
| Olivier Lamy | Feb 20, 2012 2:01 am | |
| Simone Tripodi | Feb 20, 2012 2:06 am | |
| Benoit Perroud | Feb 20, 2012 2:52 am | |
| Simone Tripodi | Feb 20, 2012 5:42 am | |
| Olivier Lamy | Feb 20, 2012 6:04 am | |
| Simone Tripodi | Feb 20, 2012 6:19 am | |
| Benoit Perroud | Feb 20, 2012 6:55 am | |
| Simone Tripodi | Feb 20, 2012 7:14 am | |
| Olivier Lamy | Feb 21, 2012 12:27 am | |
| Raffaele P. Guidi | Feb 21, 2012 12:33 am | |
| Raffaele P. Guidi | Feb 21, 2012 12:55 am | |
| Olivier Lamy | Feb 21, 2012 2:28 am | |
| Daniel Manzke | Feb 21, 2012 2:38 am | |
| Olivier Lamy | Feb 21, 2012 4:55 am | |
| Olivier Lamy | Feb 21, 2012 8:53 am |
| Subject: | [DISCUSS] RFC Server implementation | |
|---|---|---|
| From: | Olivier Lamy (ola...@apache.org) | |
| Date: | Feb 19, 2012 6:23:24 am | |
| List: | org.apache.incubator.directmemory-dev | |
Hello Folks,
I have started to think/hack around having a server implementation to store object in a direct memory cache (something "à la" memcached).
Before discussing about api (fluent or not) having ugly names for methods or not ( :P ). I'd like to share with you my ideas (and get your feedback).
Basically I have something in mind to ease users life: * retrieve this object with this key (sync and async methods) * store this object with this key and with this serializer. (sync and async methods) * delete an entry (sync and async methods)
The de/serialization is done on client side and exchange are done tru REST (json) over http(s). (Maybe adding later too a "raw" servlet with parameters passed as headers)
REST Api ideas.
retrieve object : GET on ${webPath}/directMemory/retrieve/${key}
return json content if found
{"DirectMemoryRS":{"key":"101","cacheContent":"Zm9vIGJhcg=="}}
cacheContent is byte[] from serialization.
If no cache entry found for the key, http code returned will be 204 (No Content) but client api will receive a DirectMemoryCacheResponse object with found field to false.
store object
PUT on ${webPath}/directMemory/store
json content posted
{"DirectMemoryRQ":{"key":"101","expiresIn":123,"cacheContent":"rO0ABXNyACtvcmcuYXBhY2hlLmRpcmVjdG1lbW9yeS5zZXJ2ZXIuY29tbW9ucy5XaW5l5dYKhxyAjeECAAFMAARuYW1ldAASTGphdmEvbGFuZy9TdHJpbmc7eHB0AAhCb3JkZWF1eA==","serializer":"org.apache.directmemory.serialization.StandardSerializer"}}
(serializer is for information and if available on server classLoader could be use for a toString in the web ui).
delete an entry:
DELETE on ${webPath}/directMemory/delete/${key}
200 if ok, 204 if the key was not found.
Goodies: the webapp will have an ui to display some figures on cache hit ratio, number of stored elements etc...
Let me know if that makes sense and I can start push some hack :-)
-- Olivier Lamy Talend: http://coders.talend.com http://twitter.com/olamy | http://linkedin.com/in/olamy
PS: FYI, Benoit has proposed a talk with myself to devoxxfr (http://devoxx.fr/) and it has been accepted (wOOT really cool :-) ). We hope to see you there :-).





