The problem is that you cannot use ram. That is because you may have more 
than one process and even if you have s ingle process, the web server may 
restart it. It needs to be stored in file (in that case I'd suggest a 
shared db) or some external cache (for example redis).

Massimo

On Friday, 16 March 2012 10:10:54 UTC-5, Carlos wrote:
>
> Thanks Bruce.
>
> I require to share (set, get, update, delete) only a small chunk of data, 
> is this at all possible with web2py?.
>
> Can Massimo or some of the other web2py experts comment on this?.
>
> Thanks again.
>
>
> On Friday, March 16, 2012 7:14:50 AM UTC-6, Detectedstealth wrote:
>>
>> For keeping things in memory and being able to update the objects in real 
>> time, cache.ram and memcache I think are out of the question because I 
>> believe they both store a specific state of the object in memory (no update 
>> options). I have no idea about redis.
>>
>> However I have been looking for the exact same thing for my project where 
>> I have a binary tree of 100,000 members that I need to update and access in 
>> real-time. I think this will require something custom as this isn't really 
>> how web2py works.
>>
>> On Fri, Mar 16, 2012 at 6:05 AM, Carlos wrote:
>>
>>> Thanks Roberto.
>>>
>>> But I'm looking for something more generic to web2py, which works on 
>>> both my production environment (ubuntu with uwsgi) and my local environment 
>>> (windows with rocket), and hopefully other production configurations (with 
>>> no uwsgi processes) if necessary.
>>>
>>> Is there such a thing in web2py?, will cache.ram or memcache or redis be 
>>> the solution?, or another approach is recommended?.
>>>
>>> Thanks!
>>>
>>>
>>> On Thursday, March 15, 2012 1:46:33 PM UTC-6, Roberto De Ioris wrote:
>>>>
>>>>
>>>> > Hi,
>>>> >
>>>> > My production environment is: latest web2py trunk, ubuntu 10.04,
>>>> > postgresql
>>>> > 8.4, nginx, uwsgi.
>>>> >
>>>> > I need to have data shared (not cached for certain time) across the 
>>>> uwsgi
>>>> > processes.
>>>> >
>>>> > Currently I'm accessing such data via db select, but I'm wondering if
>>>> > there's a faster ram method (which auto-clears when restarting uwsgi
>>>> > server), with no need to access the database.
>>>> >
>>>> > Is cache.ram or memcache or redis what I need?, preferably something
>>>> > simple
>>>> > to setup.
>>>> >
>>>> > Note that I do not need to cache anything for certain time, but 
>>>> instead
>>>> > share data (set/get common data) across my uwsgi processes.
>>>> >
>>>> >
>>>>
>>>> dict-based:
>>>>
>>>> http://projects.unbit.it/**uwsgi/wiki/CachingFramework<http://projects.unbit.it/uwsgi/wiki/CachingFramework>
>>>>
>>>> queue-based:
>>>>
>>>> http://projects.unbit.it/**uwsgi/wiki/QueueFramework<http://projects.unbit.it/uwsgi/wiki/QueueFramework>
>>>>
>>>> raw-memory:
>>>>
>>>> http://projects.unbit.it/**uwsgi/wiki/SharedArea<http://projects.unbit.it/uwsgi/wiki/SharedArea>
>>>>
>>>>
>>>> -- 
>>>> Roberto De Ioris
>>>> http://unbit.it
>>>>
>>>>
>>
>>
>> -- 
>> -- 
>> Regards,
>> Bruce Wade
>> http://ca.linkedin.com/in/brucelwade
>> http://www.wadecybertech.com
>> http://www.warplydesigned.com
>> http://www.fitnessfriendsfinder.com
>>  
>

Reply via email to