ResultSet Framework

From Gcube Wiki
Revision as of 11:23, 7 February 2007 by Gpapanikos (Talk | contribs) (Creating an RS)

Jump to: navigation, search

ResultSet Framework

Introduction

The ResultSet Framework provides the enabling mechanism to pass by reference data between components and / or services that can be hosted in the same or remote nodes. It utilizes the WSRF Framework for keeping state and offers value adding opeartions for encapsulating remote and local calls, paging of content, data movement, remote processing and much more fun stuf which you can discover your self instead of me having to right them down you lazy bum (J).......

Implementation Overview

The framework consists of 4 sub components :

  1. the ResultSet library
  2. the ResultSet Service
  3. the ResultSet Client
  4. the ResultSet Garbage Collector


  • The ResultSet is the enabling element that creates a linked list of pages holding the records that are part of the specific result set. It can iterate over the created parts and perform various operations on the structure of the list and the contents themselves. Its operations are mosty part specific bu they can also affect the entire result chain. Once a page of content has been created and the next in line has been initialized the part cannot be altered. Once it has been declared that the authoring of a result set has finished, the entire chain of it is immutible.
  • The ResultSet Service is merely a WS front-end to the ResultSet library. It creates and manages WS-Resources holding rferences to instances of the ResultSet components. These instances are responsible to hold state regarding the iteration over the chain of pages and for accessing / modifying / querying the data held.
  • The ResultSet Client is a library giving access to both high and low level operations that can be performed on a specific ResultSet component instance and its underlying data. It enables handling of ResultSets that are both wrapped through a WS front-end and that are locally manipulated though direct java invocations (within JVM).
  • The ResultSet Garbage Collector is a deamon-like program that can be initialized to clear up resources used by the ResultSet Framework (removing filesystem resources and destroying created WS-Resources)

Dependencies

  • ResultSetLibrary
    • jdk 1.5
    • WS-Core
  • ResultSetService
    • jdk 1.5
    • WS-Core
    • ResultSetLibrary
  • ResultSetClient
    • jdk 1.5
    • WS-Core
    • ResultSetLibrary
    • ResultSetService
  • ResultSetGarbageCollector
    • jdk 1.5
    • WS-Core
    • ResultSetLibrary
    • ResultSetService stubs

Usage Example

Creating an RS

public RSXMLWriter createRSWriter() throws Exception{

  RSXMLWriter writer=RSXMLWriter.getRSXMLWriter();
writer=RSXMLWriter.getRSXMLWriter(30,1024);
writer=RSXMLWriter.getRSXMLWriter(new PropertyElementBase[]{new PropertyElementLifeSpanGC(1000)});
writer.setRecsPerPart(10);
writer.addResults(new ResultElementGeneric("id1","collection1","rank1","payload"));
writer.addResults(new ResultElementGeneric("id2","collection1","rank2","payload"));
writer.addResults(new ResultElementGeneric("id3","collection1","rank3","payload"));
writer.addResults(new ResultElementGeneric("id4","collection1","rank4","payload"));
writer.addResults(new ResultElementGeneric("id5","collection1","rank5","payload"));
writer.addResults(new ResultElementBase[]{new ResultElementGeneric("id6","collection1","rank6","payload"),
new ResultElementGeneric("id7","collection1","rank7","payload")});
return writer;

}

Retrieving a locator

Creating an RS

Reading an RS

Extending Base elements

Complex Operations