Market-like Community

Introduction

To clarify the use of Janus and the implementation of roles as first-class entity, role dynamics and role communication, a short example of a market-like community designed using the CRIO metamodel and implemented with the Janus platform is presented.


The Selective Market demo provides a possible implementation of a Market-like community

The source code of this demo is embedded into a runnable jar that may downloaded at: Selective Market. Just use

java -jar <jarname>
in your beloved console to run this demo. Extract this jar to see the associated java source code and use
mvn clean install
to compile it (assuming the use of Maven).

Description

This example is applied to the domestic travel market, we have three simple agents: a client, a broker and 4 providers communicating using roles in various organizational contexts.

A customer, modelled by the Client role, who wishes to obtain the best available travel offer, either in terms of price or in terms of travel time, makes its proposal and sends it to the CBroker. This latter will forward the information to the PBroker role, who broadcasts it to the various available Providers.

Depending on the criterion chosen by the customer (time or price), the PBroker determines the best proposal and inform the Client. Client and the best Provider then create an instance of the contracting organization to finalize the order and make the payment. Specifically, the proposed example may implemented using three kinds of agents : Client (Agent 1), Provider (Agent 3, 4 and 5), Broker (Agent 2), three organizations : Purchase, Providing, Contracting, and six roles.

All organizations, groups, roles and agents required to implement this example are shown in Figure 1. Each organization is stored in its own java package containing its java class and those of its roles.


This basis of this example consist in three basic organizations, each one composed of two roles:

  • Purchase manages interactions between the client and the broker. Its main goal consist in formartting and forwarding the client request.
  • Providing manages interactions between the broker and the provider. This organizaiton aims at broadcasting the proposal comming rom the client to all providers. In this example, only provider is considered.
  • Contracting manages interactions between the client and the provider.

An organization may be dynamically instanciated in group, then an agent may request a role within this group. As presented in Figure 1, in this example, we use three groups: g0 g1 and g3, one for each organization. These groups are dynamically created by the agents when it is required.


Three kinds of agents: Client (Agent 1), Provider (Agents 3, 4 and 5), Broker (Agent 2), three organizations: Purchase, Providing, Contracting, and six roles


Figure 1: The organizations and groups of a market-like community in Janus


Each organization is stored in its own java package containing its java class and those of its roles.

2010-08-06Release of Janus 0.3: download, changes.
This page was last modified on 3 August 2010, at 20:19. This page has been accessed 242 times.
Copyright 2010 © Janus Core Developers - Privacy policy