|
SObjectizer
5.5
|
Until v.5.5.3 there was no way to access and use ad-hoc agent's direct mbox. It was necessary to create and use ordinary multi-producer/multi-consumer mbox. Something like this:
But the multi-producers/multi-consumers mboxes are no so efficient as multi-producers/single-consumer mboxes. So if two ad-hoc agents use very intensive message exchange this exchange will be less efficient as in the case of ordinary agents with usage of theirs direct mboxes.
It was a flaw in the ad-hoc agent implementation: ad-hoc agents have direct mboxes like ordinary agents, because any agent in SObjectizer has its own direct mbox which is created automatically by SObjectizer Environment. But direct mboxes are accessible via API of ordinary agents. Ad-hoc agents have no such API. Because of that direct mboxes of ad-hoc agents were unaccessible until v.5.5.3.
Since v.5.5.3 an access to ad-hoc agent's direct mbox can be obtained. Ad-hoc creation method (agent_coop_t::define_agent()) returns special proxy for ad-hoc agent construction. This proxy now has method direct_mbox() which can be used for access to the direct mbox.
Construction of ad-hoc agents can now be splitted into two steps: getting the proxy and defining ad-hoc agent's events via stored proxy:
1.8.14