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 7514291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T00:27:08+00:00 2026-05-30T00:27:08+00:00

For what reasons would one choose several processes over several threads to implement an

  • 0

For what reasons would one choose several processes over several threads to implement an application in Java?

I’m refactoring an older java application which is currently divided into several smaller applications (processes) running on the same multi-core machine, communicating which each other via sockets.

I personally think this should be done using threads rather than processes, but what arguments would defend the original design?

  • 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-30T00:27:10+00:00Added an answer on May 30, 2026 at 12:27 am

    I (and others, see attributions below) can think of a couple of reasons:

    Historical Reasons

    • The design is from the days when only green threads were available and the original author/designer figured they wouldn’t work for him.

    Robustness and Fault Tolerance

    • You use components which are not thread safe, so you cannot parallelize withough resorting to multiple processes.

    • Some components are buggy and you don’t want them to be able to affect more than one process. Say, if a component has a memory or resource leak which eventually could force a process restart, then only the process using the component is affected.

    • Correct multithreading is still hard to do. Depending on your design harder than multiprocessing. The later, however, is arguably also not too easy.

    • You can have a model where you have a watchdog process that can actively monitor (and eventually restart) crashed worker processes. This may also include suspend/resume of processes, which is not safe with threads (thanks to @Jayan for pointing out).

    OS Resource Limits & Governance

    • If the process, using a single thread, is already using all of the available address space (e.g. for 32bit apps on Windows 2GB), you might need to distribute work amongst processes.

    • Limiting the use of resources (CPU, memory, etc.) is typically only possible on a per process basis (for example on Windows you could create “job” objects, which require a separate process).

    Security Considerations

    • You can run different processes using different accounts (i.e. “users”), thus providing better isolation between them.

    Compatibility Issues

    • Support multiple/different Java versions: Using differnt processes you can use different Java versions for your application parts (if required by 3rd party libraries).

    Location Transparency

    • You could (potentially) distribute your application over multiple physical machines, thus further increasing scalability and/or robustness of the application (see @Qwe’s answer for more Details / the original idea).
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There are many security reasons why one would want to drop an HTTP connection
I would like to know the reasons that we do refactoring and justify it.
There are a multitude of key-value stores available. Currently you need to choose one
What are the main reasons someone would use HTML's tbody in a table? Is
What are some reasons why PHP would force errors to show, no matter what
What are the most common reasons that I would be getting this error from
I know there are LOTS of reasons why you would compose a certain object
What would be some compelling reasons to upgrade a web app from .NET 1.1
Are there any good reasons for why you would include JavaScript like this: <script
For some reasons, I would like to do an explicit quoting of a string

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.