How to Use Maestro API Local Native Connection?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to Use Maestro API Local Native Connection?

rexuli
Mapguide version: 3.1.2
Maestro API Version: 6.0m10
Platform: Windows Server 2008

MapGuide will become unresponsive during peak hours. When I check the
documents, I found that there is a connection call LocalNative. But I cannot
make it work, could someone give a help?

Other than that, I have some other questions:
- Is LocalNative is "Connect via TCP/IP" in Mastro GUI login or "Connect
Locally"?
- Can LocalNative help for performance?
- Does use Postgresql10.6/Postgis 2.5 will help for MapGuide Performance?




--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: How to Use Maestro API Local Native Connection?

bishmanly
This post was updated on .
Done some searching and found the following. I have not tried this. Maybe
Jackie or others more knowledgeable can correct/clarify.

It seems the "Connect via TCP/IP" radio button in Maestro's "Connect to
MapGuide" window enables the "LocalNativeConnection" feature in Maestro.
LocalNativeConnection uses TCP/IP to directly communicate with the MapGuide
Site Server. This bypasses the MapGuide Web Tier layer so should be higher
performance. I read somewhere to beware that LocalNativeConnection does not
support everything that MapGuide Web Tier supports.

To enable "Connect via TCP/IP", you will need to sign a bunch of assemblies
with the Maestro public key. See
https://themapguyde.blogspot.com/2010/10/using-maestro-in-native-mode-with.html
. There is this utility
https://github.com/jumpinjackie/mapguide-maestro/tree/7d8f5e32e29995a5a201da1c5e4ba6c31803cebc/SignMapGuideApi
you can build that might be related to this task.

And you will need to build a connection provider DLL called
OSGeo.MapGuide.MaestroAPI.Native32-x.x.x.dll. The source for a version that
works with MapGuide v2.2 is at
https://github.com/jumpinjackie/mapguide-maestro/tree/7d8f5e32e29995a5a201da1c5e4ba6c31803cebc/OSGeo.MapGuide.MaestroAPI.Native
so you can start with that.

Then you will need to update ConnectionProviders.xml in the Maestro install directory to enable this
OSGeo.MapGuide.MaestroAPI.Native connection provider.

Once you got that setup, you will need a copy of MapGuide Web tier's
Webconfig.ini and MapGuide credentials to connect.

Here are others who have tried:
http://osgeo-org.1560.x6.nabble.com/How-to-enable-TCP-IP-based-connection-in-Maestro-3-1-td4184434.html
https://trac.osgeo.org/mapguide/ticket/2571

These might also me helpful:
https://themapguyde.blogspot.com/2010/05/webtier-less-editing-with-maestro.html
https://github.com/jumpinjackie/mapguide-maestro/tree/master/Properties
https://trac.osgeo.org/mapguide/wiki/maestro/MaestroAPI/basics#ExtrasetupfortheLocalNativeConnection
http://trac.osgeo.org/mapguide/wiki/maestro/MaestroAPI/MapGuideDotNetApiVersions
https://github.com/jumpinjackie/mapguide-maestro/blob/master/MaestroAPITestRunner/ConnectionProviders.xml
https://github.com/jumpinjackie/mapguide-maestro/blob/7d8f5e32e29995a5a201da1c5e4ba6c31803cebc/Maestro.Login/LoginDialog.cs



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
mapguide-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: How to Use Maestro API Local Native Connection?

Jackie Ng
In reply to this post by rexuli
The "Local Native" connection is an implementation of the Maestro API
interfaces that wraps the official MapGuide API, performance would be
slightly slower than if you were to just use the .net MapGuide API directly.

Hopefully this diagram explains where the Maestro API and its various
connection modes fit:
https://jumpinjackie.github.io/mapguide-maestro/devguide/coreconcepts.html#overview

The only reason you would ever want to use the "Local Native" connection
mode for your applications is if you already have a large swath of .net code
written using the Maestro API, but you don't want to bother with going
through the default http connection mode. The "Connect via TCP/IP" GUI login
option in Maestro (the end-user application) has no real practical purpose
beyond testing that the "Local Native" connection provider meets all the
behavioral contracts defined by the various Maestro API interfaces.

Now if you want to still go ahead and want to use this connection mode in
light of the above information, I'm afraid it's currently very difficult to
do. I used to provide an SDK zip package which contained the Maestro API
dlls, sample code and a provider template tool that helps build a local
native provider assembly for your particular version of MapGuide against the
provided Maestro API dlls, but this SDK package has been left in limbo due
to converting the Maestro API to become a series of .net standard libraries
provided as nuget packages, which has rendered the SDK package obsolete and
I'm figuring out a suitable alternative (current issue tracking this:
https://github.com/jumpinjackie/mapguide-maestro/issues/77).

In the meantime, I would just echo bishmanly's suggestion of just looking at
the source (in particular, the ProviderTemplate tool) to see how it produces
a local native assembly for you to use.

But again I emphasize: You must have a good reason to use the Maestro API
instead of just using the official .net MapGuide API proper if performance
is your main concern.

- Jackie



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users