1. you could use a simple object for in memory. pro: very simple, con: can 
make your memory explode, you have to invalidate things yourself
2. use one of the in-mem dbs, like memcached or redis etc. pro: it's a db 
with feature, storing stuf in memory, cons: you have to integrate  2 
differnt apis for your storage.
3. what tracker 1 said
4. like nr 2 but using an abstraction like an orm.

Am Mittwoch, 14. August 2013 14:11:45 UTC+2 schrieb bodo:
>
> Thank you for your response
>
> Because I want to use remote server mongodb. So the time to get data from 
> remote mongodb is long. So I want to keep data in memory and push data 
> periodlly to mongo. Any suggests ? 
>
> On Wednesday, August 14, 2013 3:10:59 AM UTC+2, tracker1 wrote:
>>
>>   Depends on what it is you want to actually accomplish...  Honestly, 
>> MongoDB is pretty decent, and if the majority of your active data fits in 
>> memory, those pages in Mongo will be readily available.  I would suggest 
>> starting by targeting mongo directly if that’s your desired back end... 
>> otherwise you will be creating a lot of work against your in-memory copy 
>> that may not work as well as mongo with indexes.
>>  
>>  
>>   
>>  *From:* bodo 
>> *Sent:* Tuesday, August 13, 2013 4:24 PM
>> *To:* [email protected] 
>> *Subject:* [nodejs] Keep data in memory and periodlly push to mongodb ???
>>  
>>  Hi everyone, 
>>  
>> I'm doing a realtime game by javascript and node.js. I want to all the 
>> informations is saved in memory of machine (RAM) and periodly (for example 
>> 10 minutes), it pushs data to mongodb
>> So if you want to search smt, if this thing is not in memory of machine 
>> and I search in mongodb.
>>  
>> So do you have the method or the way to do that ?
>>  
>> Thank you
>>  
>>  
>> -- 
>> -- 
>> Job Board: http://jobs.nodejs.org/
>> Posting guidelines: 
>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>> You received this message because you are subscribed to the Google
>> Groups "nodejs" group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>  
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "nodejs" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to