Difference between revisions of "GCF Primer"

From GCube System
Jump to: navigation, search
Line 17: Line 17:
 
## [[Adding State#A Test Client|A Test Client]]
 
## [[Adding State#A Test Client|A Test Client]]
 
# [[Learning more]]
 
# [[Learning more]]
== Tutorial overview ==
 
This tutorial intends to present gCore and its related software required to design, build, and deploy software that can be effectively used to build complex applications that might be eventually integrated within a gCube infrastructure.
 
  
=== How this tutorial is organized ===
+
[[User:Manuele.simi|Manuele.simi]] 17:18, 24 March 2008 (EET)
The tutorial takes an incremental approach to illustrate all the steps of the service development cycle in relation to a first Port-Type. For simplicity, it assumes the Port-Type to be stateless. Then it introduces the assumption of state, when by enriching the sample service with additional Port-Types.
+
 
+
=== Who should use this tutorial ===
+
gCore Tutorial is dedicated to developers that have an average knowledge of Unix-like systems and Java, and some experience with Web Service concepts, terminology, and procedures. The purpose of the tutorial is to help them take advantage of the numerous patterns, interfaces, frameworks, and tools offered by the ''gCore framework'' creating well-structured and supported gCube services.
+
 
+
== Ground rules: preparing the environment ==
+
* Exclusively a Java & Unix-like system environment
+
** JDK 1.5.0_08+
+
** OS requirements as per underlying Globus
+
* Typically, a Shell + IDE environment
+
** IDE for code configuration & authoring
+
** Shell for code building & deployment
+
** Require both installation & configuration
+
 
+
== Obtaining and running gCore ==
+
* through SVN checkout
+
''https://svn.research-infrastructures.eu/gcore/gcore/trunk/GCORE/CONTAINER''
+
* with Etics downloads (only for gCube developers)
+
''https://grids16.eng.it/BuildReport/'', Module: org.gcore.gcontainer
+
* through command line or IDE plugin alike, e.g. Subversion for Eclipse
+
 
+
Put it into a folder of choice (named from now on, the ''gCore LOCATION'')
+
 
+
=== gCore at a glance ===
+
 
+
Here is the directory structure once the gCore distribution is uncompressed
+
<pre>
+
gCore LOCATION
+
|
+
|-bin
+
|
+
|-config
+
|
+
|-endorsed
+
|
+
|-etc
+
|
+
|-lib
+
|
+
|-libexec
+
|
+
|-share
+
      |
+
      |-gcore_tools
+
      |-globus_wsrf_common
+
      |-globus_wsrf_core
+
      |-globus_wsrf_core_registry
+
      |-globus_wsrf_msd_userful_rp_schema
+
      |-globus_wsrf_test
+
      |-globus_wsrf_tools
+
      |-licences
+
      |-schema     
+
</pre>
+
 
+
Here is the list of the most significant directory names:
+
* ''bin'' contains the commands
+
* ''config'' contains the GHN configuration files
+
* ''etc'' is used to place container and service-specific configurations
+
* ''lib'' contains service & 3rd-party software
+
* ''share/gcube_tools'' contains the gCore build scripts
+
* ''share/schema'' contains service, standard and gCore-specific interfaces
+
 
+
=== Dealing with Globus ===
+
In order to deal with the underlying Globus technology, the following steps are needed:
+
#export GLOBUS_LOCATION to the gCore LOCATION
+
#export PATH to gCore bin
+
#configure ''${GLOBUS_LOCATION}/etc/globus_wsrf_core/server-config.wsdd'' by specifying the hostname as value of the logicalHost parameter
+
+
<pre>
+
 
+
<deployment name="defaultServerConfig" xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java" xmlns:wsa="http:/
+
/schemas.xmlsoap.org/ws/2004/03/addressing" xmlns:wsnt="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd" xmlns:wsrp="http://d
+
ocs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
 
+
    <globalConfiguration>
+
        <parameter name="logicalHost" value="localhost"/>
+
        [...]
+
    <globalConfiguration>
+
</deployment>
+
 
+
</pre>
+
 
+
To test it: start GHN  ''gcore-start-container -nosec'' (by default on 8080, otherwise start with ''-p <port>'')
+
 
+
=== GHN Passport ===
+
The main configuration file of gCore is ''GLOBUS_LOCATION/config/GHNConfig.xml'':
+
<pre>
+
<?xml version="1.0" encoding="UTF-8"?>
+
<jndiConfig xmlns="http://wsrf.globus.org/jndi/config">
+
    <global>
+
 
+
                <environment
+
                        name="securityenabled"
+
                        value="true"
+
                        type="java.lang.Boolean"
+
                        override="false" />
+
                <environment
+
                        name="mode"
+
                        value="development"
+
                        type="java.lang.String"
+
                        override="false" />
+
                <environment
+
                        name="rootVO"
+
                        value="/gcube"
+
                        type="java.lang.String"
+
                        override="false" />
+
                <environment
+
                        name="defaultVO"
+
                        value="/gcube/devsec"
+
                        type="java.lang.String"
+
                        override="false" />
+
                <environment
+
                        name="infrastructure"
+
                        value="development"
+
                        type="java.lang.String"
+
                        override="false" />
+
                <environment
+
                        name="labels"
+
                        value="GHNLabels.xml"
+
                        type="java.lang.String"
+
                        override="false" />
+
                <environment
+
                        name="rootGHN"
+
                        value="true"
+
                        type="java.lang.Boolean"
+
                        override="false" />
+
                <environment
+
                        name="GHNtype"
+
                        value="Dynamic"
+
                        type="java.lang.String"
+
                        override="false" />
+
                <environment
+
                        name="localProxy"
+
                        value="/home/globus/..."
+
                        type="java.lang.String"
+
                        override="false" />
+
                <environment
+
                        name="coordinates"
+
                        value="43.719627,10.421626"
+
                        type="java.lang.String"
+
                        override="false" />
+
                <environment
+
                        name="country"
+
                        value="it"
+
                        type="java.lang.String"
+
                        override="false" />
+
                <environment
+
                        name="location"
+
                        value="Pisa"
+
                        type="java.lang.String"
+
                        override="false" />
+
                <environment
+
                        name="updateInterval"
+
                        value="60"
+
                        type="java.lang.Long"
+
                        override="false" />
+
 
+
    </global>
+
</jndiConfig>
+
 
+
</pre>
+
 
+
Let's see the meaning of the parameters by grouping them for their logical role.
+
 
+
Running mode:
+
* ''securityenabled'' ...
+
* ''mode'' (allowed values are development/production)
+
* ''rootGHN''...
+
* ''localProxy''...
+
* ''GHNtype''
+
 
+
Scopes:
+
* ''defaultVO''...
+
* ''rootVO''...
+
* ''infrastructure''...
+
 
+
Geographical identity:
+
* ''coordinates''...
+
* ''country''...
+
* ''location''...
+
 
+
Freshness:
+
* ''updateInterval''...
+
 
+
Miscellanea:
+
* ''labels''...
+
 
+
[[User:Manuele.simi|Manuele.simi]] 16:01, 24 March 2008 (EET)
+

Revision as of 16:18, 24 March 2008

  1. Tutorial overview
    1. Ground rules: preparing the environment
    2. Obtaining and running gCore
  2. From configuration to testing with a single Port-Type
    1. Structuring the service code
    2. Delving into the implementation
    3. Building & Deploying
    4. gCore Logging & Restart
    5. A Test Client
    6. Refining the implementation
  3. Adding State
    1. Multi Port-Type service
    2. Basic steps
    3. Implementation
    4. Configuring JNDIs & Descriptors
    5. Building & Deploying
    6. A Test Client
  4. Learning more

Manuele.simi 17:18, 24 March 2008 (EET)