Download presentation
Presentation is loading. Please wait.
Published byHilda McDowell Modified over 6 years ago
1
INVESTIGATING A SCIENCE GATEWAY FOR AN AGENT-BASED
INVESTIGATING A SCIENCE GATEWAY FOR AN AGENT-BASED SIMULATION APPLICATION USING REPAST Adedeji Fabiyi, Simon J.E. Taylor, Anastasia Anagnostou (Brunel University London) WACREN e-Research Hackfest – Lagos (Nigeria)
2
Outline Motivation Objectives Background
Science Gateways and Science Gateway Frameworks The Catania Science Gateway Framework Simulation infection model Results Conclusions and Future Work
3
Motivation e-Infrastructures can support scientists with complex distributed computing but they could be hard to use. Therefore there are two important issues to consider when making use of e-Infrastructures namely: (1) Interoperability across different e-Infrastructures and middleware and (2) Easiness of use.
4
Objectives To show how an Agent Based Infection Simulation (implemented using REPAST Simphony) can be ported to a Science Gateway and deployed on an e-Infrastructure To ultimately illustrate how a Science Gateway can be used to allow multiple users across the world to access a simulation and execute their applications in an e-Infrastructures environment
5
What are e-Infrastructures?
Powerful integrated Information and Communication Technologies High speed research communication networks Computational resources (grids, clouds, etc.) Software services Data services (data sources, scientific literature) Sensors Securely accessed via web-based portals or science gateways
6
But Can be Delivered Simply!
Science Gateways can facilitate simple secure access to e-Infrastructures Science Gateways can be focal points for scientific collaborations Science Gateways can support communities of practice
7
Science Gateways can enable CoPs
e-Infrastructures accessed through Science Gateways can help Communities of Practice to Work intensively and collaboratively to boost research potential and impact Share and disseminate knowledge, experience and state-of-the-art research to speed up scientific progress Expand its scope across the world Promote easily access to software, computing, data and sensor services used by participants
8
For science and engineering research and education.
Science Gateways? What is it… A digital interface. For science and engineering research and education. Implemented in web and/or mobile applications. Provide access to community resources such as software, data, and high HPC facilities
9
Science Gateway Framework
There are different Science Gateway frameworks used for building/customizing instances of science gateways. The Catania Science Gateway Framework (CSGF) approach, which has been adopted in this work, is one of such frameworks. CSGF consists of two major components (Liferay portal framework for the design of the user interface, and the Catania Grid and Cloud engine for the execution of jobs on different DCIs).
10
Science Gateway Framework
There are different Science Gateway frameworks used for building/customizing instances of science gateways. The Catania Science Gateway Framework (CSGF) approach, which has been adopted in this work, is one of such frameworks. CSGF consists of two major components (Liferay portal framework for the design of the user interface, and the Catania Grid and Cloud engine for the execution of jobs on different DCIs).
11
Science Gateway Requirements
Authentication and Authorisation . SAML, LDAP Application e-Infrastructure independent . jSAGA, SAGA, OCCI Standard Java Technology . JSR 168/286 Web Technology . Web CMS . Wiki, Blog, Messages Board, Vconf, Adobe Connect Portal Frameworks . Liferay portlet container . Liferay Service Builder
12
The Catania Science Gateway Framework
CSGF showing the different applications implemented as portlet, and the Grid and Cloud engine that is responsible for submitting jobs on different e-infrastructures. CSGF hides all details of the complexity of the underlying infrastructures from the final user.
13
Agent-Based Modelling and Simulation
Originated from Cellular Automata (CA) and Complex Adaptive Systems (CAS) -Network of autonomous agents that interact, adapt and learn ABMS studies the behaviour of individual and autonomous agents and their interactions Characteristics -Autonomy, locality, decentralisation State -Each agent has its own state with clearly defined boundaries -Model state is the collection of agents’ states and environment state Many application areas Many open source tools (REPAST SIMPHONY)
14
Agent-Based Modelling and Simulation
ABMS components Agents Active Passive Environment Agents characteristics Attributes Behaviours Rules Active Agent Attributes Static: name … Dynamic: state, memory, resources, neighbours … Methods Behaviours (goal driven, e.g., find target and kill) Ability to modify behaviours Update rules / dynamic attributes … Passive Agent Attributes Static: name … Dynamic: state, resources … Methods Behaviours (passive, e.g., ageing) … Macal, C. and North, M. Introductory Tutorial. Simon JE Taylor (2014) “OR Essentials: Agent-Based Modelling and Simulation.” Palgrave Macmilan, ISBN-10:
15
Agent-Based Modelling and Simulation
16
Simulation Infection Model Application
As a simple demonstration, we ported: A simulation infection model on the SG. This was Implemented in Repast Simphony. For life sciences and healthcare sector. How can a SG be used to support our Agent-based simulation application? We start by Identifying Simulation needs, such as: input data, upload data/model Execution, and Visualization.
17
Simulation Infection Model Application
Infection model together with its dependencies are deployed in a pre-configured virtual machine image. A pilot_script.sh (consisting of instructions to start a simulation) is also uploaded on the remote virtual machine (VM). Whenever a simulation job is submitted, the VM image is started according to the passed parameters, and the executable will be performed.
18
Portlet code snippets(1) Methods of the Generic Portlet Class
Class myRepast-infection-portlet extends GenericPortlets { Init (PortletConfig); processAction (ActionRequest, ActionResponse); Render (RenderRequest, RenderResponse); Destroy (); Do View (Request, Response); Do Edit (Request, Response); Do Help (Request, Response); }
19
Portlet Action Status ACTION_ACTIVATE ACTION_INPUT ACTION_SUBMIT
ACTION_PILOT and their corresponding VIEW_ACTIVATE VIEW_INPUT VIEW_SUBMIT VIEW_PILOT
20
getInputForm method void getInputForm(ActionRequest request AppInput appinput) { appInput.inputValue = (String) request.getParameter("inputValue"); appInput.inputValue2 = (String) request.getParameter("inputValue2"); appInput.inputValue3 = (String) request.getParameter("inputValue3"); appInput.inputValue4 = (String) request.getParameter("inputValue4"); appInput.jobIdentifier = (String) request.getParameter("JobIdentifier"); }
21
void __submitJob(AppInput appInput) {
Method that sends the infection model jobs into a distributed infrastructure (1) void __submitJob(AppInput appInput) { MultiInfrastructureJobSubmission miJobSubmission=null; if(null != appPreferences.getSciGwyUserTrackingDB_Hostname() && !appPreferences.getSciGwyUserTrackingDB_Hostname().equals("") && null != appPreferences.getSciGwyUserTrackingDB_Username() && !appPreferences.getSciGwyUserTrackingDB_Username().equals("") && null != appPreferences.getSciGwyUserTrackingDB_Password() && !appPreferences.getSciGwyUserTrackingDB_Password().equals("") && null != appPreferences.getSciGwyUserTrackingDB_Database() && !appPreferences.getSciGwyUserTrackingDB_Database().equals("") ) { String arg1="jdbc:mysql://" + appPreferences.getSciGwyUserTrackingDB_Hostname() + "/" + appPreferences.getSciGwyUserTrackingDB_Database(); String arg2=appPreferences.getSciGwyUserTrackingDB_Username(); String arg3=appPreferences.getSciGwyUserTrackingDB_Password(); miJobSubmission = new MultiInfrastructureJobSubmission(arg1,arg2,arg3); } Else{ miJobSubmission = new MultiInfrastructureJobSubmission(); _log.info("MultiInfrastructureJobSubmission [PROD]");
22
Method that sends the infection
Method that sends the infection model jobs into a distributed infrastructure (2) Assign all enabled infrastructures and set portal IP address InfrastructureInfo[] infrastructuresInfo=appPreferences.getEnabledInfrastructures(); for(int i=0; i<infrastructuresInfo.length; i++) { _log.info("Adding infrastructure #"+(i+1) +" - Name: '"+infrastructuresInfo[i].getName()+"'"+LS); miJobSubmission.addInfrastructure(infrastructuresInfo[i]); } String portalIPAddress=""; try { InetAddress addr = InetAddress.getLocalHost(); byte[] ipAddr=addr.getAddress(); portalIPAddress= ""+(short)(ipAddr[0]&0xff) +":"+(short)(ipAddr[1]&0xff) +":"+(short)(ipAddr[2]&0xff) +":"+(short)(ipAddr[3]&0xff);
23
Method that sends the infection
Method that sends the infection model jobs into a distributed infrastructure (3) Define job requirements, initialize their settings and submit job String executable="/bin/sh"; String arguments =appPreferences.getPilotScript(); String outputPath="/tmp/"; String outputFile="myRepast-infection-Output.txt"; String errorFile ="myRepast-infection-Error.txt"; String appFile ="myRepast-infection-Files.tar.gz"; miJobSubmission.setExecutable ( executable); miJobSubmission.setArguments ( arguments); miJobSubmission.setOutputPath ( outputPath); miJobSubmission.setOutputFiles(outputSandbox); miJobSubmission.setJobOutput ( outputFile); miJobSubmission.setJobError ( errorFile); Also prepare the GridEngine job description (GEJobDescription jobDesc = new GEJobDescription();) and set it for each of the above. miJobSubmission.submitJobAsync(appInput.username, portalIPAddress, applicationId, appInput.jobIdentifier);
24
Result (1) The figure showing the landing page of the portlet and a description of the application. Once a user has successfully sign on, they can click the run button to access the portlet main page.
25
Result (2) The main page of the infection simulation application. Users can specify their parameters, using this page, and then click on the submit button.
26
Result (3) The page that shows the MyJobs portlet, which is another dedicated portlets that displays the status of all jobs. As shown, this page displays a job in running mode as well as all jobs that’s finished running. Users can download results once a job is ready (as indicated by the two folder icon).
27
Result (4) The portlet also includes a visualizer page for graphically displaying results. Once a job is ready, users can upload their results by simply uploading their data.
28
Conclusion and Future work
Presented an approach, a Science Gateway approach, for executing jobs on E-infrastructures. Adopted framework comprises of Liferay portal and the Catania Grid and Cloud engine. Used an Agent-based simulation application as a case study. Future work includes the implementation of WEKA (J48) on the SG – its analysis and use on the output of simulation results.
29
Thank you! sci-gaia.eu
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.