Code Monkey home page Code Monkey logo

scheduling-portal's Introduction

ProActive Workflows & Scheduling

Build Status

Description

This project is a Web front-end for the ProActive Scheduler and Resource Manager REST API. It does not require the REST API to be built, but will not be able to properly run without it.

Information about the REST API, the Scheduler and Resource Manager software can be found at the following locations:

This project is Open Source and distributed under the terms of the GNU AGPLv3, a copy of which was included along with this file.

Building

Building binaries requires to follow what is explained in the README (https://github.com/ow2-proactive/scheduling#building-from-sources). It will generate an archive containing binaries (JAR files). However it will not embed Web portails. The procedure to also embed Web portals is a bit complex. That's why you can download releases directly from activeeon.com.

Below are explanations to build and include Web portals with a customized version of Scheduling assuming that the absolute path to the folder where scheduling is installed is SCHEDULING_HOME:

  • Studio Web Portal: it is pretty easy to embed. You just need to checkout the project (https://github.com/ow2-proactive/studio). Supposing the absolute path to this folder is STUDIO_HOME, you need to create a symbolic link in SCHEDULING_HOME/dist/war/studio that points to STUDIO_HOME/app:

    $> ln -s STUDIO_HOME/app SCHEDULING_HOME/dist/war/studio

  • Scheduler and RM portals: Checkout the project scheduling-portal (https://github.com/ow2-proactive/scheduling-portal). Execute ./gradlew build (linux/mac) or gradlew build (windows). The command will produce two wars that you need to symlink to SCHEDULING_HOME/dist/war:

    $> ln -s SCHEDULING_PORTAL_HOME/rm-portal/build/libs/rm-portal-6.3.0.war SCHEDULING_HOME/dist/war/rm.war

    $> ln -s SCHEDULING_PORTAL_HOME/scheduler-portal/build/libs/scheduler-portal-6.3.0.war SCHEDULING_HOME/dist/war/scheduler.war

Once you restart the scheduler, you should have the Web interfaces deployed.

Deploying

Deploying either the Scheduler or Resource Manager web portal requires an Application Server. For instance, this document will describe the procedure for Apache Tomcat 6 which can be downloaded here: http://tomcat.apache.org/ . Other versions of Apache Tomcat, and other Application Servers such as Jetty (http://jetty.codehaus.org/jetty/) should work similarly.

Follow these steps:

  1. Stop Tomcat if it was running using /bin/shutdown.[sh|bat]
  2. Copy both .war files from dist/ to the webapps/ directory in the Tomcat installation directory 3. Unpack both .war files, ie for the rm.war file:
Unix:

`$> cd webapps`

`$> unzip rm.war -d rm`

Windows:

`$> cd webapps`

`$> mkdir rm`

`$> cd rm`

`$> "%JAVA_HOME%"\bin\jar -xf ..\rm.war`
  1. Edit the configuration file of each application to specify the URL of the REST server that the application will connect to.
    • For the Scheduler, the file is /webapps/scheduler/scheduler.conf, and the configuration key "sched.rest.url".
    • For the RM, the file is /webapps/rm/rm.conf, and the configuration key "rm.rest.url".
ie. for the rm: "rm.rest.url = http://my.example.com:8080/rm_rest/"
This step requires that you run the REST API server somewhere. This
can be a remote server, but the REST API server may as well run in the
same application server as the Web Portal.
  1. Start the Tomcat server using /bin/startup.[sh|bat]
  2. Check the logs in /logs/catalina.out. If the logs show a security exception, ie.:
`java.security.AccessControlException: access denied`

Kill tomcat, and restart it using

$> /bin/startup.[sh|bat] -security

to use a security manager.

Architecture

This section describes briefly the project's architecture. If you do not wish to understand the internals of the project, read or edit its sourcecode, then this section is of no use to you.

Here is how the applications tiers interact with each others:

  .------.      .-----------.      |Comm layer + Platform |
  |  RM  +------. Scheduler |      +-----------+----------+
  `--+---'      `-----+-----'      |           | Java     |
     |                |            |           |          |
     |                |            |Java RPC   |          |
.----+----.     .-----+------.     |           |          |
| RM REST |     | Sched REST |     |           |          |
`----+----'     `-----+------'     |           | Tomcat   |
     |                |            |           |          |
     |                |            |Java RPC   |          |
.----+-----.   .------+-------.    |           |          |
| RM Portal|   | Sched Portal |    |           |          |
`----+-----'   `------+-------'    |           | Tomcat   |
     |................|            |           |          |
             |                     |           |          |
       .-----+-------.             |HTTP(S)    |          |
       | Web Browser |             |           |          |
       `-------------'             |           | Any web  |
                                   |           | browser  |

In the above diagram:

  • The end user uses a Web Browser to connect to the Portal. The Portal displays information retrieved from the REST API through an HTTP connection.

  • The REST API retrieves information from the Scheduler or RM server using native ProActive Java RPC communications, and stores it locally. This has two effects:

    • the REST server acts as a caching layer, preventing the scheduler from suffering from the load of too many connected clients.
    • clients can connect through the REST API without using Java or ProActive and only through a simple HTTP client.
  • The Scheduler handles the job execution workflow. It is the central piece of the application.

  • The Resource Manager aggregates physical resources and provides them to the Scheduler so that it may execute tasks.

The RM and Scheduler applications are very close. They are built upon the same architecture, use the same technologies, and even share some of the same code.

This simplified architecture diagram applies to both client-side applications:

            .------------.
            |AsyncService|
            `-----^------'
                  |network comm
                  |
            .-----v----.                .---------.
            |Controller+---------------->ModelImpl|
            `-----+----'       writes   `--+------'
     +------------+-------+                |Implements
     |!logged    XOR      |logged          |
.----v----.            .--v-.              |  .-----.
|LoginPage|            |Page|              +-->Model|
`---------'            `--+-'              |  `-----'
                 +--------+-----+          |
                 |  includes    |          |  .---------------.
              .--v--.        .--v--.       +-->EventDispatcher|
              |View1|        |View2|          `---+-----------'
              `--+--'        `--+--'              |
                 |              |                 |
                 |implements    |                 |
            .----v----.     .---v-----.           |
            |Listener1|     |Listener2|           |
            `----^----'     `---^-----'           |
                 +--------------+-----------------+
                                        onEvent

This client side application is written in Java and compiled to Javascript using GWT which will allow execution in a web browser environment. The server side application (AsyncService on the diagram) runs in native Java in an application server, and communicates with client-initiated Ajax calls. The server consists in a collection of servlets that communicate with the REST API using an HTTP client.

Troubleshooting

If you have questions regarding this document or the project, you can use the ProActive mailing list.

If you have found a bug, you can check the project's bug tracker to either search for open entries, or submit a new reproducible issue.

scheduling-portal's People

Contributors

alexfalessi avatar aminelouati avatar amouhoub avatar cdiop avatar chloegugli avatar fviale avatar gheon avatar jrochas avatar laurianed avatar lpellegr avatar luispinedamx avatar maelaudren avatar marcocast avatar mauriciojost avatar mbenguig avatar mboussaa avatar mebubo avatar medou-boushab avatar mykhailenko avatar nebilbenmabrouk avatar oanabiancaschiopu avatar paraita avatar pedrovelho avatar sandrinebeauche avatar shatalovyaroslav avatar smirnoveeon avatar sophiesongge avatar tobwiens avatar yinan-liu avatar zeineb avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scheduling-portal's Issues

documentation target doc-jaxrs does not work

Original issue created by Arnaud Contes on 02, Nov 2010 at 10:04 AM - PORTAL-48


10:02:08{master proactive_grid_cloud_portal.git} % ant doc-jaxrs
Buildfile: build.xml

doc-jaxb:

BUILD FAILED
/home/acontes/ws_git/proactive_grid_cloud_portal.git/build.xml:75: No source files and no packages have been specified.

Total time: 1 second
(link: 1) 2168 exit 1 ant doc-jaxrs

After a disconnection, presenters of the previous sessions are still alive and they are still handling events.

Original issue created by Fabrice Fontenoy on 27, Oct 2010 at 14:41 PM - PORTAL-46


This implies that every event are handled as many time as we have been connected.
This implies also that they are many failed request since they are using previous session id no longer valid.

We can consider 2 solutions for this issues:

  • Use a singleton pattern for presenters. Presenters are translated into Javascript so the behaviour of this pattern should be tested first but it seams that the singleton pattern is only valid for one tab. That implies that we will have 2 instances on 2 tabs but only one instance on one tab. This is the behaviour that we aim at providing (at most one session per tab but we can have several sessions using several tabs).
    When a reconnection is performed, we can just change the sessionId of the main presenter (SchedulerPresenter) and this presenter will propagate this modification to its sub-presenter and so on and so forth. One thing we have to take care of, is the initialisation of displays (should be called by its presenter). Otherwise, next user we be able to the last screen of the previous user.
  • Make every presenter handle the LogoutEvent in which we can call a doLogout() method for example that will perform operations necessary to remove all references and thus will make the GC possible. Remember that a presenter has a reference towards its view (Display) which itself has a reference towards its presenter. So the presenter has to call a method on its display to remove the reference towards itself and then it has to remove reference towards its display.

There is maybe a better and/or shorter solution but using one of these two solutions should fix this issue.

SynchronizationTimerTask remains active even when all clients are deconnected

Original issue created by Arnaud Contes on 30, Dec 2010 at 17:41 PM - PORTAL-58


not found a scheduler frontend for sessionId 4
status: Unauthorized
org.ow2.proactive_grid_cloud_portal.shared.exception.JobSynchronizationException: Exception occured while trying to synchronize the job list with the scheduler throught the REST service located at http://localhost:8080/proactive_grid_cloud_portal
at org.ow2.proactive_grid_cloud_portal.server.SchedulerServiceImpl$SynchronizationTimerTask.run(SchedulerServiceImpl.java:1168)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)

Disconnection does not work properly

Original issue created by Fabrice Fontenoy on 26, Oct 2010 at 18:00 PM - PORTAL-44


When you disconnect and reconnect right atfer, it is not possible to get some details (tasks, job info and logs) on a job anymore.
The application says that you are not connected and ask you to get connected first

From time to time, JobDetailsPresenterImpl.onFailure raised a ClassCastException

Original issue created by Fabrice Fontenoy on 20, Oct 2010 at 17:21 PM - PORTAL-34


java.lang.ClassCastException: com.google.gwt.user.client.rpc.StatusCodeException cannot be cast to org.ow2.proactive_grid_cloud_portal.shared.exception.RestServerException

at org.ow2.proactive_grid_cloud_portal.client.presenter.scheduler.visualization.job.JobDetailsPresenterImpl$2.onFailure(JobDetailsPresenterImpl.java:127)
at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:218)
at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:287)
at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:393)
at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
...

Kill job is not functional

Original issue created by Christian Delbé on 05, Jan 2011 at 13:31 PM - PORTAL-62


When killing a running job (164) :
Wed Jan 05 13:31:16 GMT+100 2011 (link: core.client.presenter, WARNING): Submitting job. Trying to submit the file job.xml to the Scheduler.
Wed Jan 05 13:31:17 GMT+100 2011 (link: core.client.presenter, WARNING): Job submitted. A new job with the id 164 having the name: Generated Job was submitted.
Wed Jan 05 13:31:29 GMT+100 2011 (link: core.client.presenter, WARNING): Killing job. Trying to kill the job 164.
Wed Jan 05 13:31:29 GMT+100 2011 (link: core.client.presenter, WARNING): The job having the id 164 could not be killed.
Wed Jan 05 13:31:29 GMT+100 2011 (link: core.client.presenter, WARNING): The error message: "404 - Not Found error. <title>Apache Tomcat/6.0.26 - Error report</title><style></style>

HTTP Status 404 - Could not find resource for relative : /scheduler/jobs/164/kill of full path: http://localhost:8080/proactive_grid_cloud_portal/scheduler/jobs/164/kill


type Status report

message Could not find resource for relative : /scheduler/jobs/164/kill of full path: http://localhost:8080/proactive_grid_cloud_portal/scheduler/jobs/164/kill

description The requested resource (Could not find resource for relative : /scheduler/jobs/164/kill of full path: http://localhost:8080/proactive_grid_cloud_portal/scheduler/jobs/164/kill) is not available.


Apache Tomcat/6.0.26

" occurred when trying to kill the jobs with the id 164.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.