Skip to content

Different questions about Thespian and its functionalities #77

Open
@htarnacki

Description

@htarnacki

hi,
i hope you do not mind this type of task, collecting all my questions in one thread


  1. What is the preferable way of enforcing actor system that some named actor always exist?
    so:
  • we create an actor system
  • then we create first main named actor (A) that we want it to exist forever
  • even in case of an "A" actor crash we need some mechanism to bring it back to alive

Looking into documentation i see that named actors do not have parents and therefore there is no any actor that could receive "ChildActorExited" message. But i guess that an actor system itself is receiving such a notification?
So i am looking for something like this:
ActorSystem().createActor(actor_class, globalName=attr, keep_alive=True)


  1. Why there is no "ask" method on an actor class?
    There is an actor system method "ask" but no corresponding method on an actor class. What is the reason of this?
    Without that how should look like normal processing like this:
  • start processing of received message A
  • ask some other actor for some additional data needed to process message A
  • after receiving additional data process message A

Without something like "await" are we going to some kind of callback hell? (or a message/response hell? ;-))
or is there something like:
self.await(
BankAccountData,
self.send(BankActorAddress, AskForBankAccountData(client_number)
)

self.await would stop an actor processing until there is a message of type BankAccountData that an actor receive from BankActorAddress


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions