Version 14 (modified by 16 years ago) ( diff ) | ,
---|
MapGuide Architecture
Revision History
Revision | Date | Author | Comment |
1.0 | October 31, 2008 | Bruce Dechant | Initial public revision |
1.0 | November 4, 2008 | Bruce Dechant | Updated various sections |
1.0 | November 24, 2008 | Bruce Dechant | Updated various sections |
Table of Contents
- Overview
- Related Documents
- Terms and Definitions
- High Level View
- Server Component Architecture
- Web Tier Component Architecture
- Configuration Settings
- TBD
Overview
This document describes the MapGuide architecture. The MapGuide server is based on the ACE (ADAPTIVE Communications Environment) framework.
Related Documents
Document | Link |
ACE (ADAPTIVE Communication Environment) | http://www.cs.wustl.edu/~schmidt/ACE.html |
AGG (Anti-Grain Geometry) | http://www.antigrain.com/ |
Oracle Berkeley DB XML | http://www.oracle.com/technology/products/berkeley-db/index.html |
Terms and Definitions
Term | Definition |
ACE | ADAPTIVE Communication Environment |
AGG | Anti-Grain Geometry |
API | Application Programming Interface |
Data connection | A connection between the server and underlying data stores. |
DTD | XML Document Type Definition |
FDO | Feature Data Objects |
FDO connection | A connection between the server and underlying FDO data store. |
FIFO | First In First Out |
HTTP | Hypertext Transfer Protocol |
LDAP | Lightweight Directory Access Protocol |
RDBMS | Relational Database Management System |
SMP | Symmetric Multiprocessing |
SQL | Structured Query Language |
TCP/IP | Transmission Control Protocol over Internet Protocol |
XML | eXtensible Markup Language |
XMLDB | Native XML Database |
XPath | XML Path Language |
XQuery | XML Query Language |
XSD | XML Schema Definition |
High Level View
The following diagram shows the MapGuide web-based platform 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.
Figure 2 - Interaction between tiers |
The following diagram shows the interaction between servers.
Figure 3 - Interaction between servers |
Server Component Architecture
Figure ? - Server Components |
TBD
Server Framework
At the high level the server framework looks like the following:
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
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.
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.
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.
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
Figure ? - Web tier components |
TBD
Configuration Settings
TBD
Attachments (18)
-
image1.jpg
(36.0 KB
) - added by 16 years ago.
3-tier Architecture
-
image2.jpg
(42.2 KB
) - added by 16 years ago.
Server
-
image3.jpg
(20.0 KB
) - added by 16 years ago.
Web
-
image4.jpg
(24.8 KB
) - added by 16 years ago.
Stylizer
-
image5.jpg
(33.8 KB
) - added by 16 years ago.
Interaction Client, Web, Server
-
image6.jpg
(23.5 KB
) - added by 16 years ago.
Interaction Server to Server
-
image7.jpg
(48.5 KB
) - added by 16 years ago.
Resource Repository Content
-
image8.jpg
(17.6 KB
) - added by 16 years ago.
Resource Nodes
-
image9.jpg
(29.7 KB
) - added by 16 years ago.
Resource Repository Structure
-
image10.jpg
(16.5 KB
) - added by 16 years ago.
Site Resource Contents Container
-
image11.jpg
(27.8 KB
) - added by 16 years ago.
Library Resource Contents Container
-
image12.jpg
(74.1 KB
) - added by 16 years ago.
Internal server framework
-
image13.jpg
(34.4 KB
) - added by 16 years ago.
Thread identification
-
image14.jpg
(18.1 KB
) - added by 16 years ago.
Operation sequence
-
image15.jpg
(12.4 KB
) - added by 16 years ago.
Simplified operation object
-
image16.jpg
(36.4 KB
) - added by 16 years ago.
Operation processing sequence
-
GetTileSequence.png
(34.7 KB
) - added by 16 years ago.
GetTileSequence
- SWIG build process.png (100.6 KB ) - added by 12 years ago.
Download all attachments as: .zip