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


Figure 8.1. The Structure of the CWUI Home Capabilities View Submit Jobs Docs Submitter JobViewer

8.6.2. CWUI Style Point to CSS

8.6.3. CWUI Javascript and AJAX usage JQuery OpenLayers

8.6.4. Dynamic parameters and process configuration files

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