http://www.cs.unc.edu/Courses/comp117/members/lim/a3/whiteboardappletsoucecode.html
I am trying to figure out how to implement it in a network
environment.
The idea I have is to grab what is drawn on the panel, convert it into
an object, and send it to
other clients using a socket connection. Now for this case how do I
grab what is drawn on the
panel and turn it into an object which can be send using a socket to
the other clients so that
they can see the changes on the whiteboard.
Your help is kindly appreciated.
Regards
Eugene
This is a classic master-worker pattern using JavaSpaces. See
http://www.jini.org for examples.
Regards,
Patrick
------------------------------------------------------------------------
S P Engineering, Inc. | Large scale, mission-critical, distributed OO
| systems design and implementation.
p...@spe.com | (C++, Java, Common Lisp, Jini, middleware, SOA)
>I came across a code that shows how to implement a java whiteboard.
>The code can be found at:
>
>http://www.cs.unc.edu/Courses/comp117/members/lim/a3/whiteboardappletsoucecode.html
>
>I am trying to figure out how to implement it in a network
>environment.
What you might do is use RMI. Then you can do remote procedure calls.
See http://mindprod.com/jgloss/rmi.html
Other than that, you need to invent a protocol, messages to describe
all the things you want you whiteboard to do and all the possible
changes the central whiteboard sends back to the remotes to make it
stay in sync.
Ways to implements:
1. all commands get sent to all whiteboards for independent rendering.
2. use something like PCAnywhere to display the rendered central
resulst.
3. study how other conference software works.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
I once saw a demo of this using Terracotta. http://www.terracotta.org/
They may have the demo lying around someplace, maybe as sample code.
You may download the program from:
http://hyperfileshare.com/d/0ff3355f
Your help is kindly appreciated.
Regards.