Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8139059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T11:42:01+00:00 2026-06-06T11:42:01+00:00

I would like to use Akka to implement a multiple-readers / one-writer pattern on

  • 0

I would like to use Akka to implement a multiple-readers / one-writer pattern on a data structure, but I am stuck in the design of the actor model.

My initial thought was to have a supervisor actor which would receive external requests (read or write). Read requests would be forwarded to reader actors for asynchronous processing. Write requests would wait for all readers to finish and then be processed synchronously.

My problem is how to implement the “wait for all readers to finish” part.

I first thought of keeping a counter at the supervisor. The counter would be incremented every time the supervisor forwards a message to a reader. The reader would then send an “I am done” message back to the supervisor when it finished, which would then decrease the counter. However, I think this would lead to deadlocks, since the “I am done” messages would go to the same mailbox as the external requests. If the supervisor was processing a write request synchronously then the “I am done” would never reach it.

I am really stuck with the design. Any help would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T11:42:02+00:00Added an answer on June 6, 2026 at 11:42 am

    Per the comments above.

    Add a queue to your supervisor actor to queue incoming requests. When the readers send back the finished message, take a task off the queue and give it to the readers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to use the group_by method, but instead of using a column
I would like to use complex numbers as defined in C99, but I need
I'm stuck now, in a background page, I would like use the .html() jQuery
I would like use data annotations to handle validation in my Silverlight app. The
i would like use a variable session ($_session) but it doesn't work in Drupal
Possibly really simple question, but I'm new to IronPython. I would like use IronPython
I would like to use Akka actors in Java. I downloaded the akka-1.0.zip and
I currently have some large strings that I would like use as test data
I would like to use a component that exposes the datasource property, but instead
I would like to use HTML 4.01 Strict, and used a DOCTYPE of it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.