[
https://issues.apache.org/jira/browse/OLINGO-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13833629#comment-13833629
]
Eugenio Lentini commented on OLINGO-72:
---------------------------------------
Hi Stephan,
I imagine the client application will display that link in some way and when
the user clicks on that link other data will be fetched doesn't it?
In my case I am writing an OData service to be consumed exclusively by MS-Excel
so I doubt that Excel could use the next link to get more data.
I am facing with a big data content and if I follow the current approach I
should load the data from the data source, fill the List<Map<String, Object>>
and then AtomFeedProducer writes all of them inside of the CircleStreamBuffer
internal input/output stream which, in turn, is set as entity of the
ODataResponse. The entity will become the body of the response the client will
get. This entity is then used to build the cxf.jaxrs.impl.Response object which
I suppose is finally streamed by the conduit in the transport layer of the
apache CXF framework.
For the time being it works but let's say I have 1M of lines in the data
source, I should have a List object with 1M of line, then at the same time an
input stream object with the same amount of lines. I should try to limit the
number of object I have in memory at a given time.
I do not know CXF so much but debugging and looking at the source code It would
be good if Olingo could stream directly in the conduit, I do not know if it is
feasible but messaging in CXF is stream-oriented so they are not sent as a
bunch, so step by step filling the messaging with data produced by the
AtomEntryEntityProducer.
Sorry if I have been lengthy :-)
Eugenio
> Processor interceptor and data stream
> -------------------------------------
>
> Key: OLINGO-72
> URL: https://issues.apache.org/jira/browse/OLINGO-72
> Project: Olingo
> Issue Type: Improvement
> Components: odata2-core
> Affects Versions: V2 1.1.0
> Reporter: Eugenio Lentini
>
> Good morning,
> I have two questions/improvements for olingo:
> 1) a sort of processor interceptor for authorization: for the time being I
> have implemented a processor in order to perform the authorization of my
> odata service.
> Some clients, such as MS-Excel, want a specific answer in order to send
> user:pass so I have put this response with error 401 inside of a processor
> which is created by the Factory. Once the client has sent the credentials I
> can instantiate, always inside of the factory, the processor to build the
> atom feed.
> 2) stream data to the client: I have a lot of data, may be big data, and I
> cannot load all of them in memory for the conversion so it would be great to
> have a way to have access to the response object, or another way, to stream
> data to the client and not in one shot.
> If it is already possible could you please suggest the method or document it?
> In case I could even send you a working example to save up your time.
> Thanks a lot for the attention and the work you are doing.
> Eugenio
--
This message was sent by Atlassian JIRA
(v6.1#6144)