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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T06:17:08+00:00 2026-06-02T06:17:08+00:00

Context I have an app that does time-consuming processing of texts in Ruby. When

  • 0

Context

  • I have an app that does time-consuming processing of texts in Ruby.
  • When a users submits a text, a background process is forked to take care of that text.
  • This process continuously outputs new parts of the text as they have been processed.
  • Meanwhile, the user is redirected to the page where the processed text will be output.

My question is: how can the client’s Javascript communicate with a process running on the server, given its PID? Is that possible? Do I need to wrap each background process inside its own servlet running on its own port?

  • 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-02T06:17:11+00:00Added an answer on June 2, 2026 at 6:17 am

    Here is the strategy I ended up using:

    • Create a small Sinatra servlet to manage the different jobs.
    • Each job request received is assigned a job ID and started in a detached forked process.
    • The forked process sets up a DRb service with an array that is used as a stack.
    • It then performs a “GET” request on the servlet that associates the job ID with the DRb URI.
    • As the process continues execution in the background, it adds elements to the stack.
    • The main thread can be polled to return the next element in the stack.
      • Connection to the remote array is established within the servlet, and an element is shifted from the stack.
      • Polling continues until there are no more elements to add on the stack and no more elements to return to the client.
    • When the stack is empty, the process terminates.

    Any thoughts?

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

Sidebar

Related Questions

Context: I have a WPF App that uses certain unmanaged DLLs in the D:\WordAutomation\MyApp_Source\Executables\MyApp
We have a WPF app that allows our users to download encrypted content and
I have a nice little app on the app store that does pretty well
I'm developing a PHP-MySQL app that enables registered users to enter text comments. Problem
I have this method in App Delegate that makes a window and content view
I have a Django app where multiple teams upload content that will be parsed.
I'm creating a WPF app and have a system tray icon with a context
I have this need to place my app in the share/send context menu so
I have a very simple dialog defined as: import android.app.AlertDialog; import android.content.Context; import android.view.LayoutInflater;
In my app, I have to draw some images on a view, in real-time,

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.