wipman
wipman

Reputation: 581

Multiple actors linked to a shared database

The constellation of actors I am working with shares a hierarchical structure. Each of those actors needs to save data in a mongodb database. Rather than creating a link to the database for each actor, I thought it would be better if there was a method to inherit this aforementioned link from the top actor to its children.

Is there a way to do that in lieu of the actors inheriting the database name and rebuilding the link each time?

Upvotes: 0

Views: 105

Answers (1)

mattinbits
mattinbits

Reputation: 10428

Another option is to create an actor (or pool of actors behind a router) who are responsible for communicating with the MongoDB, and have your other actors communicate their needs to that actor/pool.

Upvotes: 1

Related Questions