In this section, we evaluate the performance of the proposed source selector. We describe in detail the experimental setup and we analyze the results. Our experiment is based on real-world datasets and is inspired by a practical use-case scenario in the domain of food security.
Experimental setup
In the following we describe the experimental setup of our evaluation, i.e., the data used, the source endpoints, the configuration of the federations that are compared, the queries of the experiment, and some details on the experiment deployment and execution.
Datasets For the experimental evaluation, we use the following data sources:
We envisage that Austrian state governments publish crop data for their own area of responsibility; and a further (possibly different) entity publishes snow cover datasets for the same area. As the datasets described previously refer to the whole region of Austria, we partinioned them for the purposes of our experiment to datasets that refer to smaller areas. Regarding the administrative and crop datasets, we partition them into smaller datasets according to the polygons of the states of Austria. For the snow cover dataset, we create two different partitions; one partition using a canonical geographical grid (which reflects a scenario where the snow cover data provider ignores administrative areas) and one partition that follows the administrative regions (which reflects a scenario where snow cover data are also published by the state governments). The polygons of the grids for the former partition are obtained by dividing the minimum bounding box of Austria into 8 parts in a 4 × 2 grid, and the polygons of the states of Austria (used for the partitioning of all three datasets) are obtained from the GADM dataset.
The datasets and the code that we use for partitioning the data is publicly available. The partitioning of a given input dataset according to a set of boundaries is executed as follows: First, we populate each member of the partition with all features that their geometry intersects with the corresponding boundary. Second, we substitute each shape of every member of the partition with its intersection with the corresponding boundary. For all features where their geometry intersects with more than one partitioning boundary, we split the original shape into several parts so that each part fits entirely in a single member of the partition. Finally, we modify the URIs of all resources so that all resources that appear in the same output dataset share a common prefix, which is unique among the prefixes of all datasets of the experiment.
Table 2 and Table 3 illustrate the statistics for the datasets of the experiment; in the table, we group the datasets by type and display statistics about the sum of the group, as-well-as average and standard deviation for each dataset in the group (notice that the datasets are unequal in size due to the large standard deviation for each group). Apart from the statistics, boundary type for each dataset and the number of datasets per group. The number of the snowG datasets is 7 (and not 8, as expected) because the north-west part of the 4 × 2 grid does not contain any data due to the shape of Austria.
Table 2. Information about the datasets used in the evaluation.
For each group of datasets we illustrate the type of thematic data it contains, the boundary of each dataset, and the number of datasets in the group.
| datasets | data type | boundary | #datasets |
|---|
| gadm1-gadm9 | administrative divisions | state polygon | 9 |
| crops1-crops9 | crop types and field boundaries | state polygon | 9 |
| snowS1-snowS9 | snow cover areas | state polygon | 9 |
| snowG1-snowG7 | snow cover areas | 4 × 2 grid | 7 |
Table 3. Dataset statistics.
For each group of datasets we display statistics about the thematic, geospatial, and both thematic and geospatial (i.e., total) triples in each group. Statistics displayed: sum, average and standard deviation.
| gadm1-gadm9 | crops1-crops9 |
|---|
| total | geospatial | thematic | total | geospatial | thematic |
|---|
| sum | 57,087 | 2,231 | 54,856 | 14,056,959 | 2,008,137 | 12,048,822 |
| average | 6,343 | 248 | 6,095 | 1,561,884 | 223,126 | 1,338,758 |
| stdev | 4,888 | 185 | 4,703 | 1,254,534 | 179,219 | 1,075,315 |
| snowS1-snowS9 | snowG1-snowG7 |
|---|
| total | geospatial | thematic | total | geospatial | thematic |
|---|
| sum | 331,190 | 66,238 | 264,952 | 335,510 | 67,102 | 268,408 |
| average | 36,799 | 7,360 | 29,439 | 47,930 | 9,586 | 38,344 |
| stddev | 27,349 | 5,470 | 21,879 | 34,272 | 6,854 | 27,418 |
Each dataset is deployed in a separate GeoSPARQL endpoint. We use the Strabon geospatial RDF store15 for serving the data. Strabon encapsulates PostGIS for performing spatial operations, and uses a spatial index to optimize query processing time.
Federations For the experimental evaluation, we use two possible federation setups for the three available data layers (i.e., administrative, crops, and snow). The first federation setup comprises 27 source endpoints, namely gadm1-9, crops1-9, and snowS1-9; the second one comprises 25 source endpoints, namely gadm1-9, crops1-9, and snowG1-7. In the first setup, we have three datasets for each Austrian state, i.e., all three data layers are split according to the same set of geographical boundaries, while in the second one, the snow cover is divided in a canonical geographical grid, thus we have two data layers that are (by nature) aligned on an uneven geographical split and one that is not aligned.
For each federation setup, we set up four Semagrow federators, each with a different source selection configuration. We illustrate all the information about the federations used in the experiment in Table 4. For each federation, we display the source selection method, the number of federated endpoints, details and statistics about the Semagrow metadata used (namely, type of bounding polygon used, metadata size and the number of coordinates that appear in all WKT literals of the svd:boundingWKT property), and which datasets from Table 2 used in the federation.
Table 4. Information about the federations used in the evaluation.
For each federation we illustrate the type of the source selector (i.e. geospatial or not), number of datasets that appear in the federation, and statistics about the metadata used by the federator.
| thm-27 | geo-mbb-27 | geo-appr-27 | geo-poly-27 |
|---|
| Source selector | thematic | geospatial | geospatial | geospatial |
| #datasets | 27 | 27 | 27 | 27 |
| Bounding WKT | - | minimum bounding box | approximate shape | exact shape |
| #triples in metadata | 3024 | 3051 | 3051 | 3051 |
| #coordinates in metadata | - | 108 | 1998 | 68736 |
| file size of metadata | 125 KB | 132 KB | 189 KB | 1.8 MB |
| thm-25 | geo-mbb-25 | geo-appr-25 | geo-poly-25 |
|---|
| Source selector | thematic | geospatial | geospatial | geospatial |
| #datasets | 25 | 25 | 25 | 25 |
| Bounding WKT | - | minimum bounding box | approximate shape | exact shape |
| #triples in metadata | 2941 | 2959 | 2959 | 2959 |
| #coordinates in metadata | - | 100 | 1360 | 45852 |
| file size of metadata | 123 KB | 127 KB | 165 KB | 1.3 MB |
The federators of thm-27 and thm-25 use the standard thematic source selection of Semagrow, while the remaining federators use a geospatial source selection on top of it. The difference between the remaining federators is the accuracy of the bounding polygons that the sources are tagged with; in geo-poly each source is tagged with the exact polygon that refers to the corresponding areas (i.e., the geographical grid for snowG datasets and the borders of Austrian states for the remaining ones); in geo-appr with an approximation of the above polygons a quadtree of height 2; in geo-mbb with the minimum bounding box of all shapes that appear in the source. All metadata were created using the Sevod-Scraper tool (see the implementation subsection for more details). The bounding polygons for geo-mbb-25, geo-mbb-27, geo-appr-25, and geo-appr-27 were calculated by the tool using the minimum bounding box and quadtree-based approximation, while for geo-poly-25 and geo-poly-27 we used the exact polygons of the states of Austria and the 4 × 2 grid according to the actual borders of the partitioned datasets. Notice that an increased accuracy leads to an increased metadata size (i.e., even though that the geospatial source selectors use metadata that have the same set of triples, the WKT literals contain a larger set of coordinates).
Regarding the evaluation of a GeoSPARQL query, each Semagrow federation operates as follows: First, federated geospatial joins are evaluated using a bind-join fashion with a filter pushdown optimization. In particular, for each binding of the source query of the left part of the join, Semagrow issues a source query that contains the filter of the geospatial join to the source of the right part of the join. Second, to reduce redundant communication cost, Semagrow group several triple patterns into one source query whenever possible. For instance, triples that appear in a single source are grouped into a single subquery, thus pushing the join operation into the source endpoint.
Queries In Table 5, we summarize the queries of the experiment. The query workload is produced by seven query templates (Q1-7); each query template has a single parameter, which is either a WKT literal (Q1-3) or a Municipality name (Q4-7). We generate a set of 100 municipality names and a set of 100 WKT literals; this makes a total of 700 queries.
Table 5. Queries used in the experiment.
| Parameter | Query |
|---|
| Q1 | Polygon | Municipalities intersecting a given polygon |
| Q2 | Polygon | Snow-covered potato fields intersecting a given polygon |
| Q3 | Polygon | Potato fields within 5 km from snow cover and intersecting a given polygon |
| Q4 | Municipality name | Snow cover areas within 5 km from a given municipality |
| Q5 | Municipality name | Potato fields within a given municipality |
| Q6 | Municipality name | Snow-covered potato fields within a given municipality |
| Q7 | Municipality name | Potato fields within 5 km from snow cover and within a given municipality |
For the municipality names, we select 100 random municipalities from the GADM shapefile using the PostgreSQL random() function. We ignore the municipalities whose names contain characters not in the English alphabet in order to avoid possible string encoding conflicts. For the WKT literals, we create 100 random polygons; We first generate 100 random points within the border of Austria; then, we extend each point by a few meters in each direction, by using the PostGIS ST_Expand() function, in order to form rectangles covering approximately an area of 25 square kilometres each. We prune all polygons that are not completely within Austria and repeat the steps above until the random polygons reach 100.
For every query, we define its administrative part as the triple patterns that refer to administrative data (i.e., datasets gadm1-9), its crop part as the triple patterns that refer to crop data (i.e., datasets crops1-9), and its snow part as the triple patterns that refer to snow data (i.e., datasets snowS1-9 or snowG1-7). Q1 comprises only an administrative part, Q2 and Q3 comprise a snow and a crop part, Q4 (respectively Q5) comprises an administrative and a snow (respectively crop) part, Q6 and Q7 contain all three types of parts. Q1-Q3, Q6-7 use the geof:sfIntersects function; Q3, Q4, and Q7 use the geof:distance function; and finally, Q5-7 use the geof:sfWithin function.
For each query template, we also illustrate the number of triple patterns of the query (#tp), the number of geospatial selection filters, i.e., geospatial filters with one free variable (#geoselec), the number of geospatial join filters, i.e., geospatial filters with two free variables (#geojoins), and the relevant data layers for each query template. Notice that the queries that are parameterized with a WKT have geospatial selection filters for each data layer of the query, while the remaning queries do not have geospatial selection filters. Moreover, all queries that make use of two or three data layers (i.e., all queries apart from Q1) have geospatial join filters for combining data from the corresponding layers.
Finally, in Table 6 we illustrate statistics about the queries in the evaluation. In particular, we illustrate the average number of results (#r) of all queries that belong to each query template. Notice that the queries return a small number of results (e.g., in Q6, for several municipalities the query is expected to return no results). This fact does not necessarily mean that the setup is not challenging enough. Using large-scale queries (and datasets) would be needed to evaluate the efficiency of the federated query execution engine of the federator. But since the subject of this evaluation is the source selection engine, discussing query execution efficiency would be a digression. If anything, using larger datasets and queries would make the source selection time overheads look even smaller, relatively, so our evaluation setup is actually stricter on ourselves than an evaluation on larger datasets.
Table 6. Query statistics.
| # triple patterns | # geospatial selections | # geospatial joins | thematic data layers used | # results |
|---|
| Q1 | 6 | 1 | 0 | gadm | 3.7 |
| Q2 | 10 | 2 | 1 | crops, snow | 2.1 |
| Q3 | 10 | 2 | 1 | crops, snow | 15.6 |
| Q4 | 9 | 0 | 1 | gadm, snow | 12.5 |
| Q5 | 9 | 0 | 1 | gadm, crops | 9.7 |
| Q6 | 14 | 0 | 3 | gadm, crops, snow | 0.5 |
| Q7 | 14 | 0 | 3 | gadm, crops, snow | 6.7 |
Experiment deployment and execution We use a Kubernetes 1.14 cluster with 1 master node and 8 worker nodes with a total if 120 cores and 264GB RAM. Experiment deployment and execution is done through the KOBE benchmarking engine16, and the KOBE configurations for reproducing the experiments are publicly available.
Experimental results
In the following, we present the experimental results. We first focus on each phase of federated query processing separately, and then we discuss total query processing as a whole.
Evaluation metrics All queries are decomposed successfully and for every query a correct execution plan is produced. However, in some queries (e.g., in some query instances of Q4 and Q7) the query execution phase evokes an error, and in these situations the federator returns no answer.
The experimental results are summarized in Table 7, Table 8, Table 9, Table 10, Table 11, and Table 12. For each query template of Table 5 and for each federation of Table 4, we display the following evaluation metrics: to evaluate the efficiency of the query execution plan we display the average query execution time of all successful queries (Table 11) and the error rate (Table 10), i.e., the number of the unsuccessful queries over the number of all queries in the template; to check the efficiency of the other parts of query processing we display the average source selection time (Table 7) and planning time (Table 9); to check if the source selection time overheads are recovered by reduced planning and execution time, we display the time differences between each geospatial federation with its corresponding thematic one (Table 12); to evaluate the efficiency of the pruning of each source selection, we display the average number of sources that are accessed during the evaluation (Table 8); and finally, to check if any source selector achieves optimal pruning, we include the average size of the optimal source set (opt-27 and opt-25 columns of Table 8).
Table 7. Source Selection time (sec): Average (and standard deviation) of 100 instances per query template (Q1–Q7).
We display metrics for each federation (i.e., geo-poly-27, geo-poly-25, geo-appr-27,etc.) of the evaluation.
| geo-poly-27 | geo-appr-27 | geo-mbb-27 | thm-27 |
|---|
| Q1 | 0.10 | (0.02) | 0.14 | (0.02) | 0.13 | (0.02) | 0.08 | (0.01) |
| Q2 | 0.87 | (0.06) | 0.26 | (0.02) | 0.22 | (0.02) | 0.13 | (0.02) |
| Q3 | 8.28 | (0.23) | 0.74 | (0.09) | 0.22 | (0.03) | 0.14 | (0.02) |
| Q4 | 1.76 | (0.14) | 0.37 | (0.16) | 0.21 | (0.08) | 0.17 | (0.07) |
| Q5 | 0.42 | (0.08) | 0.21 | (0.02) | 0.20 | (0.03) | 0.26 | (0.13) |
| Q6 | 1.57 | (0.10) | 0.37 | (0.09) | 0.30 | (0.11) | 0.22 | (0.07) |
| Q7 | 8.53 | (0.24) | 1.11 | (0.34) | 0.42 | (0.20) | 0.39 | (0.26) |
| geo-poly-25 | geo-appr-25 | geo-mbb-25 | thm-25 |
|---|
| Q1 | 0.16 | (0.02) | 0.14 | (0.02) | 0.13 | (0.02) | 0.08 | (0.01) |
| Q2 | 0.46 | (0.03) | 0.14 | (0.02) | 0.20 | (0.02) | 0.13 | (0.02) |
| Q3 | 0.43 | (0.04) | 0.21 | (0.03) | 0.19 | (0.02) | 0.14 | (0.08) |
| Q4 | 0.36 | (0.09) | 0.19 | (0.04) | 0.19 | (0.07) | 0.16 | (0.06) |
| Q5 | 0.33 | (0.08) | 0.29 | (0.07) | 0.19 | (0.02) | 0.22 | (0.08) |
| Q6 | 0.76 | (0.07) | 0.29 | (0.11) | 0.28 | (0.09) | 0.18 | (0.04) |
| Q7 | 0.83 | (0.14) | 0.39 | (0.14) | 0.35 | (0.14) | 0.41 | (0.34) |
Table 8. Source Selection pruning: number of sources selected by the different source selection methods, average (min- imum and maximmum) over 100 query instances per query template (Q1–Q7).
We display metrics for each federation (i.e., geo-poly-27, geo-poly-25, geo-appr-27,etc.) of the evaluation, as well as the optimal ones (i.e., opt-27, opt-25).
| opt-27 | geo-poly-27 | geo-appr-27 | geo-mbb-27 | thm-27 |
|---|
| Q1 | 1.12 | (1–2) | 1.12 | (1–2) | 1.32 | (1–3) | 1.62 | (1–3) | 9 |
| Q2 | 2.24 | (2–4) | 2.24 | (2–4) | 2.64 | (2–6) | 3.24 | (2–6) | 18 |
| Q3 | 2.24 | (2–4) | 2.24 | (2–4) | 2.64 | (2–6) | 3.24 | (2–6) | 18 |
| Q4 | 2.25 | (2–4) | 5.48 | (3–7) | 5.48 | (3–7) | 5.90 | (3–7) | 10 |
| Q5 | 2.00 | (2–2) | 2.00 | (2–2) | 5.48 | (3–7) | 5.82 | (3–7) | 10 |
| Q6 | 3.00 | (3–3) | 3.00 | (3–3) | 9.96 | (5–13) | 10.64 | (5–13) | 19 |
| Q7 | 3.24 | (3–5) | 6.48 | (4–8) | 9.96 | (5–13) | 10.64 | (5–13) | 19 |
| opt-25 | geo-poly-25 | geo-appr-25 | geo-mbb-25 | thm-25 |
|---|
| Q1 | 1.12 | (1–2) | 1.12 | (1–2) | 1.32 | (1–3) | 1.62 | (1–3) | 9 |
| Q2 | 2.18 | (2–4) | 2.18 | (2–4) | 2.38 | (2–4) | 2.68 | (2–5) | 16 |
| Q3 | 2.18 | (2–4) | 2.18 | (2–4) | 2.38 | (2–4) | 2.68 | (2–5) | 16 |
| Q4 | 2.14 | (2–3) | 4.34 | (2–5) | 4.59 | (2–5) | 4.59 | (2–5) | 8 |
| Q5 | 2.00 | (2–2) | 2.00 | (2–2) | 5.48 | (3–7) | 5.82 | (3–7) | 10 |
| Q6 | 3.18 | (2–4) | 4.97 | (3–6) | 8.82 | (4–11) | 9.41 | (4–11) | 17 |
| Q7 | 3.18 | (3–5) | 4.97 | (3–6) | 8.82 | (4–11) | 9.41 | (4–11) | 17 |
Table 9. Query planning time (sec): Average (and standard deviation) of 100 instances per query template (Q1–Q7).
We display metrics for each federation (i.e., geo-poly-27, geo-poly-25, geo-appr-27,etc.) of the evaluation.
| geo-poly-27 | geo-appr-27 | geo-mbb-27 | thm-27 |
|---|
| Q1 | 0.02 | (0.01) | 0.03 | (0.01) | 0.03 | (0.01) | 0.04 | (0.01) |
| Q2 | 0.28 | (0.04) | 0.30 | (0.03) | 0.31 | (0.03) | 0.39 | (0.04) |
| Q3 | 0.26 | (0.04) | 0.24 | (0.04) | 0.26 | (0.03) | 0.38 | (0.04) |
| Q4 | 0.10 | (0.02) | 0.15 | (0.09) | 0.13 | (0.03) | 0.19 | (0.07) |
| Q5 | 0.12 | (0.03) | 0.11 | (0.02) | 0.12 | (0.01) | 0.15 | (0.02) |
| Q6 | 13.56 | (0.29) | 14.48 | (0.44) | 14.33 | (0.40) | 16.00 | (0.35) |
| Q7 | 13.69 | (0.31) | 14.55 | (1.37) | 14.81 | (2.61) | 16.55 | (3.95) |
| geo-poly-25 | geo-appr-25 | geo-mbb-25 | thm-25 |
|---|
| Q1 | 0.03 | (0.01) | 0.03 | (0.01) | 0.03 | (0.01) | 0.05 | (0.01) |
| Q2 | 0.27 | (0.05) | 0.21 | (0.02) | 0.31 | (0.02) | 0.39 | (0.04) |
| Q3 | 0.25 | (0.05) | 0.26 | (0.03) | 0.26 | (0.03) | 0.38 | (0.05) |
| Q4 | 0.13 | (0.07) | 0.14 | (0.10) | 0.14 | (0.07) | 0.19 | (0.13) |
| Q5 | 0.13 | (0.02) | 0.12 | (0.02) | 0.12 | (0.01) | 0.15 | (0.02) |
| Q6 | 14.30 | (0.49) | 14.70 | (0.48) | 14.27 | (0.46) | 15.56 | (0.29) |
| Q7 | 13.66 | (0.28) | 14.10 | (0.46) | 14.64 | (2.43) | 17.24 | (6.36) |
Table 10. Error rate: Number of errors occured, divided by the total number of queries of each query template (Q1–Q7).
We display metrics for each federation (i.e., geo-poly-27, geo-poly-25, geo-appr-27,etc.) of the evaluation.
| geo-poly-27 | geo-appr-27 | geo-mbb-27 | thm-27 | geo-poly-25 | geo-appr-25 | geo-mbb-25 | thm-25 |
|---|
| Q1 | - | - | - | - | - | - | - | - |
| Q2 | - | - | - | - | - | - | - | - |
| Q3 | - | - | - | 0.1 | - | - | - | - |
| Q4 | 0.1 | 0.1 | 0.1 | 0.1 | 0.1 | 0.1 | 0.1 | 0.1 |
| Q5 | - | - | - | - | - | - | - | - |
| Q6 | - | 0.7 | 0.7 | 0.8 | - | 0.7 | 0.7 | 0.1 |
| Q7 | 0.1 | 0.9 | 0.9 | 0.9 | 0.1 | 0.9 | 0.9 | 0.9 |
Table 11. Query execution time (sec): Average (and standard deviation) of 100 instances per query template (Q1–Q7).
We display metrics for each federation (i.e., geo-poly-27, geo-poly-25, geo-appr-27,etc.) of the evaluation.
| geo-poly-27 | geo-appr-27 | geo-mbb-27 | thm-27 |
|---|
| Q1 | 0.06 | (0.05) | 0.04 | (0.03) | 0.04 | (0.04) | 0.06 | (0.06) |
| Q2 | 0.05 | (0.05) | 0.04 | (0.02) | 0.04 | (0.02) | 0.17 | (1.30) |
| Q3 | 0.21 | (1.20) | 0.17 | (1.12) | 0.17 | (1.15) | 0.06 | (0.25) |
| Q4 | 6.87 | (4.18) | 6.47 | (3.49) | 6.81 | (3.55) | 8.52 | (4.96) |
| Q5 | 0.13 | (0.08) | 0.08 | (0.03) | 0.09 | (0.06) | 0.12 | (0.09) |
| Q6 | 0.11 | (0.05) | 2.20 | (2.21) | 2.18 | (2.39) | 2.30 | (1.47) |
| Q7 | 23.19 | (67.86) | 4.14 | (1.63) | 4.43 | (1.06) | 6.64 | (2.30) |
| geo-poly-25 | geo-appr-25 | geo-mbb-25 | thm-25 |
|---|
| Q1 | 0.05 | (0.05) | 0.04 | (0.01) | 0.04 | (0.01) | 0.05 | (0.02) |
| Q2 | 0.05 | (0.05) | 0.04 | (0.03) | 0.04 | (0.02) | 0.30 | (1.32) |
| Q3 | 0.19 | (1.15) | 0.17 | (1.09) | 0.17 | (1.13) | 2.52 | (10.28) |
| Q4 | 7.35 | (4.73) | 7.33 | (4.70) | 7.43 | (4.77) | 8.81 | (5.27) |
| Q5 | 0.26 | (0.41) | 0.11 | (0.05) | 0.08 | (0.03) | 0.10 | (0.04) |
| Q6 | 0.77 | (0.83) | 1.37 | (1.10) | 1.52 | (1.50) | 1.46 | (1.04) |
| Q7 | 19.44 | (57.78) | 3.10 | (2.33) | 3.07 | (2.37) | 38.69 | (70.86) |
Table 12. Time overhead of the geospatial source selection: Average (and standard deviation) of the difference in total query processing time (in seconds) of each geospatial federation minus the time of its corresponding thematic one, over the successful query instances of query template Q1 to Q5.
A negative measurement indicates that the geospatial source selection overheads are recovered by faster query planning and execution. Q6 and Q7 are missing from the table since most queries in geo-appr, geo-mbb, and thm evoke errors during query execution phase.
| geo-poly-27 | geo-poly-27 | geo-mbb-27 |
|---|
| Q1 | –0.01 | (0.0000) | +0.03 | (0.0000) | +0.03 | (0.0001) |
| Q2 | +0.51 | (0.0013) | –0.10 | (0.0013) | –0.12 | (0.0013) |
| Q3 | +8.03 | (0.0004) | +0.45 | (0.0003) | –0.05 | (0.0002) |
| Q4 | +0.23 | (0.0017) | –1.28 | (0.0018) | –1.20 | (0.0017) |
| Q5 | +0.14 | (0.0002) | –0.13 | (0.0002) | –0.12 | (0.0002) |
| geo-poly-25 | geo-appr-25 | geo-mbb-25 |
|---|
| Q1 | +0.05 | (0.0000) | +0.03 | (0.0000) | +0.01 | (0.0000) |
| Q2 | –0.05 | (0.0013) | –0.43 | (0.0013) | –0.27 | (0.0013) |
| Q3 | –1.16 | (0.0027) | –1.39 | (0.0027) | –1.39 | (0.0027) |
| Q4 | –0.71 | (0.0028) | –1.01 | (0.0028) | –0.85 | (0.0029) |
| Q5 | +0.03 | (0.0001) | +0.04 | (0.0001) | –0.09 | (0.0001) |
Regarding the time measurements shown in Table 7, Table 9, Table 11, and Table 12, apart from the average value, we include its standard derivation (displayed in parentheses). Moreover, regarding the average number of sources in Table 8, we include in parentheses the minimum and maximum number of sources.
Comparison of source selection times In the following, we focus on the time overheads of the geospatial source selector. Thus, we will compare the federations of the experiment according to source selection time (Table 7).
We observe that the source selectors of thm-27 and thm-25 (in short thm) are the fastest ones; then we have geo-mbb-27 and geo-mbb-25 (in short geo-mbb); then we have geo-appr-27 and geo-appr-25 (in short geo-appr); and finally we have geo-poly-27 and geo-poly-25 (in short geo-poly). This happens due to two main reasons. First, the geospatial source selector (i.e., that of geo-mbb, geo-appr and geo-poly) wraps the thematic source selector of Semagrow (i.e., that of thm), which explains why thm is the fastest of all. Second, the sources in geo-poly are annotated with polygons, which are more complex shapes than the approximated shapes in geo-appr, which are, in turn, more complex shapes than the bounding boxes in geo-mbb. Thus, the boundary comparisons performed by the geospatial source selection are slower in geo-poly. This difference is more pronounced in Q3 and Q7, which include three geospatial filters and a within-distance operation (using the geof:distance function), which is computationally costlier than containment and intersection operations.
We observe that, in general, the source selection process is faster in the federations with 25 endpoints (e.g., compare the source selection time for the queries for geo-poly-25 with geo-poly-27). This happens not only because in the 27-dataset setup we have two additional endpoints, but mainly because the snow data in the 25-dataset setup is partitioned using a canonical grid. Therefore, the boundary annotations of the snow datasets are rectangles not only in geo-mbb-25 (as expected), but in geo-poly-25 and geo-appr-25 as well. As a result, the geospatial computations performed by the source selector for identifying irrelevant snow sources is much faster in the 25-dataset setup.
To sum up, we notice that source selection time depends on the complexity of the bounding polygon annotations of the sources; in other words, higher accuracy leads to slower source selection.
Comparison of source selection pruning In the following, we focus on the precision of the pruning of each source selector (Table 8). In particular, we compare the number of sources of each source selector with those of the other source selectors and with the optimal ones.
We observe that the thematic source selector keeps many irrelevant sources in the query plan. The source selector of thm exploits the thematic information (i.e., properties and URI-prefixes) of the sources and assigns the administrative (respectively crop, snow) part of the query to the administrative (resp. crop, snow) sources. Moreover, in Q4-7, the administrative part of the query is further restricted to a single administrative source, because the pattern that specifies the name of the municipality appears in only a single administrative source. This explains why, for example, thm-27 keeps 19 (i.e., 9 crop sources, 9 snow sources, and 1 administrative source) and not all 27 sources for all queries in the template. However, as expected, we will show that the geospatial selectors of the remaining federations achieve better pruning by exploiting the geospatial knowledge of the sources.
Regarding the geospatial selectors, we make three observations: First, we notice that the accuracy of the source selector increases as the accuracy of the source metadata increases. In particular, geo-poly is more precise than geo-appr, and geo-appr is more precise than geo-mbb. Second, we notice that the optimal pruning can be achieved only by geo-poly in Q1-3, Q5 (and also in Q4 only for the 27-dataset setup). Finally, the average number of sources for geo-appr and geo-mbb tend to be lower in Q1-3 than in Q4-7. In the remaining paragraphs we will try to discuss these observations. Q1-3 have geospatial selection filters, parameterized with a fixed polygon; thus, the geospatial selector operates by pruning all sources that are irrelevant according to the given query polygon. Since the less accurate geospatial summaries in geo-appr and geo-mbb are larger than the actual dataset boundaries of the sources, we can have a situation where the query polygon is disjoint from a data source but not disjoint from its bounding polygon annotation. This explains the optimal pruning for geo-poly (where the annotations are the exact boundaries of the sources). In the remaining geospatial federations, the source selection returns more sources, because there are cases where the parameterized polygon is contained in the approximated shape (for geo-appr) or in the minimum bounding box (for geo-mbb) of a neighbor source. This explains why geo-appr is equally or more specific than geo-mbb.
Q4-7 contain only geospatial join filters; therefore, the geospatial selector operates as follows; first, similarly to thm, it restricts the administrative part of the query in the source of the state where the municipality belongs to; then, it tries to prune all irrelevant crop and snow sources according to the boundary annotation of this administrative source and the geospatial filters of the query. As previously, we observe that accurate source descriptions can lead to more precise source selection. For instance, regarding Q5, geo-mbb (resp. geo-appr) prunes all crop sources that their bounding box (resp. approximated shape) is disjoint from the bounding box (resp. approximated shape) of the state of interest, while geo-poly, being more accurate, does better by keeping only the crop sources that refer this state, because the source boundaries do not overlap. This explains the optimal pruning of geo-poly for Q5.
Q4-7 present two additional challenges in source selection, which are either non-present or non-important in Q1-3. First, Q4 and Q8 contain a within-distance federated join operation, but unlike Q3, the shapes of interest do not intersect with a given polygon in the query. In such operations, the geospatial selector cannot achieve optimal pruning even in geo-poly. To give an example, consider Q4 and assume that the given municipality appears towards the center of the state. Since the exact geometric shape of the municipality will be discovered only during query execution, the source selector cannot exclude the possibility of its position being towards the border, thus keeping all the neighboring snow sources that may contain relevant data within 5km from the border of the state. Second, an overestimation of the set of sources can appear when the geographical partitions between the data to be geospatially joined are unaligned. Consider Q6; since in the 27-dataset setup all data layer partitions are geographically aligned (each source refers to a specific Austrian state), geo-poly-27 achieves optimal pruning (i.e., the source selector keeps the sources that refer to the state where the municipality belongs to). In contrast, since in the 25-dataset setup the snow data partition is not aligned with the other layers, geo-poly-25 keeps some irrelevant neighboring snow sources (i.e., those who intersect the state that belongs to the municipality but not the municipality itself) and thus does not achieve optimal pruning.
To sum up, we notice that the precision of the pruning by the geospatial source selector depends on the accuracy of the bounding polygon annotations of the sources. We observe that using the exact polygons of the sources could lead us to optimal pruning. Finally, we notice that in queries with WKT parameters (Q1-3) the geospatial source selectors tend to achieve a better pruning, even when using approximated shapes instead of exact polygons.
Comparison of query planning and execution In the following, we discuss the effect of geospatial source selection on query planning and query execution phases of federated query processing. In particular, we compare the query planning times (Table 9), the query execution times (Table 11), and the error rates (Table 10) of each federation of the experiment.
Regarding query planning time, we observe that, in general, geo-poly is the fastest; then it comes geo-appr; then we have geo-mbb; and finally thm is the slowest. This behaviour happens because having a large number of sources requires the construction of a larger query plan, which clearly affects the time for producing it; this is highlighted in Q6 and Q7 which have 14 triple patterns (the number of triple patterns of each query is shown in Table 6).
Regarding query execution, notice that only for some query templates we obtain a complete evaluation of all queries in the template. For instance, ∼90% of the queries of Q7 fail to be processed by thm-27 due to errors in the execution phase (i.e., the error rate in Table 10 is equal to 0.9). These errors occur when a federator issues a huge workload of source queries to the endpoints, and as a result, the sources are not able to serve all these requests. Therefore, in order to compare two query executions, we should consider both their query execution times and their error rates. For instance, consider again Q7; the query execution of thm-27 is faster than that of geo-poly-27, but the error rate of geo-poly-27 is much lower than that of thm-27. Thus, we argue that geo-poly-27 is more effective than thm-27 for Q7, because we believe that having more but slower successful query runs is a more important characteristic (recall that the average execution time refers only to successful query runs).
The number of source queries in the execution plan affects not only the completion of the execution but the execution time as well; having more sources in the plan means that more source queries are issued by the federator to the source endpoints. Consider, for instance, Q2 and Q3; in both cases, the query execution of geo-poly-25 is faster than that of thm-25 by one order of magnitude; geo-poly-25 consults one (or in some cases two) snow datasets, while thm-25 consults all 7 snow datasets. Even though Semagrow manages to execute many queries in parallel, the duration of the query execution has to be as slow as the slowest source. By having a smaller the set of sources, the query executor avoids issuing queries to irrelevant larger datasets if they contain irrelevant results. Moreover, the time difference in query execution is more pronounced in queries that contain within-distance operations (e.g., in Q3), because the source endpoints use spatial indexes, hence geospatial queries that contain standard spatial relations (e.g., Q2) are executed faster.
The above discussion suggests that, according to the effectiveness of their query execution (which is based both on error rate and query execution time), the federators are to be ordered as follows: geo-poly, geo-appr, geo-mbb, and finally thm; the only exception being Q6 in the 25-dataset setup. In this sole case, geo-poly-25 is better than thm-25, but thm-25 has lower error rate than geo-appr-25 and geo-mbb-25. This final observation indicates that, even though our geospatial source selector can provide a faster query processing, it seems that in order to achieve better performance in geospatial scenarios, the remaining components of federated query processing should be extended with geospatial-specific optimizations as well.
To sum up, we observe that higher accuracy in geospatial source annotations (which results to a lower number of sources per query) could help by reducing the query planning time and the number of source queries issued by the federator, thus increasing the effectiveness of query execution.
Comparison of overall query processing time The discussion so far indicates that using a geospatial selector provides a positive impact on query planning and execution time. However, as the accuracy of the bounding polygons of the federated sources increases, source selection becomes slower, especially when using the exact polygons (as in geo-poly). The question that arises is whether the time overhead of the use of exact boundaries in source selection can be recovered by the remaining phases of query processing.
In Table 12, we draw a comparison between the time overheads of the geospatial source selectors; among the query instances that succeed in all eight federations, we show the difference of the total query processing time of geo-poly-27 (resp. geo-appr-27, geo-mbb-27) minus the total query processing time of thm-27; then, the same for the 25-dataset setup; and finally, we report the average (and standard deviation) for each query template. We leave out Q6 and Q7 because in both query templates less than 5 instances succeed in all 6 federations; in this case, we will compare the federations with respect to the error rate (Table 10).
Q1 is the easiest query of the experiment (it contains a single data layer and one geospatial selection filter, i.e., a filter that contains a spatial relation in which one of the two parameters is a WKT value). Thus, all federators perform equally in Q1 (i.e., all time differences are less than 0.05 seconds). In contrast, Q6 and Q7 are the most difficult queries of the experiment (they contain 3 data layers, three geospatial joins, and no WKT literals appear in the query body). Since most query instances of Q6 and Q7 fail to be processed, we compare the federations w.r.t. Table 10; we note that geo-poly performs the best since it minimizes the error rate.
The remaining queries (i.e., Q2-5) are somewhere in between Q1 and Q6-7 in terms of difficulty; this fact makes them easier to be processed by all federators of the experiment. In Table 12 we notice that geo-mbb and geo-appr outperform thm and geo-poly (overheads are smaller or similar). Regarding the comparison between geo-mbb and geo-appr though, we observe that geo-mbb is better in the 27-dataset setup, while geo-appr is better in the 25-dataset setup. This happens because the source selection cost in the 27-dataset setup is much higher than that of the 25-dataset setup (Table 7). Thus, in the former setup, only geo-mbb-27 can benefit from the reduction in query planning and execution times, while in the second one, the drop in planning and execution time of geo-appr-25 is greater than its source selection overhead.
To sum up, we observe that for difficult queries (such as queries that contain more than one geospatial join and no WKT literals in the query body), precise bounding polygons should be preferred, because otherwise we may face a computationally intensive query execution. In contrast, the use of less accurate descriptions will suffice if we consider simpler queries. However, it appears that no size fits all; for the setup that the partitions are unaligned, we benefit from the higher accuracy of the approximated shapes since one layer is already a geographical grid; while for the other setup the minimum bounding boxes are effective since all data layers are fully aligned according to the same administrative regions.