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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T17:30:47+00:00 2026-05-11T17:30:47+00:00

Let’s say I have two applications which have to work together to a certain

  • 0

Let’s say I have two applications which have to work together to a certain extent.

  1. A web application (PHP, Ruby on Rails, …)
  2. A desktop application (Java, C++, …)

The desktop application has to be notified from the web application and the delay between sending and receiving the notification must be short. (< 10 seconds)

What are possible ways to do this? I can think of polling in a 10 second interval, but that would produce much traffic if many desktop applications have to be notified. On a LAN I’d use an UDP broadcast, but unfortunately that’s not possible here…

I appreciate any ideas you could give me.

  • 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-11T17:30:47+00:00Added an answer on May 11, 2026 at 5:30 pm

    I think the “best practice” here will depend on the number of desktop clients you expect to serve. If there’s just one desktop to be notified, then polling may well be a fine approach — yes, polling is much more overhead than an event-based notification, but it’ll certainly be the easiest solution to implement.

    If the overhead of polling is truly unacceptable, then I see two basic alternatives:

    1. Keep a persistent connection open between the desktop and web-server (could be a “comet”-style web request, or a raw socket connection)
    2. Expose a service from within the desktop app, and register the address of the service with the web-server. This way, the web-server can call out to the desktop as needed.

    Be warned, though — both alternatives are chock full of gotchas. A few highlights:

    • Keeping a connection open can be tricky, since you want your web-servers to be hot-swappable
    • Calling out to an external service (eg, your desktop) from a web-server is dangerous, because this request could hang. You’d want move this notification onto a separate thread to avoid tying up the webserver.

    To mitigate some of the concerns, you might decouple the unreliable desktop from the web-server by introducing an intermediary notification server — the web-server could post an update somewhere, and the desktop could poll/connect/register there to be notified. To avoid reinventing the wheel here, this could involve some sort of MessageQueue system… This, of course, adds the complexity of needing to maintain the new intermediary.

    Again, all of these approaches are probably quite complex, so I’d say polling is probably the best bet.

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

Sidebar

Related Questions

Let's say I have two assemblies: BusinessLogic and Web. BusinessLogic has an application setting
Let's say I have 2 windows in my application, and two classes responsible for
Let's say I have a method in java, which looks up a user in
Let's say I have two tables orgs and states orgs is (o_ID, state_abbr) and
Let's say I have an facebook application running using the JS SDK. First user
Let's say I have a dataset, which can be neatly classified using weka's J48
Let say I have two UIViews: View1: - bounds: 0, 0, 20, 20 -
Let's say I'm writing a Windows Forms (.NET Framework 3.5) application which shows the
Let's say I'm building a data access layer for an application. Typically I have
Let's say you have a class called Customer, which contains the following fields: UserName

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.