[mapguide-trac] #1305: Maestro API: Pluggable server connection implementations

MapGuide Open Source trac_mapguide at osgeo.org
Tue Apr 6 01:51:46 EDT 2010


#1305: Maestro API: Pluggable server connection implementations
---------------------------+------------------------------------------------
   Reporter:  jng          |       Owner:  jng                     
       Type:  enhancement  |      Status:  new                     
   Priority:  high         |   Milestone:  Maestro-2.1             
  Component:  Maestro      |     Version:                          
   Severity:  major        |    Keywords:  maestro, connection, api
External_id:               |  
---------------------------+------------------------------------------------
 The current ServerConnectionI interface has 2 known implementations:

  * HttpServerConnection
  * LocalNativeConnection

 What would be really useful is if we can create these specific
 implementations in a generic/consistent manner. This way, we allow room to
 plug in different implementations (say a GeoREST wrapper) in the near
 future.

 To achieve this, we can follow the way it is done in FDO, using a
 connection provider "registry". Each specific implementation is identified
 in the registry by a unique name. For example:

  * Maestro.HTTP for the HttpServerConnection
  * Maestro.Local for the LocalNativeConnection

 Initialization parameters can be encapsulated in the form of a connection
 string. A connection string for a Maestro.HTTP connection may look like:

 {{{
 MapAgent=http://localhost:8008/mapguide/mapagent/mapagent.fcgi;Username=Administrator;Password=admin
 }}}

 A connection string for Maestro.Local may look like:

 {{{
 ConfigPath=C:\MapGuide\webconfig.ini;Username=Administrator;Password=admin
 }}}

 The syntax to obtaining a ServerConnectionI reference without having to
 instantiate the specific type would be something like:

 {{{
 ServerConnectionI httpConn =
 ConnectionProviderRegistry.CreateConnection("Maestro.HTTP",
 "MapAgent=http://localhost:8008/mapguide/mapagent/mapagent.fcgi;Username=Administrator;Password=admin");
 }}}

 To guide users to using this new API, the constructors of
 HttpServerConnection and LocalNativeConnection will be marked with the
 Obsolete attribute, indicating that it will be removed in a future
 version.

-- 
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/1305>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals


More information about the mapguide-trac mailing list