[1395] in java-interest
java-interest-digest V1 #140
daemon@ATHENA.MIT.EDU (Mark S. Friedman)
Thu Aug 31 18:06:49 1995
Date: Thu, 31 Aug 1995 12:15:00 -0700
From: msfriedm@us.oracle.com (Mark S. Friedman)
To: java-interest@java.sun.com
In-Reply-To: <11968653@toto.iv>
Reply-To: msfriedm@us.oracle.com
> From: mtw@felix.kodak.com (Mary White)
> Date: Wed, 30 Aug 1995 08:14:25 -0400
> Subject: Third Party Library Loading
>
> I am currently working on an applet that will allow
> searching into a Sybase database. Originally I created the
> applets using native methods to call the database library
> calls and things were working ok. But I have been told that
> this is not a solution because for anyone to use the applet I
> will have to download the sybase library onto thier machine,
> since it is dynamically loaded for them to use the applet. Is
> this true? If so how do I get around it. It is impossible for
> me to distribute database libraries and would like my search
> commands to come from the client if possible.
>
> Thanks for any help in advance.
A general solution for such things is to create a protocol between the
your server and the client that encapsulates the database library
calls on the server side. Then you can have Java code that looks like
your database library (although you might find that a higher level
abstraction is more useful) that communicates with your server using
the protocol.
One simple possibility for such a protocol to encode it in URL's which
are parsed by CGI scripts which then do the appropriate library calls
and package their results back to the client. Your Java classes will
then just get those URL's.
The above URL scheme may not be efficient enough for your needs, and
you may have to deal with the ugly issue of emulating state (because
HTTP is stateless) between your client and the server. In that case
you might want to open a seperate non-HTTP socket connection between
your client and server and implement your protocol via that
connection.
-Mark
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com