kentucky transportation cabinet gis branch the kentucky transportation cabinets use of server...

34
Kentucky Transportation Cabinet GIS Branch http:// transportation.ky.gov/ maps The Kentucky Transportation Cabinet’s use of Server Object Extensions (SOEs) Scott Dickison, GISP

Upload: makenzie-upham

Post on 28-Mar-2015

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Kentucky Transportation Cabinet GIS Branch  The Kentucky Transportation Cabinets use of Server Object Extensions (SOEs)

Kentucky Transportation CabinetGIS Branch http://transportation.ky.gov/maps

The Kentucky Transportation Cabinet’s use of Server Object

Extensions (SOEs)

Scott Dickison, GISP

Page 2: Kentucky Transportation Cabinet GIS Branch  The Kentucky Transportation Cabinets use of Server Object Extensions (SOEs)

Kentucky Transportation CabinetGIS Branch http://transportation.ky.gov/maps

• What is a Server Object Extension (SOE)?

• How do you…• Write a SOE?• Use a REST SOE in a .NET application?

• How is the Transportation Cabinet using SOE’s with ArcGIS Server 10.0?

This morning’s topics:

Page 3: Kentucky Transportation Cabinet GIS Branch  The Kentucky Transportation Cabinets use of Server Object Extensions (SOEs)

Kentucky Transportation CabinetGIS Branch http://transportation.ky.gov/maps

What on Earth are you talking about?

Page 4: Kentucky Transportation Cabinet GIS Branch  The Kentucky Transportation Cabinets use of Server Object Extensions (SOEs)

Kentucky Transportation CabinetGIS Branch http://transportation.ky.gov/maps

Spatially Enabled Web Services!

SOE’s extend the capabilities of your ArcGIS Server map services beyond just data display and query.

Page 5: Kentucky Transportation Cabinet GIS Branch  The Kentucky Transportation Cabinets use of Server Object Extensions (SOEs)

Kentucky Transportation CabinetGIS Branch http://transportation.ky.gov/maps

♫♫♪ The Circle of Life Data ♫♫♪

SDE & Other Databases

MAP Service/SOE

Web Client

DESERIALIZER

Service Request

Seria

lized

Dat

a

Custom Class

Application

Page 6: Kentucky Transportation Cabinet GIS Branch  The Kentucky Transportation Cabinets use of Server Object Extensions (SOEs)

Kentucky Transportation CabinetGIS Branch http://transportation.ky.gov/maps

http://someserver.somewhere.org/ArcGIS/rest/services/MeasuredRoute/MapServer/exts/KYTCGISREST/GetRouteInfo?X=5164738.4563+&Y=3893182.2452+&SearchRadius=10&f=pjson

• Programmatically constructed and submitted by the application

REST Service Request URL

Page 7: Kentucky Transportation Cabinet GIS Branch  The Kentucky Transportation Cabinets use of Server Object Extensions (SOEs)

Kentucky Transportation CabinetGIS Branch http://transportation.ky.gov/maps

Serialized JSON or XML Output

Page 8: Kentucky Transportation Cabinet GIS Branch  The Kentucky Transportation Cabinets use of Server Object Extensions (SOEs)

Kentucky Transportation CabinetGIS Branch http://transportation.ky.gov/maps

• Can be developed for REST or SOAP Access• KYTC has chosen to write them as REST services

• Can be written in .NET or Java

• Provide access to the full suite of ArcObjects

SOE Basics

Page 9: Kentucky Transportation Cabinet GIS Branch  The Kentucky Transportation Cabinets use of Server Object Extensions (SOEs)

Kentucky Transportation CabinetGIS Branch http://transportation.ky.gov/maps

• Need to be deployed to all of a site’s ArcGIS Servers in multi-server configurations• This TOTALLY changes at 10.1!

• Return information is in JSON but can be written to return other data formats.• KYTC offers both JSON and XML

SOE Basics

Page 10: Kentucky Transportation Cabinet GIS Branch  The Kentucky Transportation Cabinets use of Server Object Extensions (SOEs)

Kentucky Transportation CabinetGIS Branch http://transportation.ky.gov/maps

• Fast!• Low server overhead

• SOE’s live and die with the map service they’re attached to

• No performance hit for having to spin up an instance of the SOE when a request is made

• Easily accessible• Can be accessed by any client that is able to

make the request

Advantages of a SOE

Page 11: Kentucky Transportation Cabinet GIS Branch  The Kentucky Transportation Cabinets use of Server Object Extensions (SOEs)

Kentucky Transportation CabinetGIS Branch http://transportation.ky.gov/maps

• ArcGIS Server applications• When desired functionality is not available to

the Silverlight, JavaScript, or Flex APIs.

• Traditional .NET applications…• When an application needs some spatial

functionality but the application itself cannot be written with ArcObjects

When do you need a SOE?

Page 12: Kentucky Transportation Cabinet GIS Branch  The Kentucky Transportation Cabinets use of Server Object Extensions (SOEs)

Kentucky Transportation CabinetGIS Branch http://transportation.ky.gov/maps

• Other considerations…• Geoprocessing services have a large memory

footprint when compared to a SOE – especially for complex tasks

• If the task is complex and is going to be heavily utilized you’ll want to use a SOE.

When do you need a SOE?

Page 13: Kentucky Transportation Cabinet GIS Branch  The Kentucky Transportation Cabinets use of Server Object Extensions (SOEs)

Kentucky Transportation CabinetGIS Branch http://transportation.ky.gov/maps

How are SOE’s written?

Page 14: Kentucky Transportation Cabinet GIS Branch  The Kentucky Transportation Cabinets use of Server Object Extensions (SOEs)

Kentucky Transportation CabinetGIS Branch http://transportation.ky.gov/maps

• Prerequisites:• Knowledge of .NET or Java development• Knowledge of ArcObjects

• Use the templates!• ESRI has provided a SOAP and a REST Visual

Studio project template to get you started.

Development

Page 15: Kentucky Transportation Cabinet GIS Branch  The Kentucky Transportation Cabinets use of Server Object Extensions (SOEs)

Kentucky Transportation CabinetGIS Branch http://transportation.ky.gov/maps

• Building blocks of an SOE• Resources

• Information returned back from the server for use by an operation– ESRI says to think of this as a read-

only property

• Operations• Something you ask the server to

do with a resource

• Every SOE has at least one resource and one operation even if the resource doesn’t return anything

Development

Page 16: Kentucky Transportation Cabinet GIS Branch  The Kentucky Transportation Cabinets use of Server Object Extensions (SOEs)

Kentucky Transportation CabinetGIS Branch http://transportation.ky.gov/maps

• The RestResource class• SOE Operations are associated with a RestResource• Arguments • The SOE’s name• Collection?• The Resource Handler• Capabilities (optional)

– A way to group subsets of operations

• Note: Capabilities are called “Allowed Operations” when looking at the Capabilities tab under Service Properties in ArcCatalog.

Development

Page 17: Kentucky Transportation Cabinet GIS Branch  The Kentucky Transportation Cabinets use of Server Object Extensions (SOEs)

Kentucky Transportation CabinetGIS Branch http://transportation.ky.gov/maps

• The CreateRestSchema function• Returns a RestResource Class• This is where you define the SOE’s operations

(RestOperation class)

Development

Page 18: Kentucky Transportation Cabinet GIS Branch  The Kentucky Transportation Cabinets use of Server Object Extensions (SOEs)

Kentucky Transportation CabinetGIS Branch http://transportation.ky.gov/maps

• The REST Resource Handler• Byte Array• An array of raw data

• Returns information from the server back to the SOE for use by an operation

• For KYTC’s Server Object Extensions we’ve set it up to not return anything

Development

Page 19: Kentucky Transportation Cabinet GIS Branch  The Kentucky Transportation Cabinets use of Server Object Extensions (SOEs)

Kentucky Transportation CabinetGIS Branch http://transportation.ky.gov/maps

• The RestOperation Class• An individual operation in a SOE• Identifies which Operation Handler will be

invoked• Specifies inputs• Specify output types• Optionally specify a capability

Development

Page 20: Kentucky Transportation Cabinet GIS Branch  The Kentucky Transportation Cabinets use of Server Object Extensions (SOEs)

Kentucky Transportation CabinetGIS Branch http://transportation.ky.gov/maps

• The Rest Operation Handler• Byte Array• Handles and validates inputs• Where you should execute any ArcObjects

code (here or in helper methods)• Formats output in the specified format

Development

Page 21: Kentucky Transportation Cabinet GIS Branch  The Kentucky Transportation Cabinets use of Server Object Extensions (SOEs)

Kentucky Transportation CabinetGIS Branch http://transportation.ky.gov/maps

• Signing the assembly• Signing the assembly with a strongly named

key will let you place the assembly in the server’s GAC

Development

Page 22: Kentucky Transportation Cabinet GIS Branch  The Kentucky Transportation Cabinets use of Server Object Extensions (SOEs)

Kentucky Transportation CabinetGIS Branch http://transportation.ky.gov/maps

• Testing• Once deployed an

HTML Page is generated for the SOE in the REST services directory of the map service it is attached to

Development

Page 23: Kentucky Transportation Cabinet GIS Branch  The Kentucky Transportation Cabinets use of Server Object Extensions (SOEs)

Using SOE’s in a .NET Application

Page 24: Kentucky Transportation Cabinet GIS Branch  The Kentucky Transportation Cabinets use of Server Object Extensions (SOEs)

Kentucky Transportation CabinetGIS Branch http://transportation.ky.gov/maps

• Making the request• The WebClient Class…• Constructing the URL...• The OpenReadCompleted event handler

Using SOE’s in a .NET Application

Page 25: Kentucky Transportation Cabinet GIS Branch  The Kentucky Transportation Cabinets use of Server Object Extensions (SOEs)

Kentucky Transportation CabinetGIS Branch http://transportation.ky.gov/maps

• The WebClient Class• Provides common methods for sending data to

and receiving data from a resource identified by a URI. (MSDN web site)

• Constructing the URL• Programmatically construct the entire call and

provide it to the WebClient

Using SOE’s in a .NET Application

Page 26: Kentucky Transportation Cabinet GIS Branch  The Kentucky Transportation Cabinets use of Server Object Extensions (SOEs)

Kentucky Transportation CabinetGIS Branch http://transportation.ky.gov/maps

• The OpenReadCompleted event handler• Synchronous or Asynchronous

Using SOE’s in a .NET Application

Page 27: Kentucky Transportation Cabinet GIS Branch  The Kentucky Transportation Cabinets use of Server Object Extensions (SOEs)

Kentucky Transportation CabinetGIS Branch http://transportation.ky.gov/maps

• Deserializing SOE output• Creating a Class to hold the output• http://json2csharp.com/

• The DataContractJsonSerializer

Using SOE’s in a .NET Application

Page 28: Kentucky Transportation Cabinet GIS Branch  The Kentucky Transportation Cabinets use of Server Object Extensions (SOEs)

Kentucky Transportation CabinetGIS Branch http://transportation.ky.gov/maps

How is KYTC utilizing SOE’s?

Page 29: Kentucky Transportation Cabinet GIS Branch  The Kentucky Transportation Cabinets use of Server Object Extensions (SOEs)

Kentucky Transportation CabinetGIS Branch http://transportation.ky.gov/maps

• Silverlight Control• Searching for a route

KYTC

Page 30: Kentucky Transportation Cabinet GIS Branch  The Kentucky Transportation Cabinets use of Server Object Extensions (SOEs)

Kentucky Transportation CabinetGIS Branch http://transportation.ky.gov/maps

• Permitting (KEPT)• When a permit location is added, moved, or

deleted the corresponding point is acted upon in SDE

• Generate a list of all roads within a mile of a permit

KYTC

Page 31: Kentucky Transportation Cabinet GIS Branch  The Kentucky Transportation Cabinets use of Server Object Extensions (SOEs)

Kentucky Transportation CabinetGIS Branch http://transportation.ky.gov/maps

• Rail Crossing Inventory (RCI)• Return detailed route information based on a spatial

query• Return location information in terms of County,

Route, and Mile point.• Data synchronization• When a rail crossing is updated in the RCI database the

corresponding location is moved in SDE

• Project Manager’s Toolbox• A SOE is used to return the boundaries of a project

which is, in turn, used to zoom to the project extent.

KYTC

Page 32: Kentucky Transportation Cabinet GIS Branch  The Kentucky Transportation Cabinets use of Server Object Extensions (SOEs)

Kentucky Transportation CabinetGIS Branch http://transportation.ky.gov/maps

• Integration with application developers• Deploy a spatially enabled application that is a joint

effort between the GIS Branch and Application Development by the end of 2012. (DONE!)

• Deploy a spatially enabled application that is solely developed by Application Development with the GIS Branch only in an advisory role by the end of 2013.

• Replace existing web services with SOEs• ArcGIS server 10.1 no longer supports local

connections

KYTC GIS Branch Goals

Page 33: Kentucky Transportation Cabinet GIS Branch  The Kentucky Transportation Cabinets use of Server Object Extensions (SOEs)

Kentucky Transportation CabinetGIS Branch http://transportation.ky.gov/maps

Questions?

Page 34: Kentucky Transportation Cabinet GIS Branch  The Kentucky Transportation Cabinets use of Server Object Extensions (SOEs)

Kentucky Transportation CabinetGIS Branch http://transportation.ky.gov/maps

email: [email protected]

Server Object Extension link:http://maps.kytc.ky.gov/ArcGIS/rest/services/MeasuredRoute/MapServer/exts/KYTCGISREST

Contact us: