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

  • Home
  • SEARCH
  • 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 6676957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:03:27+00:00 2026-05-26T04:03:27+00:00

I have a problem that involves several machines, message queues, and transactions. So for

  • 0

I have a problem that involves several machines, message queues, and transactions. So for example a user clicks on a web page, the click sends a message to another machine which adds a payment to the user’s account. There may be many thousands of clicks per second. All aspects of the transaction should be fault tolerant.

I’ve never had to deal with anything like this before, but a bit of reading suggests this is a well known problem.

So to my questions. Am I correct in assuming that a secure way of doing this is with a two phase commit, but the protocol is blocking and so I won’t get the required performance? I usually write Ruby, but it appears that DBs like redis and message queuing system like Rescue, RabbitMQ etc don’t really help me a lot – even if I implement some sort of two phase commit, the data will be lost if redis crashes because it is essentially memory-only.

All of this has led me to look at erlang and scala – but before I wade in and start learning a new language, I would really like to understand better if this is worth the effort. Specifically, am I right in thinking that because of their parallel processing capabilities, these languages are a better choice for implementing a blocking protocol like two phase commit, or am I confused? And if yes, is there any reason to pick one rather than the other (specifically in this context – i know there are plenty of threads and blogs comparing the two more generally)

Apologies for cross posting – this was first posted to stack-exchange but I’ve added to the question and this version is probably a better fit here

  • 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-05-26T04:03:27+00:00Added an answer on May 26, 2026 at 4:03 am

    1) 2 phase commit is not fault tolerant – see the link. You either need a total order broadcast, or a non-blocking atomic commit, depending on the exact formulation of the problem you’re solving.

    2) I wouldn’t say that Scala is much more suited than most other general purpose languages for implementing a two-phase commit. Specifically, STMs, parallel and distributed collections will not help you here. Scala actors and remote actors may provide you with a nice API to send messages around asynchronously (on the same machine or remotely), but they do not by default give you abstractions such as different failure detectors which would be useful for implementing total order broadcasts, for example – you’ll still have to implement these yourself (on the other hand, I believe Akka has these abstractions).

    3) I cannot speak for Erlang and Ruby, but as far as Scala and Java are concerned, you might want to consider taking a look at Akka. It is based on a distributed actor model, which also supports transactions and different levels of fault tolerance. It’s probably better to reuse their infrastructure than writing your own distributed fault tolerant runtime from scratch.

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

Sidebar

Related Questions

I have an ambitious requirement for an asp.net 2.0 web page that contains a
In a couple of scripts that I use I have problem that is intermittent.
I have a problem that confuses my users, being that although an item is
I have the problem that an specific step in Ant can only be executed
I have a problem that I would like have solved via a SQL query.
I have a problem that I feel is best implimented in a stand alone
I have a problem that seems like its a result of a deadlock-situation. Whe
(I have a problem that I illustrated in this question but had no correct
I have a problem that output string must be utf8-formatted, I am writing currently
We have the problem that we have the open project files in our SVN

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.