• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

Sending Messages to Multiple Apps

Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We will have several sites (around 100) which will all be running the same web application on their server. There is not a good way to centralize this application because of network connectivity issues. So the sites are just using a local Tomcat server to run the app.
Sometimes we will need to be able to put an informational message on the login page of that application, just to tell users information that they need to know. These messages should be valid for a specified period of time and then expire.
What is the best way to do this? I thought of a few ways that this could be done by 1) using Java Web Start to download a new version of a "informational message" that would then be displayed on the login page, 2) using JMX to set the properties of some MBean whose properties are then displayed on the login page, 3) call a webservice running in Tomcat that would be able to set some message that would be viewable on the login page.
We need this to be easy to send that message to all 100 sites, so we need an easy way to do all 100 sites at once programmatically rather than manually.
Has any one else done something similar in an application? What would be the best way to implement something like this?
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, the most remedial way is to have the message read in from a file, and then just set up a batch script to ftp the newest and best version of it to each of the 100 servers when you want it changed.
It sort of depends on how serious your network connectivity issues are.
author and iconoclast
Posts: 24204
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think that, since Brian believes there's a solution, that all the 100 servers are reachable from some location, but not all the clients can reach the central location. In this case I think I like solution 3). The replicated web app would include a service that the central location could call to deposit the message at each server. The central server would need a list of the replicated servers, and it could just read the list, iterate over it, invoking the web service at each one.
If the network connectivity doesn't allow this, I'd consider using email. You could mail the message to a dedicated address at each replicated server, which could just strip off the headers and use the message; you could use PKI to verify the sender.
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic