I am currently investigating several issues concerning a distributed
system. Eventually, I have to adjust an existing application consisting
of several C++ parts and driven by Tcl/Tk. This existing application
will act as a server, with several web-based clients using its
functionality. Currently the application is stand-alone, but my job is
to add the network functionality.
On these web-based clients, I would prefer the use of Java-applets in
combination with Java3D, since the system will be used on multiple
heterogeneous platforms. Java3D is useful because of its interactive
behaviour and visualisation functionality.
The issue here is how to communicate between clients and server.
Normally I would connect a server and client tranparantly using CORBA,
but is this possible between a Java-client and the Tcl/Tk scripts at the
server? (Tcl to IDL???)
Otherwise, would it be possible to use Jacl (Java Command Language) in
combination with the available socket and channel features within
Tcl/Tk?
Or, as a third option, would the Tcl/Tk Browser-plugin be useful for
this purpose?
Any ideas and experiences with regard to this subject would be
appreciated.
Eelco van den Berg.
Tcl Blend is a Tcl extension written in C that gives you
access to a Java Virtual Machine through the JNI. You can
create Java classes in Tcl and use them to connect via
CORBA (IIOP if I remember right). I've successfully been
ablet to connect to Enterprise Java Bean servers
(IBM WebSphere and BEA Weblogic) using Tcl Blend.
see: http://www.scriptics.com/products/java
> The issue here is how to communicate between clients and server.
> Normally I would connect a server and client tranparantly using CORBA,
> but is this possible between a Java-client and the Tcl/Tk scripts at the
> server? (Tcl to IDL???)
>
> Otherwise, would it be possible to use Jacl (Java Command Language) in
> combination with the available socket and channel features within
> Tcl/Tk?
Jacl does not support sockets. I think you mean that you would use
Jacl on the Java client. Instead, use Java classes to use the socket,
probably more messy than using Tcl Blend in the Tcl scripts.
> Or, as a third option, would the Tcl/Tk Browser-plugin be useful for
> this purpose?
The plugin won't use sockets either (you can enable them, but this
might be messy as well).
-- Scott
> Hi,
>
> I am currently investigating several issues concerning a distributed
> system. Eventually, I have to adjust an existing application consisting
> of several C++ parts and driven by Tcl/Tk. This existing application
> will act as a server, with several web-based clients using its
> functionality. Currently the application is stand-alone, but my job is
> to add the network functionality.
>
> On these web-based clients, I would prefer the use of Java-applets in
> combination with Java3D, since the system will be used on multiple
> heterogeneous platforms. Java3D is useful because of its interactive
> behaviour and visualisation functionality.
If the Tcl program and the Java program both have corba orbs, that
should work. Would it be possible to just use plain sockets? That
would be the easiest thing you could try. Open a Socket from
your Java code and send data to the Tcl server. Then write data
from the Tcl program and read it in your Java program.
>
> The issue here is how to communicate between clients and server.
> Normally I would connect a server and client tranparantly using CORBA,
> but is this possible between a Java-client and the Tcl/Tk scripts at the
> server? (Tcl to IDL???)
Jacl does not have the socket command (yet), so do not expect Tcl scripts
that use the socket command to work in Jacl. This does not mean that
you can not use networking. Java comes with lots of networking classes
that you could still access in Jacl.
You might like to read more at http://www.scriptics.com/java and
http://www.sunworld.com/sunworldonline/swol-11-1999/swol-11-jacl.html.
I hope that helps
Mo DeJong
> The issue here is how to communicate between clients and server.
> Normally I would connect a server and client tranparantly using CORBA,
> but is this possible between a Java-client and the Tcl/Tk scripts at the
> server? (Tcl to IDL???)
>
> Otherwise, would it be possible to use Jacl (Java Command Language) in
> combination with the available socket and channel features within
> Tcl/Tk?
I have had success trying to communicate between a Java applet and Tcl
server using sockets (as Mo did point out). It involves no fancy
marshalling and stuff, but works great. Specifically, the server serves
random words for a Java word game applet.
regards,
Raj
Maybe I should specify my problem a little bit. A have to build a
synchronous and concurrent client/server system. Therefore it is very
important that all messages from clients to server and from server to
clients are received as fast as possible. Also it is important that the
clients are platform-independent. Is this straightforward
socket-approach still favoured over a CORBA-implementation?
The client will be a Java-applet, which communicates with the Tcl/Tk
scripts on the server (that further consists of a c++ kernel).
Thanks for the help I received so far.
Eelco van den Berg.