Hello Rob,

More remarks marked with DGS.

Dan

From: Rob Sargent <rsarg...@xmission.com>
Sent: Tuesday, August 12, 2025 4:47 PM
To: Tomcat Users List <users@tomcat.apache.org>
Cc: Tomcat Users List <users@tomcat.apache.org>
Subject: Re: How to access a REST service

> On Aug 12, 2025, at 2:29 PM, Daniel Schwartz 
> <d...@danielgschwartz.com<mailto:d...@danielgschwartz.com>> wrote: > > Hello 
> Felix, > > See my replies marked with DGS. > > Dan > > DGS: I explained this 
> in a previous email. Each user interaction
NkdkJdXPPEBannerStart
Be Careful With This Message
From (Rob Sargent 
<rsarg...@xmission.com>)<https://godaddy1.cloud-protect.net/email-details/?k=k1&payload=53616c7465645f5f7d83eb5bc0da9ce032742e1727d69909aabd7a803384b835c7cd8bae99c1ec0bf5963d3abfa0fb2dbddcfb7188813f83a28396921439fc9d27c7e1b17517952e7ac323bc29f618abe08be370043eb0ee805afd1d089d228e15dbea14e3ccfd11b25a9a4753f4d782cc66e817bfe34484472f7e0df37681ecbdd7cc77993ce8c38d90f6e0dc3e8be2737f7e7b1a1a41c7b6b94a0c6dde45e1cc4e80b862723696a80b35810dc1ed4c40ecd69833beadd0eadd1366f64b511db69ea145108a4301b048308d4c661078700c558d0b7c00a9291ce02375032346c65684296505585c4d1911820c6e2685>
Learn 
More<https://godaddy1.cloud-protect.net/email-details/?k=k1&payload=53616c7465645f5f7d83eb5bc0da9ce032742e1727d69909aabd7a803384b835c7cd8bae99c1ec0bf5963d3abfa0fb2dbddcfb7188813f83a28396921439fc9d27c7e1b17517952e7ac323bc29f618abe08be370043eb0ee805afd1d089d228e15dbea14e3ccfd11b25a9a4753f4d782cc66e817bfe34484472f7e0df37681ecbdd7cc77993ce8c38d90f6e0dc3e8be2737f7e7b1a1a41c7b6b94a0c6dde45e1cc4e80b862723696a80b35810dc1ed4c40ecd69833beadd0eadd1366f64b511db69ea145108a4301b048308d4c661078700c558d0b7c00a9291ce02375032346c65684296505585c4d1911820c6e2685>
Potential Impersonation
The sender's identity could not be verified and someone may be impersonating 
the sender. Take caution when interacting with this message.

NkdkJdXPPEBannerEnd





> On Aug 12, 2025, at 2:29 PM, Daniel Schwartz 
> <d...@danielgschwartz.com<mailto:d...@danielgschwartz.com>> wrote:

>

> Hello Felix,

>

> See my replies marked with DGS.

>

> Dan

>

> DGS:  I explained this in a previous email.  Each user interaction requires 
> either 3 or 4 database queries.  That’s how my system works.  There’s no way 
> around this.  But it’s really quite quick.  Three of the four queries are 
> simple SQL table look-up queries; only one requires any complex computations.

>

We can’t see exactly how those three queries are performed. They could be:

- on three separate and serial db calls

- all rolled into a single batch of DML

- each sql statement sent simultaneously (nearly) on a separate thread.



The first two require only one db connection. Each call will acquire and 
release the connection. And the first of those will hold that connection for 
the shorter time, the second for the longer time.



The third option will possibly finish the db work fastest id the is no 
contention amongst the queries.   But this is the only one which requires more 
than one simultaneous db connection.



Does any of these match your architecture?



DGS:  If you go to my website, www.worldholidaysandevents.com, and make a 
request for holiday info for, say, Tallahassee, Florida, USA, 2025, you will 
see the following actions:



1.      The Countries list is filled with a list of countries.  This is one DB 
connection.

2.      When you select United States of America, the States and Cities lists 
are filled with US states and cities.  This is one more DB connection, actually 
two queries in one connection.

3.      When you select Florida from the States list, then the cities list is 
refilled with just Florida cities.  This is one more DB connection.

4.      When you select 2025 as the year and click “Explore” this is another DB 
connection, calculating dates and returning the list of holidays and events.



So the way the system currently operates, all these DB connections are 
necessary.  However, if there were some way to identify a user “session”, then 
all of these queries could be carried out in one session and with only one DB 
connection per session.  Probably there is a way to do this, but I haven’t 
explored it yet.  Right now, if you run these operations, you’ll see that the 
response is very quick.  However, I don’t know what might happen if I were to 
get a lot of users.







---------------------------------------------------------------------

To unsubscribe, e-mail: 
users-unsubscr...@tomcat.apache.org<mailto:users-unsubscr...@tomcat.apache.org>

For additional commands, e-mail: 
users-h...@tomcat.apache.org<mailto:users-h...@tomcat.apache.org>


Reply via email to