Why not use AJAX, no need for an applet.
bugbear - 27 Oct 2005 11:15 GMT
> Why not use AJAX, no need for an applet.
I'm open to suggestions. I was hoping, since
my requirment seems (frankly) banal,
that something already existed.
The key (technical) issue is that the message needs
to be initiated (i.e. sent) from the server.
I simply need to send a message to a client's
(or group of clients) machine, and for them
to be able to read and delete the messages.
I would STRONGLY prefer not to have the
client/applet/user machine polling, since
out attached client numbers may be high, and
I could do wihout the load.
BugBear
Ectomorph - 28 Oct 2005 05:15 GMT
For the client to listen for messages you will need to open a socket
connection to the server, this may not be possible if there are
firewalls/routers between the server and the client.
Using XMLHttpRequest object in javascript you can ping the server every
X seconds to check for messages. Read the response and update a text
box, or any other widget for that matter. I dont think load is an issue.
Roedy Green - 28 Oct 2005 07:21 GMT
>For the client to listen for messages you will need to open a socket
>connection to the server, this may not be possible if there are
>firewalls/routers between the server and the client.
Those are primarily political problems, not technical ones, which is
not to belittle them. In a big corporation they can be show-stoppers.
You have to make sure the firewall-router lets you through. That means
often persuading some administrator to open up a hole.
It is generally easier to persuade them to do that for an outgoing
socket connection than an incoming one.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
bugbear - 28 Oct 2005 15:27 GMT
> Using XMLHttpRequest object in javascript you can ping the server every
> X seconds to check for messages. ...
This is called "polling"
> I dont think load is an issue.
Wouldn't that rather depend on client numbers, poll rate,
message size and server horsepower?
BugBear
On Wed, 26 Oct 2005 14:58:51 +0100, bugbear
<bugbear@trim_papermule.co.uk_trim> wrote, quoted or indirectly quoted
someone who said :
>Does anyone know of a piece of software (most likely
>a Java Applet) that can sit in a users web browser,
>and be sent messages from a server, and display
>(and allow the user to delete) those messages?
That sounds like a job for a JTable. Get yourself any textbook on
Swing and mangle one of the examples until it does what you want.
there are a lot of details to specify, e.g. how many columns are
there. What kind of data goes in each column. How do you convert the
data to a String form for display, how do you decorate the information
with colours, icons. Do you edit the data or just delete rows? What
happen when the table gets too full. What do you throw away? Does the
table allow scrolling.
It is not all that hard to do. It is a bit like running in snow. You
have to write quite a bit of code to get very far, but none of it in
itself is all that difficult.
If you don't want to learn this skill, you might farm out your problem
for a fee to someone like me.
see http://mindprod.com/jgloss/jtable.html

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
bugbear - 28 Oct 2005 15:29 GMT
> On Wed, 26 Oct 2005 14:58:51 +0100, bugbear
> <bugbear@trim_papermule.co.uk_trim> wrote, quoted or indirectly quoted
[quoted text clipped - 6 lines]
>
> That sounds like a job for a JTable.
I was thinking of something more along the
lines of a receive-only GAIM, only
as an Applet, and was hoping to
find someone had already created it ;-)
BugBear