Hi,

To answer your questions, I have the following suggestions:
1. My opinion is to build the query object on the server side, rather
than your applet. You will have a thinner applet with less load on the
client machine and the information you send across will be less. As you
said, there are only 5 to 20 parameters in the query. From an OO point
of view, the job of building a query object should be part of your
database interface layer rather than your client layer.

2. If your intention for the applet is to display the result only, I
would suggest to configure the result on the server side.

3. Do you mean to have direct connection from your applets to the db ?
>From your architecture, the connection to the db seems to be between the
servlet and the db, applet is just for client display. If this is true,
then there are many products around that implements database connection
broker pool. You can configure the number of simultaneous connections to
a db rather than writing your own code. In any case, I think this is a
better architecture that connecting directly from your applet to the db.

Hope this helps.

Thanks,

Rudolph

Mark Phillips wrote:

> I am building an applet-servlet-database application, and I have a
> design
> question.
>
> The applet collects info, builds a query object, sends it to the
> servlet
> (http serialized object), which sends it to the db-server (rmi) to get
> the
> result set.  The result set is returned to the servlet (rmi callback),
> which
> sends to the applet (http serialized object), and the applet puts the
> result
> set in a JTable. I want to keep the applet-servlet link simple so I
> don't
> get into any firewall issues.  I put the applet-servlet communication
> activity in a separate thread so the applet can do other things while
> waiting for the response from the db.
>
> My questions are:
> 1. Should I build a query object, or just send the query as strings in
> GET?
> There are only 5 to 20 parameters in a query.
> 2. Can I send the JDBC result set back to the applet as a serialized
> object,
> or is it better to "unpack" it at the servlet and send it as my own
> result
> set object?
> 3. Do I need a connection pool at the servlet? I expect between 2 and
> 15
> simultaneous accesses to the db from different applets.
>
> Any other observations about the architecture would be greatly
> appreciated!!
>
> Mark
>
> ****************************************************
> Phillips Marketing, Inc.
> Internet marketing, e-commerce, groupware, and new ventures
> 602 945-0798
> Fax 945-9197
> [EMAIL PROTECTED]
> http://members.home.net/phillipsm
>
>
> __________________________________________________________________________
>
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources:
> http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html


begin:          vcard
fn:             Rudolph Au
n:              Au;Rudolph
org:            Baker Street Technologies Inc.
adr:            225 East Beaver Creek Road;;Suite 233;Richmond Hill;Ontario;L4B 3P4;Canada
email;internet: [EMAIL PROTECTED]
title:          Developer
tel;work:       (416) 410-4474 ext. 224
x-mozilla-cpt:  ;0
x-mozilla-html: FALSE
end:            vcard

Reply via email to