[erlang-questions] Guidance to a cache mechanism

Maruthavanan Subbarayan maruthavanan_s@REDACTED
Tue Oct 30 12:08:51 CET 2012


Hi,
I have to develop a caching queue, which also should should after a expiry time.
I may have around 500+ messages which may come in a second. Each message might contain 100-200 bytes.
So I have designed the system like below.
1. Queue would be a gen server.2. All messages which would come on same second would be stored in state of the gen_server like a record {datetime(),[<list of messages>]}3. When the time differs, I would insert the above record to ets table and update the state of gen_server.4. There would be a timer running timer:send_interval which would message timeout the gen_server for every second, when this message is received, then gen_server would delete the ets table according to expiry configured.
I was looking on some guidance to check if the above is fine and with with stand the performance. I am foreseeing maximum expiry would be around 60 minutes.
Thanks,Marutha 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20121030/f1a8b3f7/attachment.htm>


More information about the erlang-questions mailing list