Hmm.  I suspect I would handle a problem like this architecturally, rather
than at the individual Actor level.  Remember that you don't usually have
Actors connecting to each other by name -- instead, Actors usually provide
ActorRefs to other Actors.

So I would probably have each service provide some sort of "gatekeeper"
Actor, which mediates the provision of ActorRefs to the rest of the
cluster, and only provide access to the systems that are appropriate to
have it.  The external services would have to go through this gatekeeper,
allowing you to manage the process as tightly as you need.

This approach does require that everyone play by the rules and not try to
do an end-run around them.  But if folks work within the system, it seems
like a reasonably principled way to manage access...

On Thu, Mar 16, 2017 at 1:09 PM, Rado Buranský <[email protected]>
wrote:

> Thanks Justin. I also have the same feeling that this is not the right way.
>
> My idea was to implement micro services but instead of having standalone
> HTTP servers for each service I was thinking to have actor system for each
> service and join them together in a single Akka cluster. To be more
> specific, in our organization I would allow other teams to implement their
> own actor system which we would run on our cluster. But I need to make sure
> that their code doesn't mess with the rest of the cluster.
>
>
> On Thursday, March 16, 2017 at 9:50:37 AM UTC-7, Justin du coeur wrote:
>>
>> What's the underlying need here?  I can't recall ever seeing anyone do
>> something like this, and it's fairly counter to the general architecture of
>> Akka.  I suspect it's impossible in the general case.  (Note that custom
>> mailboxes are always a dicey proposition, and usually indicate that you're
>> trying to do something unwise.)
>>
>> That said, "only accepting some well-defined messages" is precisely the
>> way Actors usually work.
>>
>> But generally: what are you trying to accomplish?  It might be easier to
>> help you with a better idea of what you really need...
>>
>> On Wed, Mar 15, 2017 at 7:54 PM, Rado Buranský <[email protected]>
>> wrote:
>>
>>> Here is my original unanswered SO question:
>>> http://stackoverflow.com/questions/42773328/how-to-isolate-akka-actor
>>>
>>> Is it possible to protect some actors within a single actor system from
>>> other actors? Is it actually a good idea at all? I can imagine to implement
>>> a custom mailbox which accepts only some well-defined messages.
>>>
>>> --
>>> >>>>>>>>>> Read the docs: http://akka.io/docs/
>>> >>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/c
>>> urrent/additional/faq.html
>>> >>>>>>>>>> Search the archives: https://groups.google.com/grou
>>> p/akka-user
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Akka User List" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at https://groups.google.com/group/akka-user.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> >>>>>>>>>> Read the docs: http://akka.io/docs/
> >>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/
> current/additional/faq.html
> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to