AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Slow / Poor performance using Connection across network.

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java and Databases
View previous topic :: View next topic  
Author Message
Andrew Bray
Guest





PostPosted: Fri Jul 04, 2003 4:39 pm    Post subject: Slow / Poor performance using Connection across network. Reply with quote



I've got a basic client (non j2ee) app that instantiates a connection
to our oracle database. When using this connection within the same
lan as the database, performance is perfectly fine. When I run
outside the lan, e.g. from home to work, performance is awful, and the
network traffic appears extremely chatty.

Is this normal?

I've never experienced this problem when developing traditional client
/ server apps, but that could be because the server usually resides on
the same fast network as the database.
Back to top
Silvio Bierman
Guest





PostPosted: Sun Jul 06, 2003 8:39 pm    Post subject: Re: Slow / Poor performance using Connection across network. Reply with quote




"Andrew Bray" <andrew.bray (AT) sherwoodinternational (DOT) com> wrote

Quote:
I've got a basic client (non j2ee) app that instantiates a connection
to our oracle database. When using this connection within the same
lan as the database, performance is perfectly fine. When I run
outside the lan, e.g. from home to work, performance is awful, and the
network traffic appears extremely chatty.

Is this normal?

I've never experienced this problem when developing traditional client
/ server apps, but that could be because the server usually resides on
the same fast network as the database.

Accessing an RDBMS is very network intensive. All well-known databases
(Oracle, SQLServer, MySQL, etc.) are not suited for WAN access in a data
intensive application.

You will need more abstract communication logic to reach decent performance
in a WAN situation. Have you considered creating a server application and
using a browser/HTML as the user interface?

Silvio Bierman



Back to top
Andrew Bray
Guest





PostPosted: Mon Jul 07, 2003 12:19 pm    Post subject: Re: Slow / Poor performance using Connection across network. Reply with quote



"Silvio Bierman" <sbierman (AT) idfix (DOT) nl> wrote

Quote:
"Andrew Bray" <andrew.bray (AT) sherwoodinternational (DOT) com> wrote in message
news:dd20437b.0307040839.31382c2 (AT) posting (DOT) google.com...
I've got a basic client (non j2ee) app that instantiates a connection
to our oracle database. When using this connection within the same
lan as the database, performance is perfectly fine. When I run
outside the lan, e.g. from home to work, performance is awful, and the
network traffic appears extremely chatty.

Is this normal?

I've never experienced this problem when developing traditional client
/ server apps, but that could be because the server usually resides on
the same fast network as the database.

Accessing an RDBMS is very network intensive. All well-known databases
(Oracle, SQLServer, MySQL, etc.) are not suited for WAN access in a data
intensive application.

You will need more abstract communication logic to reach decent performance
in a WAN situation. Have you considered creating a server application and
using a browser/HTML as the user interface?

Silvio Bierman

We have considered it, and it is likely in our future. The other
benefits (transaction management, pooling, etc) are important to us as
well. Unfortunately, an app server wasn't part of the original
application path. These performance problems will certainly be
important in helping us convince the customer an app server is likely
needed.

Out of interest, why is the performance so poor? It is just the
chattiness?

Back to top
Robert Klemme
Guest





PostPosted: Mon Jul 07, 2003 1:50 pm    Post subject: Re: Slow / Poor performance using Connection across network. Reply with quote


"Andrew Bray" <andrew.bray (AT) sherwoodinternational (DOT) com> schrieb im
Newsbeitrag news:dd20437b.0307070419.310ea685 (AT) posting (DOT) google.com...
Quote:
"Silvio Bierman" <sbierman (AT) idfix (DOT) nl> wrote

"Andrew Bray" <andrew.bray (AT) sherwoodinternational (DOT) com> wrote in message
news:dd20437b.0307040839.31382c2 (AT) posting (DOT) google.com...
I've got a basic client (non j2ee) app that instantiates a
connection
to our oracle database. When using this connection within the same
lan as the database, performance is perfectly fine. When I run
outside the lan, e.g. from home to work, performance is awful, and
the
network traffic appears extremely chatty.

Is this normal?

I've never experienced this problem when developing traditional
client
/ server apps, but that could be because the server usually resides
on
the same fast network as the database.

Accessing an RDBMS is very network intensive. All well-known databases
(Oracle, SQLServer, MySQL, etc.) are not suited for WAN access in a
data
intensive application.

You will need more abstract communication logic to reach decent
performance
in a WAN situation. Have you considered creating a server application
and
using a browser/HTML as the user interface?

Silvio Bierman

We have considered it, and it is likely in our future. The other
benefits (transaction management, pooling, etc) are important to us as
well. Unfortunately, an app server wasn't part of the original
application path. These performance problems will certainly be
important in helping us convince the customer an app server is likely
needed.

Out of interest, why is the performance so poor? It is just the
chattiness?

That depends on the driver as well as the nature of databases: a query can
return huge result sets. Thus a typical driver implementation will not
send all results in one stream but will send data if requested to do so
(i.e. on ResultSet.next()) or if you explicitely request a large prefetch.
Thus for a single iteration through the complete result there will be a
lot of communication back and forth.

Security reasons (firewalls) as well as application architectural
considerations make it more than reasonable to use another protocol for
client server communication than the database communication. If the db
schema changes you don't want to update all clients, do you?

Your protocol can be as simple as serialized instances via HTTP. Still
much better that using JDBC.

Regards

robert


Back to top
Andrew Bray
Guest





PostPosted: Mon Jul 07, 2003 5:00 pm    Post subject: Re: Slow / Poor performance using Connection across network. Reply with quote

"Robert Klemme" <bob.news (AT) gmx (DOT) net> wrote

Quote:
"Andrew Bray" <andrew.bray (AT) sherwoodinternational (DOT) com> schrieb im
Newsbeitrag news:dd20437b.0307070419.310ea685 (AT) posting (DOT) google.com...
"Silvio Bierman" <sbierman (AT) idfix (DOT) nl> wrote in message
news:<3f08899c$0$49111$e4fe514c (AT) news (DOT) xs4all.nl>...
"Andrew Bray" <andrew.bray (AT) sherwoodinternational (DOT) com> wrote in message
news:dd20437b.0307040839.31382c2 (AT) posting (DOT) google.com...
I've got a basic client (non j2ee) app that instantiates a
connection
to our oracle database. When using this connection within the same
lan as the database, performance is perfectly fine. When I run
outside the lan, e.g. from home to work, performance is awful, and
the
network traffic appears extremely chatty.

Is this normal?

I've never experienced this problem when developing traditional
client
/ server apps, but that could be because the server usually resides
on
the same fast network as the database.

Accessing an RDBMS is very network intensive. All well-known databases
(Oracle, SQLServer, MySQL, etc.) are not suited for WAN access in a
data
intensive application.

You will need more abstract communication logic to reach decent
performance
in a WAN situation. Have you considered creating a server application
and
using a browser/HTML as the user interface?

Silvio Bierman

We have considered it, and it is likely in our future. The other
benefits (transaction management, pooling, etc) are important to us as
well. Unfortunately, an app server wasn't part of the original
application path. These performance problems will certainly be
important in helping us convince the customer an app server is likely
needed.

Out of interest, why is the performance so poor? It is just the
chattiness?

That depends on the driver as well as the nature of databases: a query can
return huge result sets. Thus a typical driver implementation will not
send all results in one stream but will send data if requested to do so
(i.e. on ResultSet.next()) or if you explicitely request a large prefetch.
Thus for a single iteration through the complete result there will be a
lot of communication back and forth.

Security reasons (firewalls) as well as application architectural
considerations make it more than reasonable to use another protocol for
client server communication than the database communication. If the db
schema changes you don't want to update all clients, do you?

Your protocol can be as simple as serialized instances via HTTP. Still
much better that using JDBC.

Regards

robert


Thanks for the insights re: performance. Because of client
considerations (i.e. no server, just client software and a database -
I know, I know), we'll have to focus on optimizing the prefetches in
our queries.

Thanks again.

Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java and Databases All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.