Package com.gigaspaces.grid.worker
Provides ready-made GigaSpace Workers.
See:
Description
Interface Summary |
GigaSpaceWorker |
The GigaSpaceWorker interface defines the semantics of a worker entity that
will process Entry objects from a GigaSpace. |
Class Summary |
AbstractSpaceWorker |
The AsbtractSpaceWorker provides a framework upon which to build support for
a GigaSpaceWorker. |
TaskWorker |
The TaskWorker provides an implementation of a GigaSpaceWorker that
repeatedly takes Task objects from a JavaSpace and invokes the
Task.execute() method. |
Package com.gigaspaces.grid.worker Description
Provides ready-made GigaSpace Workers. Workers in the architecture
implement a Command pattern, allowing the polymorphic processing of
Task
objects. Task Submission
Management services create Entry objects, write the Entry objects to
the GigaSpace and correlate results. Worker services are dynamically
provisioned through the network to compute resources which meet
operational requirements of the service.
Using the policy mechanisms available in the Service Grid, Worker
services can have Service Level Agreements attached to them, ensuring operational criteria is met. By associating SLA Handlers with
operational criterion is met. The dynamic grid worker's
operational behavior can be monitored and dynamically scale its
environment up and down, based on declarative attributes. In this way,
the grid works with the Grid Service Management agents to dynamically
size and provision the required services, based on realtime operational
demands. An example of the SLA declaration in the deployment
descriptor is shown here:
<SLA ID="backlog" Low="100"
High="500" >
<Configuration>
<Component Name="org.jini.rio.qos.SLAPolicyHandler">
<Parameter Name="slaPolicyHandler"
Value="new org.jini.rio.qos.ScalingPolicyHandler(
(org.jini.rio.core.SLA)$data)" />
</Component>
<Component Name="org.jini.rio.qos.ScalingPolicyHandler">
<Parameter Name="MaxServices" Value="10" />
<Parameter Name="LowerThresholdDampeningFactor" Value="1000" />
</Component>
</Configuration>
</SLA>
This declaration provides the definition of a SLA policy handler
providing scalability, tracking GigaSpace backlog. If the backlog in
the GigaSpace exceeds 500 entries, the scalable policy handler will
trigger the creation of additional GigaSpace Worker instances to
process the increasing amount of tasks, up to the limit of 10 (as
specified by the MaxServices attribute). Conversely, if the backlog
falls below 100, unneeded services will be scaled down.
The key to keeping the grid operating is to ensure grid services (and the
tasks they are processing) are still running. Utilizing Fault Detection
Policies, the Service Grid provides the essential capability to detect
existence of running and available services. If services become
unavailable, or fail to meet processing requirements, the recovery of
those services to available compute resources is enabled by dynamic
provisioning mechanisms. In an operational context these essential
capabilities provide enhanced survivability and reconfigurability in
such a way as to recover from damaged or failed resources and adapt to
operational needs without a prior configuration. This
fundamental capability provides support for the following:
- Dynamic and adaptive (re) allocation of resources/services
ensuring adequate load distribution of processing to the most
appropriate resource based on declarative QoS requirements.
- As demands to the system increase, processing will be distributed
to available resources based on the ability for the resources to meet
specified QoS requirements. As resources reach limits, new
resources are added into the environment.
- Distribution of processing across available hardware in a
network-centric environment will be a key towards ensuring software
performance. The effective distribution of processing based on
increased demand will maximize the use of all hardware resources in the
environment.
Configuration
The GigaSpace Worker supports the following configuration
entry;
where the configuration entry name is associated with the component
name com.gigaspaces.grid.worker.
- spaceWorker
Type:
|
GigaSpaceWorker
|
Default:
|
TaskWorker
|
Description:
|
This
entry will be read at initialization by a GigaSpace Worker to
determine
the type of worker to instantiate.
|
- templateClass
Type:
|
Entry
|
Default:
|
Task
|
Description:
|
This
entry will be read at initialization by a GigaSpace Worker to
determine
the type of template to match when consuming work from the GigaSpaces.
|
Parameters
The GigaSpace Worker allows the declaration of parameters
(name/value pairs), that control the behavior of the worker. The
following parameters are provided:
Name
|
Default Value
|
Description
|
useTransactions
|
"no" |
Whether transactions should be
used when consuming work from the GigaSpaces.
|
useWeakHashMap
|
"yes"
|
Use of a WeakHashMap
or a HashMap to store information processed by a
Task Entry. |
timeout |
Long.MAX_VALUE |
Timeout for the worker blocking
take, if not defined the default is set to Long.MAX_VALUE . |
Copyright (c) 2007 GigaSpaces Technologies, Inc.
All Rights Reserved.