How control the verbosity of the rdf? [message #1164430] |
Thu, 31 October 2013 13:27  |
Eclipse User |
|
|
|
Hi,
Is there an intended way of controlling the verboseness of the rdf within the spec limits using the oslc4j SDK?
I'm using the Bugzilla example, and find the rdf response for the ServiceProviderCatalog a bit verbose. For each ServiceProvider listed, many details are included e.g. query capability, selection dialog - and I assume a common use of the service catalog is to select a ServiceProvider for next steps.
For a server with e.g. 100+ ServiceProviders, this result in some performance issues. I compare with the rdf from Rational Team Concert where a ServiceProvider has the following entry:
<oslc:serviceProvider>
<oslc:ServiceProvider rdf:about="<server>/ccm/oslc/contexts/_TcKs8UCIEeK8COyM0M5s3w/workitems/services.xml">
<dcterms:title rdf:parseType="Literal">JKE Banking (Change Management)</dcterms:title>
<oslc:details rdf:resource="<server>/ccm/process/project-areas/_TcKs8UCIEeK8COyM0M5s3w" />
<jfs_proc:consumerRegistry rdf:resource="<server>/ccm/process/project-areas/_TcKs8UCIEeK8COyM0M5s3w/links" />
</oslc:ServiceProvider>
</oslc:serviceProvider>
I noted there is an annotation: @OslcRepresentation(Representation.Inline) but simply changing to the other alternative - Reference .. caused a "controlled" exception in runtime, see below:
javax.servlet.UnavailableException: org.eclipse.lyo.oslc4j.core.exception.OslcCoreInvalidRepresentationException: OSLC006: Invalid representation http : //open-services.net/ns/core#Reference defined for method getServiceProviders of class org.eclipse.lyo.oslc4j.bugzilla.resources.ServiceProviderCatalog
at org.apache.wink.server.internal.servlet.RestServlet.init(RestServlet.java:111)
So .. see the initial question .. any tips here?
Rgs,
/N
|
|
|
|
Re: How control the verbosity of the rdf? [message #1170405 is a reply to message #1170249] |
Mon, 04 November 2013 11:19  |
Eclipse User |
|
|
|
Thanks for fast reply.
>> You can change the annotation to Reference, but you'd also need to change the return type to URI[] instead of ServiceProvider[]
Right, missed that - makes sense, thanks!
>> I'm not sure how well a tool like RTC would handle this since it needs a label to show for the provider when creating project links.
Exactly - so, will try tip of returning url & title for getServiceProviders - and full SP when access using getServiceProvider.
>> I don't know offhand if this would address the performance problem you're seeing. We'd really need to profile and see where the bottleneck is. How much of the slowness is fetching the list of products using j2bugzilla?
The performance issue I was mainly concerned about was the size of the returned rdf if 100++ projects -- i.e. processing cost on the receiving end. But also getting all data for all SPs would likely cause some cost for fetching as well. So IMO the "pattern" of only returning url + title if getting all SPs might be a good general pattern ..?
|
|
|
Powered by
FUDForum. Page generated in 0.04985 seconds