Presentation is loading. Please wait.

Presentation is loading. Please wait.

TELECOM ITALIA GROUP AMUSE Agent-based Multi User Social Environment.

Similar presentations


Presentation on theme: "TELECOM ITALIA GROUP AMUSE Agent-based Multi User Social Environment."— Presentation transcript:

1 TELECOM ITALIA GROUP AMUSE Agent-based Multi User Social Environment

2 Agenda ► Overview ► Main features ► Developing amuse-based applications API Overview Quick startup guide ► Current limitations and future works

3 3 TELECOM ITALIA AMUSE  A software platform that facilitates the development of distributed multi- user applications where users compete/cooperate to achieve private or common goals.  The primary focus is on multi-player on-line games  Based on JADE and on its extension WADE  Communication and discovery  Administration mechanisms of the server-side components  Open source since the 5 th of December 2013  0.9-alpha version  Experimental version  http://jade.tilab.com/amuse http://jade.tilab.com/amuse  In this first version supports Android clients only  There is a lot to do  Whoever is interested in contributing to the Community is very welcome

4 4 TELECOM ITALIA Architecture... Wade Distributed Runtime Amuse server components Application developer Development environment host-D host-1host-N DB Application1 server components ApplicationM server components User-1 Application1 client Amuse client lib JadeAndroid Application1 client Amuse client lib JadeAndroid User-2 PaaS approach Android Play Store - Register - Install - Configure - Start Appl Admin Interface Application types  Server-based  Client-only Application types  Server-based  Client-only

5 5 TELECOM ITALIA Core Features  User Management  Registration/authentication of application users  Basic user profile management  Text Message exchange  With automatic store-and-forward support  Peer-to-peer Pipe Management  Establishment of a direct connection between two clients  Transfer of application specific information over that connection  Raw clock synchronization  Support for performing actions at the same time

6 6 TELECOM ITALIA Gaming Features  Peer-to-Peer Match Coordination  1-to-1 matches  Match organization based on the Invitation metaphor  Match info are kept locally and asynchronously persisted on server  Supports Client-only applications  Centralized Match Coordination  N-players matches  Support for players joining and leaving an ongoing match  Match organization based on the Table metaphor  Require Server-based applicatins INFORM (B, C) PROPOSE REFUSE PROPOSE ACCEPT AMUSE Server A B C REQUEST (GetRandomUsers) UpdateMatch

7 7 TELECOM ITALIA Gaming Features  Peer-to-Peer Match Coordination  1-to-1 matches  Match organization based on the Invitation metaphor  Match info are kept locally and asynchronously persisted on server  Supports Client-only applications  Centralized Match Coordination  N-players matches  Support for players joining and leaving an ongoing match  Match organization based on the Table metaphor  Require Server-based applicatins AMUSE Server A B C REQUEST (CreateTable) REQUEST (JoinTable) INFORM (MatchStarting)

8 8 TELECOM ITALIA Gaming Features  Peer-to-Peer Match Coordination  1-to-1 matches  Match organization based on the Invitation metaphor  Match info are kept locally and asynchronously persisted on server  Supports Client-only applications  Centralized Match Coordination  N-players matches  Support for players joining and leaving an ongoing match  Match organization based on the Table metaphor  Require Server-based applicatins AMUSE Server A B C REQUEST (Move) INFORM (Result) INFORM (PlayerMoved)

9 9 TELECOM ITALIA AMUSE Client API  com.amuse.client package  Entry point: com.amuse.client.android.AmuseClient  Connection with the AMUSE server platform (method connect() )  User authentication (method setLoginManager() )  Server clock synchronization (method serverCurrentTimeMillis() )  Access to features (method getFeature() )  Features  Core ( com.amuse.client.features.core )  UserManagementFeature  TextMessageFeature  PipeManagementFeature  Gaming ( com.amuse.client.features.gaming )  MatchCoordinationFeature (peer-to-peer match coordination)  GamesRoomFeature (centralized match coordination)

10 10 TELECOM ITALIA AMUSE Server API  Only needed for server-based applications  Required to implement the server-side logics of a game managed by means of the centralized coordination approach ( GamesRoomFeature )  Entry point: com.amuse.agents.gra.GamesRoomAgent  A JADE Agent that must be extended to redefine a set of callback methods that are invoked  When clients create tables ( handleTableCreated() )  When a sufficient number of player joined a table and the match can start ( handleMatchStartup() )  When players Join/Leave a table with an ongoing match ( handlePlayerJoined(), handlePlayerLeft() )  When a player moves ( handleMove() )  When activating the server side logics several GRA agents can be started each one implementing a Games Room that contains many Tables.

11 11 TELECOM ITALIA Startup guide: Amuse server platform - Installation  Download required packages  Amuse platform  WADE 3.3 + PersistenceAdd-on  Install (unzip) WADE and Amuse... |--wadeSuite/ |--wade/ |--add-ons/ |--... |--amuse/ |--platform/ |--cfg/ (all amuse configurations) |--lib/ (amuse libraries) |--log/ (amuse logs will be produced here) |--src/ (amuse sources) |--tools/ (amuse administration tools) |--...

12 12 TELECOM ITALIA Startup guide: Amuse server platform – DB Configuration  Configure and start the Amuse DB  H2 (full Java Open Source DB), but other DBs should work as well  Start the H2 DB server  wadeSuite/wade/add-ons/persistence/lib  java -jar h2-1.2.123.jar  Configure Amuse to use H2  Create a suitable directory to hold DB files (e.g. amuse/H2)  amuse/platform/cfg/hibernate.cfg.xml  Create the Amuse schema  amuse/platform/tools  ant create-db  Require ANT 1.7.0

13 13 TELECOM ITALIA Startup guide: Amuse server platform - Activation  Configure the single-application-mode  amuse/platform/cfg/types.xml...  Tell WADE where to find amuse wadeSuite/wade/projects/ |--default.properties |--amuse.properties amuse/platform  Activate the WADE Bootdaemon and the Amuse Main Container  wadeSuite/wade/bin/  startBootdaemon  startMain amuse project-home=

14 14 TELECOM ITALIA Startup guide: Client part  The client part of an amuse-based application is an Android App  Create an Android project in Eclipse  Download the Amuse Android Client and unzip it locally  Create a lib/ directory in your Android project, copy the libraries  JadeAndroid.jar  amuseCommons.jar  amuseAndroidClient.jar from amuse/android-client/lib/ directory to the lib/ directory in your project  Add the above libraries to your project build path

15 15 TELECOM ITALIA Startup guide: Android manifest hints  Amuse based clients interact with the Amuse platform and with other clients  Give the Android App the INTERNET permission......  All communications are carried out by JADE  Declare the Jade MicroRuntime service...

16 16 TELECOM ITALIA Startup guide: Platform connection code snippet (1/2) Properties pp = new Properties(); String ip = getResources().getString(R.string.amuse_host); pp.setProperty(MicroRuntime.HOST_KEY, ip); String port = getResources().getString(R.string.amuse_port); pp.setProperty(MicroRuntime.PORT_KEY, port); amuseClient = new AmuseClient(getResources().getString(R.string.app_name), getApplicationContext()); amuseClient.setConnectionProperties(pp); amuseClient.setLoginManager(new LoginManager() { @Override public void askLoginInformation(Callback callback) { // This is the first time the user logs in with this terminal --> Show // a form to let him type in his username and password. // When done, invoke the callback onSuccess() method passing login // information in the LoginInfo object... } }); By default 2099

17 17 TELECOM ITALIA Startup guide: Platform connection code snippet (2/2) amuseClient.connect(new Callback () { @Override public void onSuccess(Void arg0) { // Connection to the Amuse platform OK // From now on it is possible to access and use features... } @Override public void onFailure(Throwable thr) { if (thr instanceof LoginError) { // Wrong username/password or, for new accounts, username already // in use or not valid. Show a suitable message to the user... } else { // Connection error. Show a suitable message to the user... } });

18 18 TELECOM ITALIA Startup guide: Server part (1/2)  The server part of an amuse-based application is a WADE application  Create an Eclipse Project for a WADE application following the instruction in the WADE Development Tutorial  Copy the amuse.jar e amuseCommons.jar libraries to the lib/ directory of the created project and add them to the project build path  Develop a class that extends GameRoomAgent  Create the applications.xml file in the cfg/ directory of the created project

19 19 TELECOM ITALIA Startup guide: Server part (2/2)  Create a Run Configuration with  Main class: com.amuse.StartApp  Program arguments:  Use that Run Configuration to run and debug the server-side logics of your application

20 20 TELECOM ITALIA Current limitations and future works  Amuse Platform  Uncompleted Application sand-box  Missing Graphical Application Management interface  Amuse client  Ready-made activities to manage common views (login, list of friends...)  Services to manage asynchronous events when the application is not in foreground  Support for other technologies  Additional functionality  Achievements support  Integration with main Social Networks  Support to define virtual players  Development support  Examples  Eclipse Plug-in to facilitate the development of server-side logics

21 21 TELECOM ITALIA Thanks for the attention  Amuse web site – http://jade.tilab.com/amusehttp://jade.tilab.com/amuse  Distribution package download  SVN access  Amuse Startup Guide  Support – jade-develop@avalon.tilab.comjade-develop@avalon.tilab.com  You must subscribe to the mailing list


Download ppt "TELECOM ITALIA GROUP AMUSE Agent-based Multi User Social Environment."

Similar presentations


Ads by Google