Why use a GIS web service?
Let’s start at the foundation of ArcGIS Enterprise. In IT speak, ArcGIS Enterprise is designed to fit into an enterprise’s Service-oriented Architecture (SOA). A SOA is an IT approach that lets computers talk to one another across a network in a flexible way that allows the distribution of work and processing that it is open and is not tied to specific operation systems or applications.
You might be thinking:
“Wow Travis, that was a lot. Why should GIS be part of a SOA? I use a desktop GIS approach and that works well for my needs.”
You are correct, the desktop GIS architecture is powerful and the basis of many workflows in ArcGIS. But there are limitations with a desktop only architecture. Making a desktop map interactive so that when the data changes, the map shows those changes requires everyone to use the same desktop application and have direct access to the same data. Using this desktop architecture exclusively can be a technical, financial, and accessibility challenge for organizations. And that was just one example. GIS web services help to resolve these challenges.
A service? What’s that?
“Ok great Travis, but what’s a GIS web service?”
Good question… I think it is easiest to define the term “GIS web service” by discussing it in parts. First, “what’s a service?” The official Esri GIS dictionary at https://support.esri.com/en-us/gis-dictionary/search?q=service says,” A persistent software process that provides a means to access resources for client applications.” Which is completely correct, but I’ve heard Travis say, “it is an object that can respond to a request from a client”, and I say that sums it up nicely. For example, when you want to know how much money you have in your bank account, you go to the bank’s web site and click on the link to your account. That’s the client (the web app running in your web browser) making a request to a service provider (the bank’s web server) to ask how much money is in this account. Then the bank’s web server responds with some amount. But here’s the thing, there are many types of services in the IT world.
Web services… they are not just for the internet
One thing I want to address at first is the misconception that the “web” in web service means the service is always available on the world wide web or the internet. That’s an easy assumption to make, but it’s wrong. It’s a service (see above) available on a network that uses a specific standard web communication protocol. I like to think services are like conversations between two people. I could write Travis an email and ask him if he wants to go get lunch. Or you could text your boss and notify them you will be late for work.
The protocol of a service is like the modality of communication i.e. face-to-face conversation, email, text, or phone calls. In IT there are standard protocols like SMTP, SMS, FTP or, what we care about the most here, HTTP/HTTPS (I’ll just refer to this as HTTPS because it’s best practice to use it.) HTTPS uses a URL (uniform resource locator), or web address, to send a request and to send the response. But that is not the end of the story. A quick internet search just told me there are over 7,000 languages in use worldwide, and if you are not communicating in a shared language with the other person, that conversation is going to be very one-sided.
Everything is REST these days
Here at Esri, we mainly leverage a REpresentional State Transfer Application Programming Interface (REST API) because of the many advantages it provides to optimize the communication between a client and a service. It leverages well-defined generic HTTPS programing methods like GET or POST and is flexible and stateless (Travis will discuss this in a later blog). REST is so widely used in IT that you can think of it as using English to communicate.
But like we have said, there are over 7,000 other languages spoken today and not everyone speaks the same one. Luckily, ArcGIS is fluent in over 6 million forms of communication. No wait! That’s C3PO. But ArcGIS does speak more than just REST. It can talk the Open Geospatial Consortium or OGC services “language” too. Maybe think of that like Mandarin, the second most widely used language today. Some services in ArcGIS can also communicate in old “languages” too like SOAP… think ancient Egyptian hieroglyphics, to support legacy applications.
Putting the “GIS” in GIS web service
Now you might be wondering:
“Travis, don’t all web services from ArcGIS Enterprise do GIS things?”
Nope. As we said earlier, ArcGIS Enterprise is designed to fit into an enterprise grade SOA. That means that we basically use web services leveraging REST APIs for most of the interaction with ArcGIS Enterprise, and not all these services can do GIS functions. Some of the services are for user management in the portal, or for queries to a data store, or the like. But we will talk about those capabilities in other articles.
So, let’s talk about the web services that do provide GIS capabilities then, the GIS web services available from ArcGIS Server. These web services are tied to some GIS data in a data store and allow the users of client applications to visualize, edit and analyze that centrally managed data via 2D maps, 3D scenes, and even from non-GIS clients like workorder management systems as an example. Based on the type of service, the client can ask ArcGIS Server to do things like:
- Draw all the outlines of all the buildings that are in the area I’m looking at in this map.
- Take this well and generate a list of any hazards within some distance from it.
- Use this address and standardize it against my known roads before showing me where it is on a map.
- Put a new tree at this location and give it these attributes.
And when the data changes in the data store the service is tied to, no one needs to do anything. The service just uses the data in its new state the next time it’s asked to do something.
As a desktop GIS professional, you may think this is basic GIS, and it is. But the great thing is that all the processing of the centrally managed GIS data is done by services that can be accessed by any application that can talk HTTPS from anywhere in the world… not just your computer.
So, what’s a “GIS web service”? It’s:
- A resource that responds to clients’ requests
- Leveraging open and standard web communication protocols
- To provide GIS capabilities and data to everyone who can talk to them.
Bam!