Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#1305 closed enhancement (fixed)

Maestro API: Pluggable server connection implementations

Reported by: jng Owned by: jng
Priority: high Milestone: Maestro-3.0
Component: Maestro Version:
Severity: major Keywords: maestro, connection, api
Cc: External ID:

Description

The current ServerConnectionI interface has 2 known implementations:

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:

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.

Change History (2)

comment:1 by jng, 14 years ago

Resolution: fixed
Status: newclosed

Fixed in r4739

comment:2 by jng, 14 years ago

Milestone: Maestro-2.1Maestro-3.0

Milestone Maestro-2.1 deleted

Note: See TracTickets for help on using tickets.