mailbox size

29 views
Skip to first unread message

Pierluigi Di Cerbo

unread,
Sep 4, 2019, 12:46:38 PM9/4/19
to actor-f...@googlegroups.com

Hi,

there is a way to retrieve the number of elements within a mailbox of an actor at a certain moment?

Or, as alternative, there is a way to know if the size of a mailbox exceeds a given number?

 

Thank you in advance,

Cheers

Pierluigi

 




PRIVILEGED AND CONFIDENTIAL *******************************

This message contains confidential information and is intended only for the individual(s) addressed in the message. Please refer to DISCLAIMER for important disclaimers and the firm's regulatory position.


Dominik Charousset

unread,
Sep 5, 2019, 5:23:55 AM9/5/19
to actor-f...@googlegroups.com
there is a way to retrieve the number of elements within a mailbox of an actor at a certain moment?

Yes: self->mailbox().size().

    Dominik

Pierluigi Di Cerbo

unread,
Sep 11, 2019, 12:18:59 PM9/11/19
to actor-f...@googlegroups.com

Thank you Dominik!

I wasn’t able to find it neither in the User Manual nor in the API documentation..

 

However, we still have a couple of question about the computational complexity of this function call.

We are building a real time application that may be required to process large amount of data.

So we would use the mailbox size to monitor if a specific actor is going to accumulate too much work (i.e. its mailbox size increases).

In a high throughput scenario, can the computation of the mailbox size lead to a significant performance worsening?

 

Actually we are interested to just know if the mailbox size exceedes a specific threshold.

In the version 0.15.7, in the single_reader_queue there was a count function that had a similar behaviour.

In the last version there is a similar functionality?

 

Thank you in advance,

Pierluigi

 

Da: actor-f...@googlegroups.com <actor-f...@googlegroups.com> Per conto di Dominik Charousset
Inviato: giovedì 5 settembre 2019 11:24
A: actor-f...@googlegroups.com
Oggetto: Re: [caf] mailbox size

 

there is a way to retrieve the number of elements within a mailbox of an actor at a certain moment?

 

Yes: self->mailbox().size().

 

    Dominik

--
You received this message because you are subscribed to the Google Groups "actor-framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to actor-framewo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/actor-framework/D8A08B94-0124-40C2-80CF-574FCADBC8A7%40charousset.de.

Dominik Charousset

unread,
Sep 12, 2019, 2:44:37 AM9/12/19
to actor-f...@googlegroups.com
> However, we still have a couple of question about the computational complexity of this function call.
> We are building a real time application that may be required to process large amount of data.
> So we would use the mailbox size to monitor if a specific actor is going to accumulate too much work (i.e. its mailbox size increases).
> In a high throughput scenario, can the computation of the mailbox size lead to a significant performance worsening?
>
> Actually we are interested to just know if the mailbox size exceedes a specific threshold.
> In the version 0.15.7, in the single_reader_queue there was a count function that had a similar behaviour.
> In the last version there is a similar functionality?


The old count() function had complexity O(n). That’s why there was the option to not count past a threshold. However, the new mailbox implementation has a counter and mailbox().size() no longer has to iterate the mailbox for counting.
Reply all
Reply to author
Forward
0 new messages