Software
Source Code
Grid Market Middtleware will be soon released under the GLPL
open source licence.
Binaries
The file gmm.tar.gz contains the binaries required to execute
the middleware.
Documentation
Samples
Echoes
This sample application presents a simple, yet very complete example of
the main functionalities provided by the P2pAgent
API, a fundamental part of the Grid Market Middleware.
The application shows two agents, EchoesServer and EchoesClient, which
engage in a multiple communications of the type send/reply to implement
a sort of "ping" command, as provided for TCPIP in most platforms.
Along this process, the EchoesClient determines the average response
time of the sever.
Throught this example we can show how the following functionalities are
implemented:
- Crete an agent and pass initialization parameters
- Wait for an agent to complete and get results from it
- Retrieve parameters passed to an agent and pass back
results
- Send and receive messages
- Reply to an message received from other agent
- Schedulle events to be executed in the future and
handle them when the time expires
- Report execution metrics that can be externaly
analyzed
- Keep a record of agent's the execution by means of
log entries
Components
- EchoesMainApp: is the main application that starts
the client and server agents and pass to them the required parameters,
as specified below.
- EchoServer respond to requests received from cliets
after waiting for a random delay that simulates the response time of
the server. The delay is implemented by a schedulled event with a
random delay time. When the event expires, the server replies to the
client with the same message it received.
- EchoClient send a series of requests to the
EchoServer and records the
response time of each request. The client for responses until either a
minimun number of responses have been received or a timeout expiries.
Upon finalization, calculates the average response time, reports it as
a "ResponseTime" metrics and returns as a result argument to the caller
application.
The EchoesSample.tar.gz
file contains all the artifacts needed to setup an eclipse project to
execute the Echoes sample application or develop other applications. In
particular, it contains
- src/ source files for
the sample application
- lib/ middleware's jar
(p2pagent.jar) and required libraries
- bin/ compiled classes
- doc/ javadoc
documentation for the sample application and the middleware's API
- .project Eclipse project
configuration
- .classpath
Eclipse project's classpath
- profile.xml
configuration for Jxta
- HostingConfig.properties
configuration for the GMM
- EchoClient
working directory for sample client application
- EchoServer
working directory for sample server application
|
|