Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Lyo » How control the verbosity of the rdf?
How control the verbosity of the rdf? [message #1164430] Thu, 31 October 2013 17:27 Go to next message
Nils Kronqvist is currently offline Nils KronqvistFriend
Messages: 10
Registered: July 2009
Junior Member
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 #1170249 is a reply to message #1164430] Mon, 04 November 2013 14:05 Go to previous messageGo to next message
Samuel Padgett is currently offline Samuel PadgettFriend
Messages: 30
Registered: July 2009
Member
Hi, Nils. You can change the annotation to Reference, but you'd also need to change the return type to URI[] instead of ServiceProvider[], which would prevent any data from being inlined. 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.

If you want the RTC catalog behavior in Bugzilla, you can leave the signature of getServiceProviders() the same and update the Bugzilla ServiceProviderCatalogService to only fill in the URI and title of the ServiceProvider. You'll want to make sure the full service provider document still comes back when fetching it individually by its URI.

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?
Re: How control the verbosity of the rdf? [message #1170405 is a reply to message #1170249] Mon, 04 November 2013 16:19 Go to previous message
Nils Kronqvist is currently offline Nils KronqvistFriend
Messages: 10
Registered: July 2009
Junior Member
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 ..?




Previous Topic:DoorsOauthSample - Unable to get the Entity of the Resource Shape for Requirements
Next Topic:Recommended url paths? Bugzilla example ..?
Goto Forum:
  


Current Time: Tue Apr 16 11:56:58 GMT 2024

Powered by FUDForum. Page generated in 0.76752 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top