Hi, > I'm completely skipping over my lack of understanding of creating > asynchronous web services. I understand the part a Future object to the > client, > the client uses that to get the results, but I could never wrap my head around > how it is implemented on the server side, where and how does the server > persist data until the client picks it up, etc.
Regarding asynchronous processing on the service side, I tried to systemize different jax-ws async approaches in following blog: http://ashakirin-cxf-async.blogspot.de/ I hope it can be useful for you. Regards, Andrei. > -----Original Message----- > From: Hart, Andrew B. [mailto:[email protected]] > Sent: Mittwoch, 12. März 2014 23:58 > To: '[email protected]' > Subject: Another question re Chunking > > All, > > Also, I'd like to explain the problems we've been having and have my > understanding of "chunking" clarified. > > Now, we have some web service operations which have the potential to fetch A > LOT of data. Some of these have been written to be "asynchronous" and/or > "chunked". But, I'm not utilizing CXF features to accomplish this; I mean > that > we have written two endpoints, one to request data where information is > extracted and saved off in the database with a reference / correlation id. > Then, > a second endpoint is used to fetch the data using the correlation id. > > In the case of the "chunked" web services, the client also supplies a chunk > number and so we fetch the desired subset of the rows and send them back. > > Now, in the case of the chunk-encoding that CXF provides, that is at the > transport level, and I understand that it is the default for responses over > 4K. So, > I can see responses coming back with... > > Wed Mar 12 17:28:57 CDT 2014:DEBUG:<< "Transfer-Encoding: > chunked[\r][\n]" > > ...and I see it picking up the chunks until a zero length chunk is sent at > which > time it is then GZipped, run thru WS-Security processing and the response > displayed. > > So, essentially, the transport layer chunking allows us to send larger > reponses > back without the client losing the socket and/or timing out. However, if we > don't chunk at the *application* level, that means that, on both the server > and > the client, we have to construct and handle larger response. Most of my > resource limitations have been encountered when encrypting or decrypting > very large responses, so transport level chunking doesn't help with that. > > Is my understanding correct? Is chunking at the application/service > implementation level the best, or most standard, way of dealing with problems > like this? > > I'm completely skipping over my lack of understanding of creating > asynchronous web services. I understand the part a Future object to the > client, > the client uses that to get the results, but I could never wrap my head around > how it is implemented on the server side, where and how does the server > persist data until the client picks it up, etc. > > Regards, > > Andrew > > > >
