ArcGIS Server can be connected through local or Internet

Source: Internet
Author: User
ArcGIS Server can be connected through local and Internet. Local connections are connected to Som by using AO at the Customer Service end, while Internet connections are connected to the Web service end by using a local proxy at the Customer Service end, local proxy refers to the Local Development Environment (.. net, Java.

Local connections allow you to use the ao api and soap API to operate services, that is, server objects and server context. If you need to permanently change the state of server objects (stateful), you can only use the ao api, of course, you also need to use the local method to connect. The local connection requires the server machine name and the service name to be connected, and the connection must use the user in the agsusers or agsadmin Group to add identity verification; local data sources allows developers to operate fine-grained AO through server context, that is, they can use a wide range of AO functions in the Web ADF application, such as editing layers and network analysis. If you use local data source programmatically, use the data resource library ESRI. arcGIS. ADF. web. datasources. arcgisserver, map description can be obtained through mapfunctionality; while mapresourcelocal can also be obtained through servercontextinfo. servercontext to get the context.

Internet connection only provides the ability to use soap APIs to access and operate services through WSDL, and all services are stateless. For Internet data source, context is invalid, and of course there is no fine-grained AO function. The indentity verification of this connection is not required, because ArcGIS Server Web services can use web server-based verification, that is, multiple Internet data sources in a web application can adopt different security authentication methods. The pool type is recommended for Internet-connected services, while the non-pool type only applies to services of a single user and must be destroyed after each use. If you connect to and use non-pool services over the Internet, each map operation will create and destroy a process, which will greatly affect your work efficiency. If you use Internet Data Source programmatically, use the data resource library ESRI. arcGIS. ADF. web. datasources. arcgisserver, which contains the functionality class and other fine-grained task classes for stateless use.

In short, you can select the connection mode of the client to the server according to the following rules:
1. Internet connection uses soap APIs and uses URLs to connect to the web service. Internet connections can be applied to internal (LAN) and Internet networks.
2. The local connection method can use the ao api or the soap API. The local connection can only be used in the LAN according to the customer service needs.

 

ArcGIS Server is a server-side AO component set. Our programming operations on as all mean operations on objects on the remote server. This is a big difference. Using AE as an example, we create an object with the New Keyword. This is an operation to create a new object on the local machine. This operation is always encapsulated in a process. The development of as means that a local object must call a remote object to implement a certain function. The local operation process and remote operation process are actually two different processes, how can we communicate between two processes?

As uses the distributed object technology dot to solve this problem. The ADF provides a series of so-called ArcObjects proxy objects. A proxy object is a local reference of a remote object, its interfaces and methods are exactly the same as the remote objects of the proxy object. Therefore, our operations on the proxy object will directly affect the remote objects of the proxy.

As we have said, as is a three-tier model, in which the webProgramBoth web services and Web services are deployed on the Web server. In order to allow programs on the Web server to interact with the AO component on the GIS server by operating the AO component, we need to install the ADF on the Web server. If it is released, install the ADF runtime. Therefore, Ao's proxy objects are installed on the Web server.

Web programs or web services use server APIs. These APIs are divided into server APIs,. Net webcontrol and Java webcontrol.

When a web application is connected to the GIS server, the Server API used by the web application calls a proxy object to access the SOM object on the remote server, and find the server object managed by SOM through the SOM object. It uses distributed object technology dot. This process is as follows:

Igisserverconnection pgisserverconn = new gisserverconnectionclass ();
Pgisserverconn. Connect ("nbjbt"); // connect to the GIS server
Iserverobjectmanager som = pgisserverconn. serverobjectmanager; // locate the SOM on the GIS server
Iservercontext pservercontext = som. createservercontext ("nbserver", "mapserver"); // create the context of a server object through som
Iserverobject PSO = pservercontext. serverobject; // locate the server object from the context object
Imapserver pmapserver = (imapserver) (PSO); // use the imapserver interface to access server objects
......
Pservercontext. releasecontext (); // release the context of the server object, that is, close the process.

Servercontext is essentially a process on the GIS server, and it is also the starting point of Server programming. Therefore, the createservercontext command is created on the server, instead of the new keyword. We access the server object nbserver through this process. Our work is also completed in this process.

Since it is programmed in a process, the keyword used to create an object in this process is not new, but the following method:
Create an object psc. Createobject ("esrigeometry. ipoint ")
Put an object into a process psc. loadobject (PPT)
Put an object in the process dictionary. psc. setobject ("A", PPT)
Retrieve the object from the process dictionary pnewpt = psc. GetObject ("")

Pooling and non-pooling modes of serverobject

When we access a server object, this object already exists? Or is it newly created during access? It is possible, depending on how we choose. If we select the Shared Pool Mode, at the startup of SOM, som will establish several so for external access. After one so is accessed by a request, it will be released back to the shared pool, it can be accessed and used by B next time. Therefore, so can be accessed by multiple users. In non-Shared Pool Mode, when a request is accessed, Som creates a so for it.

In this way, in pooled mode, the ratio of access to so is not, and it supports more users. Instead, the pooled mode is, and it supports fewer users than the pooled mode.

So is placed in a server context, that is, a process. An access connection to so is a routine, which is placed in a process. We need to further set the features of this process, that is, the isolation of processes. If the server context is highly isolated, only one routine can be placed in a process to ensure security. If the server context is low, the four access connection routines can be placed in one process, which features resource saving. As for how to set up, it is necessary to consider our hardware devices.

Pooled and non-pooled settings also affect the status or non-State applications, which we will mention later in the blog.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.