Innovate the future

Find the passion of life...
  首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

ArcGIS Server开发技术交流二

Posted on 2005-01-11 09:27  BPM  阅读(4991)  评论(18编辑  收藏  举报

1.ArcGIS Engine和ArcGIS Server的交叉点,是否可以利用ArcGIS Engine直接开发成COM组件,然后由ArcGIS Server调用,或者先通过Web Services的方式调用,再通过ArcGIS Server调用Web Services

可以利用Engine开发COM组件的方式,然后由ArcGIS Server直接调用,或者通过类的方式来集成,(但是Engine提供的组件的实现和逻辑应该分开,即Engine开发组件不能带有界面,而只能通过Engine来实现封装特定功能的组件,因为IE和开发COM组件的界面无法融合),同时,Engine提供的组件必须提供符合Server要求的统一接口。

如果部署在一台服务器上,也可以通过Web Services的方式进行集成。  

2.开发Web应用程序,是否可以只采用ArcGIS Server,而不需要ArcGIS Engine。如果使用Engine的话,优势主要体现在哪些方面?
开发Web应用程序,可以只采用ArcGIS Server,可以不需要ArcGIS Engine。因为Server和Engine底层的API是相同的。而采用何种架构模式取决于用户需求和具体的应用。两者实现的方式有一定的差别。  

3.ArcGIS Server和ArcIMS的关系。
ArcGIS Server是否可以取代ArcIMS,如果不能的话,它们的侧重点各是什么?ArcGIS Server是否可以用于地图数据发布? ArcGIS Server可以代替ArcIMS,但是必须有高效的服务器,同时实现很好的负载平衡。ArcIMS适合高性能的地图数据发布,它提供的功能比较简单(只具备Viewer的操作),但是速度明显优于ArcGIS Server。而ArcGIS Server可以实现所有Engine可以实现的功能,包括一些高级的GIS功能,比如空间分析等 

4.ArcGIS Server部署方案
采用ArcGIS Server开发,部署时推荐使用Windows 2003 Server,有利于负载平衡。也可以采用2000 Pro/XP,但是最好采用Server平台  

5.Server Objects
A server object is a coarse-grained ArcObjects component that runs in a process on the SOC machine. ArcGIS Server comes with two out-of-the-box server objects:
  .esriCarto.MapServer
  .esriLocation.GeocodeServer 

6.池式和状态
Pooled server objects are expected to be used in a stateless manner. As a developer, you are responsible for making sure that the state of the server object, or its associated objects, has not changed when you return the object to the pool (by releasing its context via ReleaseServerContext).Each time a user or application session makes a request to create a pooled server object, it’s indeterminate which running instance it will get out of the pool; therefore, all instances must have the same state or applications will experience inconsistent behavior.

Non-pooled server objects can be used in a stateful manner. Since nonpooled server objects and their contexts are destroyed when you release them, you need to hold onto them for as long as the state is important to you. When you call ReleaseServerContext, or you allow the server context to go out of scope, the server object and its context are destroyed, purging any state changes you made.

7.状态管理
有状态(状态发生改变的时候)——非池式的服务器对象(或者池式的服务器对象,但在释放返回服务器上下文的时候能恢复的原来起始的状态,这种情况比较少)
无状态(状态不改变)——池式的服务器对象(也可以使用非池式的服务器对象,但不能发生状态的改变,这种情况比较少)

 
8.状态改变
调用服务器对象状态的方法:
      从地图的服务器对象中增加/删除图层 
      改变服务器对象中图层的Renderer

调用环境状态的方法:可以作用于池式/非池式的服务器对象,但是在池式的服务器对象中,应用程序在执行操作前不应该依赖处于特殊状态的环境;如果应用程序依赖于环境的状态时,在执行操作前要求设置所需要的环境状态
 

9.SCALABILITY的关键在于GIS Server的状态性,保持应用程序Scalability的标准
使用无状态的GIS Server
池式的服务器对象
减少应用程序控制服务器对象的时间。及时地释放服务器对象,不能仅仅依赖于.NET自带的垃圾回收系统