On 2017-09-19 09:57, Dave Reynolds wrote: > On 19/09/17 01:13, Dimov, Stefan wrote: >> Hi, >> >> I have Tomcat setup, that receives REST requests, “translates” them >> into SAPRQL queries, invokes them on the underlying FUSEKI and returns >> the results: >> >> >> USER AGENT >> ^ >> REST >> v >> --------------- >> TOMCAT >> ^ >> REST >> v >> ------------- >> FUSEKI >> ------------ >> JENA >> ----------- >> TDB >> ---------- >> >> Would I be able to achieve significant performance improvement, if I >> use directly the JENA libraries and bypass FUSEKI? > > Unlikely. We successfully use the set up you describe for dozens of > services, some quite high load. We have a few which go direct to Jena > for legacy reasons and they show no particular performance benefits. > > If your payloads can be large then make sure the way you are driving > fuseki is streaming and doesn't accidentally store the entire SPARQL > results in your tomcat app. This also means chosing a streamable media > type for your fuseki requests.
I'm using Jena to create my own REST service and I'm facing some issues when SPARQL resultsets are big. Could you please give me a hint on the streaming stuff from fuseki so I can incorporate that to my REST service? > That said, if you have very large payload sizes from fuseki but smaller > payloads returned to the client (e.g. you do some aggregation in your > app) then there could be benefit in by-passing the second http hop to > fueski. In our cases the two REST streams are broadly comparable size > (e.g. we reformat as JSON and do some row coalescing, but any aggregates > or filters are computed in the SPARQL query not our own REST processor). > > Dave > >
