<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 04/10/2014 08:56 PM, Dmitry
Demeshchuk wrote:<br>
</div>
<blockquote
cite="mid:CANH2pzuo8bdBDH8389pxAKA5BSTVgy1mY55qpROoHkGwWBbUEQ@mail.gmail.com"
type="cite">
<meta http-equiv="Context-Type" content="text/html; charset=UTF-8">
<div dir="ltr">Well, actually, if Michael pointed me at a module
that handles that and it was something similar, that could have
been helpful :)
<div><br>
</div>
<div>But, judging by the priorities from -128 to 127, it's
probably a manual filter of some kind, probably with an
intermediate mailbox-reducer process.</div>
</div>
</blockquote>
The v1 UUID acts as the known reference with O(1) complexity here.
The priority is being handled by an Erlang priority queue data
structure called pqueue4 since there has to be some queue structure
for queuing service requests so that atomic transactions can occur
for service requests. This might not have been the priority you had
in mind if you were thinking about various pattern matching cases on
different priority values, but I have found the approach with a data
structure more flexible and useful for the dynamic nature of a
service, due to the need for a queue (which enforces the incoming
limit, since it is easier than trying to do something error-prone
with an Erlang pid directly, i.e., something that would modify the
Erlang pid state or try to check it repeatedly).<br>
<br>
<blockquote
cite="mid:CANH2pzuo8bdBDH8389pxAKA5BSTVgy1mY55qpROoHkGwWBbUEQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div><br>
</div>
<div>Which is fine, actually, but my question wasn't "how to
handle huge queues?", but "is using OTP-8623 for that an
anti-pattern of some sort?".</div>
<div><br>
</div>
<div>And yeah, definitely not "what platform should I use?".</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Thu, Apr 10, 2014 at 7:28 PM, zxq9 <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:zxq9@zxq9.com" target="_blank">zxq9@zxq9.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote">
<div class="">On Thursday 10 April 2014 17:24:54 Michael
Truog wrote:<br>
> On 04/10/2014 05:02 PM, Dmitry Demeshchuk wrote:<br>
> > Hi list,<br>
> ><br>
> > Today (yeah, just a couple years have passed
since R14A) I learned about<br>
> > OTP-8623, which allows to do selective receive
for messages that contain<br>
> > a known reference with O(1) complexity.<br>
</div>
...<br>
<div class="">> > This could potentially help with
sending managing messages to the<br>
> > processes that may have overloaded inbox with
thousands of messages. Say,<br>
> > we see that the process gets overloaded and we
send an operational<br>
> > message of some kind ("discard the entire
inbox", for example).<br>
> ><br>
> > Thoughts?<br>
><br>
> You could get this interaction by creating an
internal service with CloudI<br>
> (<a moz-do-not-send="true" href="http://cloudi.org"
target="_blank">http://cloudi.org</a>).<br>
<br>
</div>
Not so sure this is what the OP was getting at.<br>
<br>
"Is OTP8623 a lightweight way to overcome a clogged queue?"
/= "Base<br>
everything you do on some new service stack"<br>
<div class="HOEnZb">
<div class="h5">_______________________________________________<br>
erlang-questions mailing list<br>
<a moz-do-not-send="true"
href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a moz-do-not-send="true"
href="http://erlang.org/mailman/listinfo/erlang-questions"
target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</div>
</div>
</blockquote>
</div>
<br>
<br>
<div><br>
</div>
-- <br>
Best regards,<br>
Dmitry Demeshchuk
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
erlang-questions mailing list
<a class="moz-txt-link-abbreviated" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a>
<a class="moz-txt-link-freetext" href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a>
</pre>
</blockquote>
<br>
</body>
</html>