LISTSERV mailing list manager LISTSERV 16.0

Help for NEARC-L Archives


NEARC-L Archives

NEARC-L Archives


NEARC-L@LISTSERV.UCONN.EDU


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

NEARC-L Home

NEARC-L Home

NEARC-L  August 2016

NEARC-L August 2016

Subject:

SUMMARY: Multiple requests for Query operation

From:

Michael Mannion <[log in to unmask]>

Reply-To:

Michael Mannion <[log in to unmask]>

Date:

Tue, 30 Aug 2016 21:13:28 +0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (109 lines)

NEARC-L,

Thank you to Tom Schwartzman for asking his colleagues about this topic on my behalf, and for summarizing their answers for me. The answers to my two original questions are:

1.      Is it correct that the ArcGIS API for JavaScript allows the developer to make a single, spatially-filtered request for a feature set, and generates from that multiple REST API requests covering the area-of-interest?

Yes.

One respondent indicated that this only occurs when requesting data "through the map view", but that if you "make a direct single querytask query" that the JavaScript API should yield one request to ArcGIS for Server. (Note that I quoted specific phrases above because I don't know enough about the JavaScript API to provide supporting context; I suspect that developers in the audience will know what the "map view" and "querytask" are.)



2.      If so, why? (Stated another way, why not just make one REST API request, like with PNG files?)

There are two primary reasons:

*       Requesting a smaller subset of features per operation avoids exceeding the maximum number of records that the service will return per-query (maxRecordCount). If you are viewing a large area, you can end up asking for a lot of features. So, the JavaScript API automatically queries smaller regions, and asks for multiple such regions to cover large map extents.

*       Asking for multiple, smaller requests improves performance because:

o       The "tile" extents are fixed, and the query results are cacheable. So, if you pan/zoom/refresh an area that you've recently viewed - in whole or in part - the requests for the same "tile" will be the same, and you can potentially read the results from cache, rather than going back to the server. (I interpret "cache" here to mean the browser cache, but it probably applies to web accelerator/caching devices, too.)

o       Each response is smaller (though we didn't get into the details as to why multiple small requests are faster than a single large one).

I have several follow-up questions (e.g. how are the "query tile" boundaries determined; how are records that cross into multiple tiles handled, etc.) so if anyone has additional information and would like to continue the discussion, please call or write. But, this covers my immediate issue at-hand, so I'm going to turn my attention back to the server-side issue that initially brought this client-side behavior to light.

Thanks again to Tom and his colleagues!

-Michael

P.S. I'm responding from Outlook 2016 using "Rich Text" instead of "HTML" this time to see if the formatting is preserved once the listserv distributes the message. May apologize if it comes out as plain text again. -M


Michael Mannion
Database Consultant | Mannion Geosystems | +1 617.939.9958 | http://www.manniongeo.com<http://www.manniongeo.com/>


From: Michael Mannion
Sent: Wednesday, August 24, 2016 4:07 PM
To: Northeast Arc Users Group ([log in to unmask]) <[log in to unmask]>
Subject: Multiple requests for Query operation

NEARC-L,

I'm working in an environment that includes a custom web app that uses a variety of ArcGIS for Server map services, and I'd like your help in explaining some behavior that I don't understand.

I'll preface the information below by stating that I'm not a web developer, and this app isn't my area of responsibility. But, the app's behavior manifests some back-end issues that are in my AOR, so I'm trying to understand the larger environment in hopes of diagnosing the server-side problems. The takeaway is: If anything I say below seems incorrect, you're probably right and I'm probably wrong, so please correct me or ask a follow-up question.

The salient contextual points are:

*       From what I understand, the app interacts with ArcGIS for Server using the ArcGIS API for JavaScript. I don't know what version of the API it's using, but the app was built within the past two years, if that's any indication.

*       The map services are provided by a cluster of ArcGIS for Server 10.3.1 instances.

*       From watching the network traffic using Chrome Developer Tools (CDT), the app appears to ask for data in one of two ways:

o       As a map image resource in PNG format, via the Export Map operation, or;

o       As a feature set in JSON format, via the Query operation

Per this last point, I don't know what this implies is happening at the JavaScript API level, but those are the underlying REST API requests that I see in CDT.


The interesting part is:

*       For any one pan/zoom action on the end user's part:

o       There is a single Export Map request for a PNG that covers the whole map extent, but;

o       There are multiple Query requests for the feature sets, each of which covers only a portion of the map extent

The following screenshot illustrates this behavior:



The number of Query requests varies. In the screenshot above, there are 12. I usually see 9, but sometimes 4, 6, or 8. This happens at all scales (that I've noticed, in my unscientific poking-and-prodding).

If I extract the extent of each one of those Query requests from their respective URLs and draw them as graphics in ArcMap, I see a pattern that looks like the screenshot below. Note that the screenshot below (9 requests) doesn't go with the screenshot above (12 requests), but it illustrates the general behavior:



In this map, each of the 9 boxes represents the extent of one Query operation. The requests are sent in order like you're reading a book (left-to-right, top-to-bottom). My actual map extent fell within, and was slightly smaller than, the area covered by these requests.


The lead app developer confirmed that they aren't explicitly querying data in this "tiled" pattern; rather, that the multi-request / tiled behavior is built in to the JavaScript API.

My questions are:

1.      Is it correct that the ArcGIS API for JavaScript allows the developer to make a single, spatially-filtered request for a feature set, and generates from that multiple REST API requests covering the area-of-interest?

2.      If so, why? (Stated another way, why not just make one REST API request, like with PNG files?)

Beyond simple curiosity, there is a practical consequence of this behavior - some of the Query requests either 1) take a long time, or 2) fail. (That's the server-side issue I'm investigating.)

The impact on the end user is that the first row of "tiles" may display data immediately, while the second row could take 30 seconds, and the third row might fail to return data at all. There are no "still working" or "error" type messages in the UI (an app issue, or an API issue?), so the user may think that data only exists in the northernmost part of the map extent and draw the wrong conclusion.

If you have any insight into this behavior that you're willing to share, I'd be much obliged. Thank you, in advance.

-Michael


Michael Mannion
Database Consultant | Mannion Geosystems | +1 617.939.9958 | http://www.manniongeo.com<http://www.manniongeo.com/>



------------------------------------------------------------------------- This list (NEARC-L) is an unmoderated discussion list for all NEARC Users.

If you no longer wish to receive e-mail from this list, you can remove yourself by going to http://s.uconn.edu/nearcsubscribe.

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

May 2024
April 2024
March 2024
February 2024
January 2024
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014

ATOM RSS1 RSS2



LISTSERV.UCONN.EDU

CataList Email List Search Powered by the LISTSERV Email List Manager