wiki:MapGuideArchitecture

Version 14 (modified by tomfukushima, 16 years ago) ( diff )

Put ! in front of bogus hyperlink so that it is not live

MapGuide Architecture


Revision History

RevisionDateAuthorComment
1.0October 31, 2008Bruce DechantInitial public revision
1.0November 4, 2008Bruce DechantUpdated various sections
1.0November 24, 2008Bruce DechantUpdated various sections

Table of Contents

  1. Overview
  2. Related Documents
  3. Terms and Definitions
  4. High Level View
    1. Client Tier View
      1. AJAX VIEWER
      2. DWF VIEWER
      3. FUSION VIEWER
      4. MAESTRO
      5. SITE ADMINISTRATOR
    2. Web Tier View
    3. Server Tier View
    4. Interaction Model
  5. Server Component Architecture
    1. Server Framework
    2. Thread Management
      1. Main Process Thread
      2. Worker Thread
    3. Memory Management
      1. Smart Pointers
      2. Caching
      3. Windows
      4. Linux
    4. Operation Processing
      1. Client Operations
      2. Admin Operations
      3. Site Operations
      4. Operation Processing Sequence
      5. Internal Operation Processing Interaction Model
    5. Session Management
      1. Overview
      2. Session Object
      3. Properties
  6. Web Tier Component Architecture
  7. Configuration Settings
  8. TBD

Overview

This document describes the MapGuide architecture. The MapGuide server is based on the ACE (ADAPTIVE Communications Environment) framework.

Related Documents

DocumentLink
ACE (ADAPTIVE Communication Environment)http://www.cs.wustl.edu/~schmidt/ACE.html
AGG (Anti-Grain Geometry)http://www.antigrain.com/
Oracle Berkeley DB XMLhttp://www.oracle.com/technology/products/berkeley-db/index.html

Terms and Definitions

TermDefinition
ACEADAPTIVE Communication Environment
AGGAnti-Grain Geometry
APIApplication Programming Interface
Data connectionA connection between the server and underlying data stores.
DTDXML Document Type Definition
FDOFeature Data Objects
FDO connectionA connection between the server and underlying FDO data store.
FIFOFirst In First Out
HTTPHypertext Transfer Protocol
LDAPLightweight Directory Access Protocol
RDBMSRelational Database Management System
SMPSymmetric Multiprocessing
SQLStructured Query Language
TCP/IPTransmission Control Protocol over Internet Protocol
XMLeXtensible Markup Language
XMLDBNative XML Database
XPathXML Path Language
XQueryXML Query Language
XSDXML Schema Definition

High Level View

The following diagram shows the MapGuide web-based platform 3-tier architecture.

3-tier Architecture
Figure 1 - MapGuide 3-tier architecture

Client Tier View

AJAX VIEWER

The AJAX Viewer is a pure DHTML viewer based on AJAX technology that does not require any downloadable plug-ins. This viewer works in all major browsers on Windows, Mac, and Linux.

DWF VIEWER

The DWF Viewer embeds the downloadable Autodesk DWF Viewer which is based on a Microsoft ActiveX Control with full support for the Autodesk DWF format. This viewer works in Microsoft Internet Explorer only.

FUSION VIEWER

Built primarily in JavaScript, Fusion is a web mapping application development framework. Fusion allows web designers and developers to build rich mapping applications quickly and easily. Using “widgets” that provide the interface functionality within Fusion’s modular architecture, developers are able to add, remove, or modify functionality using standard-compliant HTML and CSS. Fusion requires no proprietary browser plug-ins, and it produces applications that work in all major browsers on Windows, Mac, and Linux. Fusion provides a flexible means of interacting with MapGuide Open Source. Using a growing suite of widgets, this modular-based system allows you to build powerful, interactive AJAX applications quickly with minimal programming experience. For applications requiring special functionality, Fusion provides an extensible platform that allows you to develop your own widgets.

MAESTRO

TBD

SITE ADMINISTRATOR

The MapGuide Site Administrator is an application for managing your site and its servers. This application uses a web-based interface that you can access from any web browser. To start the program, open a browser and enter: http://servername:port/mapguide/mapadmin/login.php, using the name of the site server and port that you specified during installation. You use the MapGuide Site Administrator to add and remove servers, take servers offline for maintenance, modify the configuration of a server, assign services to the servers, and monitor the status of any server. The MapGuide Site Administrator is not a separate product component, but it is installed as a part of the MapGuide Web Server Extensions.

Web Tier View

TBD

Server Tier View

TBD

Interaction Model

The following diagram shows the interaction between the various tiers.

Interaction Client, Web, Server
Figure 2 - Interaction between tiers

The following diagram shows the interaction between servers.

Interaction Server to Server
Figure 3 - Interaction between servers

Server Component Architecture

Server
Figure ? - Server Components

TBD

Server Framework

At the high level the server framework looks like the following:

Internal server framework
Figure 4 - Internal server framework

The server framework essentially shows that “Operations” coming from either a web application server or another MapGuide server will be received by the server on a specified port. The server will then dispatch the incoming operation to an “Operation” queue for processing. The server dispatcher is based on the ACE reactor model. The “Operation” queue is a FIFO design which is connected to a thread pool of worker threads. Operations on the queue are removed by a worker thread from the thread pool for processing. The ACE framework thread manager handles the determination of which worker thread gets to process the queued operation. The worker thread will then process the operation and when the operation processing is complete the worker thread will rejoin the thread pool ready to process another operation.

Thread Management

The MapGuide server is a multithreaded in design. This allows for improved processing and response to operations. The server will consist of the following types of threads:

  • Main process thread
  • Worker threads
Thread identification
Figure 5 - Thread identification

Main Process Thread

This is the main executable thread of the server. The main purpose of this thread is to dispatch incoming operations to the queue for processing by the worker threads. This thread will also be responsible for initializing the server which includes initializing the coordinate system library, opening the repository, creating the worker thread pools, etc…

Worker Thread

This is a thread that is used to process an operation. Essentially, this is a thread that does all the work. The main process thread of the server will be responsible for creating thread pools consisting of these worker threads based on the configuration settings of the server.

Memory Management

The server and any components used by the server must be conscious of their memory use and reclamation of used resources when no longer needed.

Smart Pointers

Wherever possible in the server and any of its components smart pointers are used.

Caching

In order to improve performance the server caches several types of resources. The following lists some of what the server caches:

  • FDO connections (when specified in the server configuration)
  • FDO Schema Definitions (Object and XML representation)
  • FDO Class Definitions (Object and XML representation)
  • FDO Property Definitions (Object and XML representation)
  • Coordinate Systems

Windows

The default memory management library is used.

Linux

The default memory management library is used.  

Operation Processing

The server supports the processing of 3 types of operations:

  • Client operations
  • Admin operations
  • Site operations

Client Operations

The majority of operations processed by the server will be of the “Client” type. Essentially, these are the operations that come from MapGuide clients.

Admin Operations

The “Admin” operations will be specific to managing and administering a MapGuide server using the MapAdmin.

Site Operations

The “Site” operations will be specific to managing session/repository replication in a future release.

Operation Processing Sequence

The diagram below shows the sequence for processing either a “Client” or “Admin” operation.

Operation sequence
Figure 6 - Operation sequence

Internal Operation Processing Interaction Model

Operation Objects

All server requests and their associated responses are represented internally by Operation objects. A simplified object diagram is shown in figure 7.

Simplified operation object
Figure 7 - Simplified operation object
Operation Object Base Class

The Operation class is an abstract class that provides the base level of functionality. This functionality includes methods to serialize and deserialize the Operation from the data packets sent to the server. It also maintains a reference back to the object that handles its transmission back to the client.

OperationRequest Base Class

This class represents the operation request or other action that the server can execute. It has an Execute method that the server will call to fulfill the request. This class is abstract, so OperationRequest classes must be implemented for every operation that the server can perform. The Execute method will return an OperationResponse object.

OperationResponse

This class encapsulates the result of an executed OperationRequest. It is serialized and sent back to the web tier or other server.

Operation Processing Details

A more detailed sequence diagram showing the creation and processing of operations is shown in figure 8.

Operation processing sequence
Figure 8 - Operation processing sequence

The following describes the “Operation Processing” seqeunce:

  • The Web Tier connects to a socket on the server. A ClientAcceptor object server-side is listening on the port, accepts the connection, and creates a ClientService object to handle the the connection. The ClientAcceptor object will create a separate ClientService object for each connection.
  • The ClientService object handler creates Operation objects from the raw request stream sent from the web tier. It reads the input stream from the socket, deserializes the packets from the stream, and then creates the specific Operation objects as determined by the deserialized objects. It then places the object in the servers OperationQueue to be processed by a worker thread in the server’s thread pool. The handler then returns to allow other ClientService objects to process their data.
  • It will periodically check to see if it has obtained a OperationResponse object to return to the Web Tier client.
  • Once in the queue, the Operation object sits until an OperationHandler can process it. A OperationHandler processes the object by calling its Execute() method. The handler then takes the reponse and gives it back to the ClientService.
  • The ClientService will eventually realize that it has obtained a response. It will then pack the response up and sent it back to the Web Tier or other client. The object will remain to process additional client requests or be destroyed if the client closes the connection.

Session Management

Overview

Session management will be used to enhance request/response performance in connections between the server and the web-tier as well as to track information about the connection for logging output. Session management will be handled through the use of a session object, which will be present in every server connection.

Session Object

A session object is created when a connection between the web-tier and server is established. A connection is authenticated throughout its lifetime. The session is closed when the connection is closed. The session object is used to store state information about a particular connection that can be written to a log. Such information includes connection ID, connection start time, total number of operations received, total number of operations successfully processed and information on any data (FDO) connections established during a session.

When a data connection (or FDO connection) is established during a session, operations to that data connection can be made until the data connection is explicitly closed or until the session is closed. Data connections opened during the session will be maintained in a dynamic collection that will grow as data connections are added to it.

The session object will hold references to any established data connections, but will not manage them. It will be the caller’s responsibility to allocate memory and to open data connections. Once a data connection has been established, it should be added to the session’s collection set. Similarly, the caller will be responsible for closing data connections and performing memory de-allocation.

Properties

The following table describes the session object properties that will be associated with each connection.

Web Tier Component Architecture

Web
Figure ? - Web tier components

TBD

Configuration Settings

TBD

Attachments (18)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.