레이블이 jaf인 게시물을 표시합니다. 모든 게시물 표시
레이블이 jaf인 게시물을 표시합니다. 모든 게시물 표시

2012년 1월 7일 토요일

Linked Data

출처 : http://www.ibm.com/developerworks/rational/library/basic-profile-linked-data/index.html

There is interest in using Linked Data technologies for more than one purpose. We have seen interest in it to expose information -- public records, for example -- on the Internet in a machine-readable format. The IBM® Rational® team has been using Linked Data as an architectural model and implementation technology for application integration.

We would like to share information about how we are using these technologies, the best practices and anti-patterns that we have identified, and the specification gaps that we have had to fill. These best practices and anti-patterns can be classified according to (but are not limited to) the following categories:
  • Resources
A summary of the HTTP and RDF standard techniques and best practices that you should use, and anti-patterns you should avoid, when constructing clients and servers that read and write Linked Data 
  • Containers
Defines resources that allow new resources to be created using HTTP POST and existing resources to be found using HTTP GET 
  • Paging
Defines a mechanism for splitting the information in large resources into pages that can be fetched incrementally 
  • Validation
Defines a simple mechanism for describing the properties that a particular type of resource must or may have

The following sections provide details regarding this proposal for a Basic Profile for Linked Data.

Basic Profile Resources

Basic Profile Resources are HTTP Linked Data resources that conform to simple patterns and conventions. Most Basic Profile Resources are domain-specific resources that contain data for an entity in a domain. All Basic Profile Resources follow the rules of Linked Data:
  1. Use URIs as names for things. 
  2. Use HTTP URIs so that people can look up those names. 
  3. When someone looks up a URI, provide useful information, using the standards (RDF*, SPARQL). 
  4. Include links to other URIs so that people can discover more things.
Basic Profile adds a few rules. Some of these rules could be thought of as clarification of the basic Linked Data rules.
  1. Basic Profile Resources are HTTP resources that can be created, modified, deleted and read using standard HTTP methods.
    Basic Profile Resources are created by HTTP POST (or PUT) to an existing resource, deleted by HTTP DELETE, updated by HTTP PUT or PATCH, and "fetched" using HTTP GET. Additionally, Basic Profile Resources can be created, updated, and deleted by using SPARQL Update.
  2. Basic Profile Resources use RDF to define their states.
    The state of a Basic Profile Resource (in the sense of state used in the REST architecture) is defined by a set of RDF triples. Binary resources and text resources are not Basic Profile Resources since their states cannot be easily or fully represented in RDF. XML resources might or might not be suitable as Basic Profile Resources. Some XML resources are really data-oriented resources encoded in XML that can be easily represented in RDF. Other XML documents are essentially marked up text documents that are not easily represented in RDF. Basic Profile Resources can be mixed with other resources in the same application.
  3. You can request an RDF/XML representation of any Basic Profile Resource.The resource might have other representations, as well. These could be other RDF formats, such as Turtle, N3, or NTriples, but non-RDF formats such as HTML and JSON would also be popular additions, and Basic Profile sets no limits.
  4. Basic Profile clients use Optimistic Collision Detection during update.
    Because the update process involves getting a resource first, and then modifying it and later putting it back on the server, there is the possibility of a conflict (for example, another client might have updated the resource since the GET action). To mitigate this problem, Basic Profile implementations should use the HTTP If-Match header and HTTP ETags to detect collisions.
  5. Basic Profile Resources use standard media types.
    Basic Profile does not require and does not encourage the definition of any new media types. A Basic Profile goal is that any standards-based RDF or Linked Data client be able to read and write Basic Profile data, and defining new media types would prevent that in most cases.
  6. Basic Profile Resources use standard vocabularies.
    Basic Profile Resources use common vocabularies (classes, properties, and so forth) for common concepts. Many websites define their own vocabularies for common concepts such as resource type, label, description, creator, last modification time, priority, enumeration of priority values, and so on. This is usually viewed as a good feature by users who want their data to match their local terminology and processes, but it makes it much harder for organizations to subsequently integrate information in a larger view. Basic Profile requires all resources to expose common concepts using a common vocabulary for properties. Sites can choose to additionally expose the same values under their own private property names in the same resources. In general, Basic Profile avoids inventing property names where possible. Instead, it uses ones from popular RDF-based standards, such as the RDF standards themselves, Dublin Core, and so on. Basic Profile invents property URLs where no match is found in popular standard vocabularies.
  7. Basic Profile Resources set rdf:type explicitly.
    A resource's membership in a class extent can be derived implicitly or indicated explicitly by a triple in the resource representation that uses the rdf:type predicate and the URL of the class or derived implicitly. In RDF, there is no requirement to place an rdf:type triple in each resource, but this is a good practice, because it makes a query more useful in cases where inferencing is not supported. Remember also that a single resource can have multiple values for rdf:type. Basic Profile sets no limits to the number of types a resource can have.
  8. Basic Profile Resources use a restricted number of standard data types.
    RDF does not define data types to be used for property values, so Basic Profile lists a set of standard datatypes to be used in Basic Profile.
  9. Basic Profile clients expect to encounter unknown properties and content.
    Basic Profile provides mechanisms for clients to discover lists of expected properties for resources for particular purposes, but it also assumes that any given resource might have many more properties than those listed. Some servers will support only a fixed set of properties for a particular type of resource. Clients should always assume that the set of properties for a resource of a particular type at an arbitrary server might be open, in the sense that different resources of the same type might not all have the same properties, and the set of properties that are used in the state of a resource is not limited to any predefined set. However, when dealing with Basic Profile Resources, clients should assume that a Basic Profile server might discard triples for properties when it has prior knowledge. In other words, servers can restrict themselves to a known set of properties, but clients cannot. When doing an update using HTTP PUT, a Basic Profile client must preserve all property values retrieved by using HTTP GET. This includes all property values that it doesn't change or understand. (Use of HTTP PATCH or SPARQL Update rather than HTTP PUT for updates avoids this burden for clients.)
  10. Basic Profile clients do not assume the type of a resource at the end of a link.
    Many specifications and most traditional applications have a "closed model," by which we mean that any reference from a resource in the specification or application necessarily identifies a resource in the same specification (or a referenced specification) or application. In contrast, the HTML anchor tag can point to any resource addressable by an HTTP URI, not just other HTML resources. Basic Profile works like HTML in this sense. An HTTP URI reference in one Basic Profile Resource can, in general, point to any resource, not just a Basic Profile Resource. There are numerous reasons to maintain an open model like HTML's. One is that it allows data that has not yet been defined to be incorporated in the web in the future. Another reason is that it allows individual applications and sites to evolve over time. If clients assume that they know what will be at the other end of a link, then the data formats of all resources across the transitive closure of all links must be kept stable for version upgrade. A consequence of this independence is that client implementations that traverse HTTP URI links from one resource to another should always code defensively and be prepared for any resource at the end of the link. Defensive coding by client implementers is necessary to allow sets of applications that communicate through Basic Profile to be independently upgraded and flexibly extended.
  11. Basic Profile servers implement simple validations for Create and Update.
    Basic Profile servers should try to make it easy for programmatic clients to create and update resources. If Basic Profile implementations associate a lot of very complex validation rules that need to be satisfied for an update or creation to be accepted, it becomes difficult or impossible for a client to use the protocol without extensive additional information specific to the server that needs to be communicated outside of the Basic Profile specifications. The recommended approach is for servers to allow creation and updates based on the sort of simple validations that can be communicated programmatically through a Shape (see the Constraints section). Additional checks that are required to implement more complex policies and constraints should result in the resource being flagged as requiring more attention, but should not cause the basic Create or Update action to fail.
  12. Basic Profile Resources always use simple RDF predicates to represent links.
    By always representing links as simple predicate values, Basic Profile makes it very simple to know how links will appear in representations and also makes it very simple to query them. When there is a need to express properties on a link, Basic Profile adds an RDF statement with the same subject, object, and predicate as the original link, which is retained, plus any additional "link properties." Basic Profile Resources do not use "inverse links" to support navigation of a relationship in the opposite direction, because this creates a data synchronization problem and complicates a query. Instead, Basic Profile assumes that clients can use queries to navigate relationships in the opposite direction from the direction supported by the
    underlying link.

2012년 1월 6일 금요일

Analytic Reporting & Live Reporting

출처 : https://jazz.net/wiki/bin/view/Main/LinkedLifecycleData

Linked Data is a design for sharing decentralized, but interrelated, data on the Web.


At any given point in the development lifecycle it is of great interest to understand how requirements, source code, test cases, and defects are related. Typical questions are,
  • "Which requirements don't have any test cases?" and
  • "How many defects are unresolved for each requirement?" 

Design 1.

One design for integrating this lifecycle data is to develop relational models for each type of development artifact and then store the corresponding relational representations of all the artifacts in a data warehouse where they can be queried, reported on, and analyzed using conventional business intelligence tools such as BIRT and Cognos.

Analytical Reporting



Design 2.

Linked Data offers an alternative way to solve the data integration problem. The key advance here is that Linked Data provides a uniform way to identify artifacts, namely HTTP Uniform Resource Identifiers (URI), and a common data model and representation format for them, Resource Description Framework (RDF). Data integration among mutliple sources of development artifacts is achieved by loading the RDF representations of all the development artifacts into a shared triple store, e.g. Jena, which can be queried using the powerful SPARQL query language.

The main tiers of this architecture are as follows:
  • Data Source Tier - CLM Development Tools that provide Linked Data
  • Reporting and Query Service Tier - Indexer, RDF Triple Store (Jena/TDB), SPARQL Endpoint
  • Presentation Tier - Business Intelligence reporting and analysis (Cognos, BIRT), Document generation (RPE), Faceted browsing 
Live Reporting

-

Indexing & Query

1. 다양한 형태의 resource는 storage에 저장됩니다.

2. property indexing은 저장된 resource로 부터 정보를 추출하여 공통 RDF 형태로 storage에 저장합니다.

3. query는 공통 RDF 형태에 대해 질의하여 결과를 리턴합니다.

예) 내가 작성(공통 property dc:creator에 기반)한 resource(요구사항/작업항목/테스트케이스/...)에 대한 query

예) change set에 link(다양한 storage에 저장된 resource간의 link에 기반)된 resource(작업항목/요구사항/테스트케이스/...)에 대한 query

4. JFS는 두 종류의 index를 빌드합니다. 하나는 property index이고 다른 하나는 full text index입니다.

5. Property 기반 indexer는 resource로 부터 구조화된 property를 추출하여 SQL 비슷한 방식의 query (structured query)를 사용할 수 있도록 합니다.

6. Text indexer는 resource로 부터 text를 추출하여 Apache Lucene 엔진에 제공하여 full text search ("fuzzy" query)를 제공합니다.

7. repotools -reindex는 offline server에 대해 수행됩니다. 기본적으로 query triple store와 Lucene text store를 빌드합니다. 기본적으로 resource의 최근 버전에 대해서만 빌드합니다. 전체 버전에 대한 빌드는 시간비용이 많이 소요되기 때문입니다.

참고 : Jazz Integration Architecture ( https://jazz.net/projects/DevelopmentItem.jsp?href=content/project/plans/jia-overview/index.html )



RDF & SPAQL

출처 : http://www.w3.org/TR/rdf-concepts/

The Resource Description Framework (RDF) is a framework for representing information in the Web.

The underlying structure of any expression in RDF is a collection of triples, each consisting of a subject, a predicate and an object. A set of such triples is called an RDF graph.


  • a subject, 
  • an object, and 
  • a predicate (also called a property) that denotes a relationship. 


RDF 예

<http://reqs.com/req/1234>   rdf:type                oslc_rm:Requirement
<http://reqs.com/req/1234>   dcterms:title           "Smooth upgrade path"
<http://reqs.com/req/1234>   oslc_rm:elaboratedBy    <http://reqs.com/req/7772>
<http://reqs.com/req/1234>   oslc_rm:validatedBy     <http://tests.com/test/521>


<http://tests.com/test/521>   rdf:type                oslc_qm:TestCase
<http://tests.com/test/521>   dcterms:title           "Verify compatibility"
<http://tests.com/test/521>   oslc_qm:usesTestScript  <http://tests.com/script/13>


SPARQL is standard query language for RDF datasets

SPARQL 예

SELECT ?uri ?title WHERE {
   ?uri rdf:type              oslc_rm:Requirement .
   ?uri dcterms:title         ?title .}

결과


uri title
<http://reqs.com/req/1234> "Smooth upgrade path"
-

2011년 12월 31일 토요일

Jazz Application Framework Overview

https://jazz.net/wiki/bin/view/Main/JAFIntroduction




When building an application using JAF, it is helpful to simplify the topology and think about the following pieces:
-
When building an application on the Jazz platform, there are two distinct kinds of shared implementation capabilities:
  1. Integration services, which can be employed for the purpose of integrating tools. These integration services should have the same loosely-coupled, protocol-driven characterstics as OSLC.
  2. Application frameworks, which can be used to develop Jazz-based products from the ground up. These frameworks may make use of the integration services. 
The Jazz Application Frameworks (JAF) aims to provide:
  1. Architectural guidance for designing new Jazz products that have a common look, behavior and collaboration capabilities.
  2. An JAF SDK in the form of an empty OSGi application shell that provides a framework for a richer, more dynamic and layered application.
    참고: https://jazz.net/wiki/bin/view/Main/JAFSdkContents
  3. A set of reusable features packaged as OSGi bundles that can optionally be embedded in the SDK to provide a range of common functionalities, including Web UI frameworks or toolkits, process capabilities, a persistance layer with query capabilities, reporting and data warehousing, and others.
  4. A set of low-level common utils and libraries that can be deployed as OSGi bundles or plain JARs. For example, OAuth helpers, Jazz HTTP clients.
  5. A Jazz Team Server (JTS) providing common user admininistration, delegated authentication, licensing, dashboards, and data warehousing to the applications associated with it.
-

Jazz Application Framework Transition

https://jazz.net/wiki/bin/view/Main/JAFSdkTransition

FROM
  • an application that was developed with the older Application SDK 3.x.x.x, using functional services from a shared Jazz Team Server (JTS).
  • The Application SDK included a framework for defining application REST services. Application services were declared in plugin.xml files as extensions of the com.ibm.team.jfs.app.restServices extension point, and implemented as extensions of the com.ibm.team.jfs.app.RestService class.
  • Fronting applications only needed to build against a few Foundation features: 
    • com.ibm.team.jfs.sdk.runtime.feature 
    • net.jazz.ajax.app.jfs.feature 
    • net.jazz.ajax.app.jfs.feature 


TO
  • use the new JAF SDK 4.x.x.x, using local functional services and data storage.
  • the JAF SDK includes the Jazz OSGi services framework (see the HelloJAF tutorial for a brief introduction).
  • the JAF SDK is considered to be this set of features:
    • com.ibm.team.app.server.jfs.feature
    • com.ibm.team.dashboard.server.jfs.feature
    • com.ibm.team.gateway.server.jfs.feature
    • com.ibm.team.jazz.server.feature
    • com.ibm.team.process.server.jfs.feature
    • com.ibm.team.reports.server.jfs.feature
    • com.ibm.team.repository.server.jfs.feature
    • com.ibm.team.repository.services.jfs.feature
    • net.jazz.ajax.app.jfs.feature
    • net.jazz.ajax.jfs.feature 


https://jazz.net/wiki/bin/view/Main/JAFSdkIntroduction


Jazz Application Frameworks SDK

One of the primary deliverables of the Jazz Application Frameworks is an SDK for building applications. This SDK takes the form of an empty OSGi application shell that provides a framework for a rich, dynamic layered application. Applications embed functional services from this SDK, which they invoke locally. Some integration services, such as user management, licensing and authentication, are delegated to a Jazz Team Server (JTS) which may be shared amongst multiple applications. This SDK will be part of the Jazz Application Frameworks 4.0 release.

The history of the SDK

A brief word is required here to explain the multiple SDKs which exist, and where the JAF SDK fits in to the story.

Jazz 0.6 SDK

The "0.6 SDK" included local execution of functional services in an OSGi application. It included a repository service framework, a persistence story, process, reporting, Web UI, and dashboards. Such an application has a local database for storage. RTC and RQM are based on the Jazz 0.6 SDK.

Application SDK

The Application SDK described OSGi or pure Java "fronting applications" which rely on a shared JTS for functional services such as storage. It communicated with the JTS using REST to consume these services. RRC is a fronting application based on the Application SDK.

JAF SDK

In 2012, the preferred approach for building applications on JAF is changing. Instead of creating fronting applications that consume functional services from a shared JTS, applications will embed the functional services and invoke them locally. There are a number of advantages to this approach, including reducing the load on the JTS and unifying two SDK stories into one. The JAF SDK is essentially the 0.6 SDK, with some compatibility and transition add-ons to aid applications which are currently build on the Application SDK. Applications will continue to use the JTS for integration services.

-