<div><div dir="auto">Hi Vans</div></div><div dir="auto"><br></div><div dir="auto">I always ask first before re-implementing the wheel. The link is very good (did my home work and read almost all papers on the subject before asking).</div><div dir="auto"><br></div><div dir="auto">@Vans: thanks for implementation hints.</div><div dir="auto">What do you suggest for persistency? Is mnesia capable of handling millions terms?</div><div dir="auto"><br></div><div dir="auto">Best</div><div dir="auto">/Frank</div><div><div class="gmail_quote"><div dir="ltr"><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_6619496175321963977ydpf6d7904yahoo-style-wrap" style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:13px"><div></div>
        <div>Why dont you write your own, since this is a special use case anyways that has a ton of implementations, there is no way youl find an implemenation that will fully satisfy you. Its quite simple too, <a href="https://paulcavallaro.com/blog/hashed-and-hierarchical-timing-wheels/" rel="nofollow" class="m_6619496175321963977enhancr_card_6085030597" target="_blank">Hashed and Hierarchical Timing Wheels</a>, scheme #2 here will be VERY performant on erlang.  an ordered_set mnesia table, using dirty_next to get the first element each 1-10ms to check if a timer is ready to pop. Then spawn a new process and pass the event for handling to it.</div><div><br></div><div id="m_6619496175321963977ydpbd5762fbenhancr_card_6085030597" class="m_6619496175321963977ydpbd5762fbyahoo-link-enhancr-card m_6619496175321963977ydpbd5762fbyahoo-link-enhancr-not-allow-cover m_6619496175321963977ydpbd5762fbymail-preserve-class m_6619496175321963977ydpbd5762fbymail-preserve-style" style="max-width:400px;font-family:Helvetica Neue,Segoe UI,Helvetica,Arial,sans-serif"><a href="https://paulcavallaro.com/blog/hashed-and-hierarchical-timing-wheels/" style="text-decoration:none!important;color:#000!important" class="m_6619496175321963977ydpbd5762fbyahoo-enhancr-cardlink" rel="nofollow" target="_blank"><table border="0" class="m_6619496175321963977ydpbd5762fbcard-wrapper m_6619496175321963977ydpbd5762fbyahoo-ignore-table" cellpadding="0" cellspacing="0" style="max-width:400px"><tbody><tr><td width="400"><table border="0" class="m_6619496175321963977ydpbd5762fbcard m_6619496175321963977ydpbd5762fbyahoo-ignore-table" cellpadding="0" cellspacing="0" width="100%" style="max-width:400px;border-width:1px;border-style:solid;border-color:rgb(224,228,233);border-radius:2px"><tbody><tr><td><table border="0" class="m_6619496175321963977ydpbd5762fbcard-info m_6619496175321963977ydpbd5762fbyahoo-ignore-table" cellpadding="0" cellspacing="0" style="background:#fff;width:100%;max-width:400px;border-radius:0 0 2px 2px;border-top:1px solid rgb(224,228,233)"><tbody><tr><td style="background-color:#ffffff;padding:16px 0 16px 12px;vertical-align:top;border-radius:0 0 0 2px"></td><td style="vertical-align:middle;padding:12px 24px 16px 12px;width:99%;font-family:Helvetica Neue,Segoe UI,Helvetica,Arial,sans-serif;border-radius:0 0 2px 0"><h2 class="m_6619496175321963977ydpbd5762fbcard-title" style="font-size:14px;line-height:19px;margin:0px 0px 6px;font-family:Helvetica Neue,Segoe UI,Helvetica,Arial,sans-serif;color:rgb(38,40,42)">Hashed and Hierarchical Timing Wheels</h2><p class="m_6619496175321963977ydpbd5762fbcard-description" style="font-size:12px;line-height:16px;margin:0px;color:rgb(151,155,167)">Hashed and Hierarchical Timing Wheels: Data Structures for the Efficient Implementation of a Timing Facility</p></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></a></div><div><br></div><div><br></div><div><br></div>
        
        </div></div><div><div id="m_6619496175321963977yahoo_quoted_5957456733" class="m_6619496175321963977yahoo_quoted">
            <div style="font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:13px;color:#26282a">
                
                <div>
                    On Tuesday, December 18, 2018, 1:22:44 a.m. EST, Torben Hoffmann <<a href="mailto:torben.lehoff@gmail.com" target="_blank">torben.lehoff@gmail.com</a>> wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id="m_6619496175321963977yiv9190438820"><div>This is the nearest I can think of:<br clear="none"><a rel="nofollow" shape="rect" href="https://github.com/fra/ecron/blob/master/README.md" target="_blank">https://github.com/fra/ecron/blob/master/README.md</a><br clear="none"><br clear="none">Cheers,<br clear="none">Torben<br clear="none"><div class="m_6619496175321963977yiv9190438820gmail_quote"><div class="m_6619496175321963977yiv9190438820yqt1121191909" id="m_6619496175321963977yiv9190438820yqtfd32685"><div dir="ltr">On Tue, 18 Dec 2018 at 06:17, Frank Muller <<a rel="nofollow" shape="rect" href="mailto:frank.muller.erl@gmail.com" target="_blank">frank.muller.erl@gmail.com</a>> wrote:<br clear="none"></div></div><blockquote class="m_6619496175321963977yiv9190438820gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_6619496175321963977yiv9190438820yqt1121191909" id="m_6619496175321963977yiv9190438820yqtfd62327"><div><div>Really, no library out there?</div></div><div><br clear="none"></div><div>/Frank</div><div><br clear="none"></div><div><div class="m_6619496175321963977yiv9190438820gmail_quote"><blockquote class="m_6619496175321963977yiv9190438820gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi there </div><div><br clear="none"></div><div>I am looking for any Erlang implementation of a “hierarchical timing wheel” with disk persistency (if possible)?</div><div><br clear="none"></div><div>I need to handle a very large number of timers (around 10 million events) in my app. Each timer will trigger an associated MFA event. </div><div><br clear="none"></div><div>I’ve one special case: some events can be triggered after a long period of time (ex. 2 years). The rest of the timers can be considered short (in minutes, hours or days at max). That’s why “<span style="font-size:12pt;font-family:Helvetica">hierarchical timing wheel” can solve this special case.</span></div><div><br clear="none"></div><div>Any help/idea/link appreciated.</div><div><br clear="none"></div><div>Thank you</div><div>/Frank</div>
</blockquote></div></div>
_______________________________________________<br clear="none">
erlang-questions mailing list<br clear="none">
<a rel="nofollow" shape="rect" href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br clear="none">
<a rel="nofollow" shape="rect" href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a></div><br clear="none">
</blockquote></div>-- <br clear="none"><div class="m_6619496175321963977yiv9190438820gmail_signature" dir="ltr"><div dir="ltr"><a rel="nofollow" shape="rect" href="https://www.linkedin.com/in/torbenhoffmann/" target="_blank">https://www.linkedin.com/in/torbenhoffmann/</a><div class="m_6619496175321963977yiv9190438820yqt1121191909" id="m_6619496175321963977yiv9190438820yqtfd36590"><br clear="none"></div></div></div></div></div><div class="m_6619496175321963977yqt1121191909" id="m_6619496175321963977yqtfd09541">_______________________________________________<br clear="none">erlang-questions mailing list<br clear="none"><a shape="rect" href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br clear="none"><a shape="rect" href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br clear="none"></div></div>
            </div>
        </div></div></blockquote></div></div>