[erlang-questions] Guidance to a cache mechanism

Dmitry Kolesnikov <>
Tue Oct 30 20:21:19 CET 2012


You can check my implementation of same issue...

- Dmitry

On Oct 30, 2012, at 1:08 PM, Maruthavanan Subbarayan wrote:

> 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
> _______________________________________________
> erlang-questions mailing list
> http://erlang.org/mailman/listinfo/erlang-questions

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20121030/1c7031b3/attachment.html>

More information about the erlang-questions mailing list