[OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Jeanne Boyarsky wrote:Or a servlet with the init on startup option set in the web.xml.
I thought that init() method in a servlet was called the first time a request was made against that servlet..isn't so ?
I never used Web app context listener... is it initialized just when an application is started ?
By the way, what do you think about the idea of using a custom client-server protocol ?
Marco Ehrentreich wrote:That sound like you already did your homework and you are well ware of the potential problems and solutions!
Marco Ehrentreich wrote:
Anyway, from what I know so far about your problem it seems that you should go for a compact data format and try to transport as many data as possible with the least number of round trips between client and server, right?
If the size of the data is the bigger problem a binary format (like the said BSON or Protocol Buffers) will probably be the best you can get and certainly more compact than base64 encoded data. If performance suffers from high latency and the number of calls to the serve you will have to figure out a way to package more data into less response packets. Maybe it is a waste of traffic but still more efficient to prefetch some data in advance so that you don't need to call back to the server if the client needs that data?
Doe, a deer, a female deer. Ray, a pockeful of sun. Me, a name, I call my tiny ad ...
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|