Home :: Developers

COWS Web Processing Service (COWS WPS)

«  7. Interoperability and service-chaining   ::   Contents   ::   9. Future development  »

8. Details for developers

8.1. Pylons core and Model-View-Controller approach

Here is what James Gardner says about Pylons in his excellent book:

Pylons is a lightweight web framework built on standard Python tools
that provides a robust environment for writing modern web applications.
It is well known for its clean architecture and loosely coupled approach,
both of which make web development fast, flexible, and easy.

The Pylons framework adopts the Model-View-Controller [Pylons-MVC] paradigm. Model-view-controller is a type of software architecture that is designed to separate out the programming into logical groupings:

  • business logic (model)
  • presentation code (view)
  • application logic (controller)

This clean separation of concerns allows development and testing of each aspect of the code in isolation. It also speeds up the process of exposing new “views” of the data within an application without having to change the core code.

8.2. Code overview

8.3. Database and Object-relational model

8.3.1. Request and Job objects

8.4. Synchronising code across servers

8.5. Testing processes on offline processing servers

When an offline request is submitted the inputs are serialised into a Python pickle object. The execution environment is provided by a wrapper script used to run all processes. It is often useful to test that a process runs correctly on an offline processing server. To do this, you need to:

# Login to the offline processing server
$ ssh my-proc1

# Change directory to the job directory (which was saved when the "dry-run" Execute call was made)
$ cd <proc_outputs_dir>/<date_dir>/<process_identifier>/<process_id>/

# Then run the process using the wps_runproc wrapper script
$ <wps_home_dir>/bin/wps_runproc process_modules.<proc_module>#<ProcClass> $PWD

8.6. CWUI for developers

8.6.1. CWUI Structure

../_images/cwui_structure.png

Figure 8.1. The Structure of the CWUI

8.6.1.1. Home

8.6.1.2. Capabilities

8.6.1.3. View

8.6.1.4. Submit

8.6.1.5. Jobs

8.6.1.6. Docs

8.6.1.7. Submitter

8.6.1.8. JobViewer

8.6.2. CWUI Style

8.6.2.1. Point to CSS

8.6.3. CWUI Javascript and AJAX usage

8.6.3.1. JQuery

8.6.3.2. OpenLayers

8.6.4. Dynamic parameters and process configuration files

«  7. Interoperability and service-chaining   ::   Contents   ::   9. Future development  »