# A Resilient Large-Scale Trajectory Index for Cloud-Based Moving Object Applications
## 6 Conclusions  
Our goal was to develop a resilient index that can satisfy a wide range of application demands and queries on the cloud, while overcoming the challenges raised by the configuration of cloud resources, the adopted distributed system, the nature of the trajectories, and the diversity in the queries. Cloud systems offer vast options for computing, storing, and communicating resources. A resilient index should adjust its structure to maximize the benefits of the available resources without the need for any fine-tuning by the end user. A resilient index also needs to reduce the impact of the distributed system's drawbacks and find a middle ground in contradictory situations in order to maximize overall performance. In this work, we proposed RMOI as a resilient spatio-temporal index for historical moving object trajectories on top of Spark. RMOI uses two novel machine learning models to predict the locality pivot \(LP\), which is used to balance the spatial and object localities. The adaptation capability comes as a result of controlling both localities. The prediction of \(LP\) depends on three adaptation factors: resources availability, nature of the trajectories, and query types, to maximize the overall performance. Figure 11: Stress testing for the RioBuses dataset with low resource availability on (**a**) 1 st query set with 3 QTs, (**b**) 2 nd query set with 3 QTs, (**c**) 3 rd query set with 7 QTs, (**d**) 4 th query set with 7 QTs, (**e**) 5 th query set with 10 QTs, and (**f**) 6 th query set with 10 QTs. Figure 12: Stress testing on the UK + IE dataset with high resource availability on (**a**) 1 st query set with 2 QTs, (**b**) 2 nd query set with 2 QTs, (**c**) 3 rd query set with 5 QTs, and (**d**) 4 th query set with 5 QTs. Figure 13: Stress testing on the UK + IE dataset with low resource availability on (**a**) 1 st query set with 2 QTs, (**b**) 2 nd query set with 2 QTs, (**c**) 3 rd query set with 5 QTs, and (**d**) 4 th query set with 5 QTs. The CPModel, which is used for a general prediction of \(LP\), does not require any prior information about the upcoming queries. It is carefully designed not to be biased toward any query types, allowing the predicted \(LP\) to be convenient for any query. We also presented the DPModel, which is capable of measuring queries by using the IFModel and predicts \(LP\) based on the most dominant queries. IFModel is a prediction model that is responsible for determining the query impact factor (iFactor) via an appropriate query ranking. In order to reduce the overall computational requirement, the features are derived as proportional variables. The models depend on three features: ComR, MemR, and TOver. ComR and MemR are computed to satisfy the first adaptation factor, while TOver is for the second factor. The third adaptation factor is considered in IFModel. The models are designed to be as compact as possible in order to keep the RMOI's construction time on a competitive level. All the models use a polynomial regression on small degrees (degree = 2 for CPModel and degree = 3 for DPModel and IFModel). The complexity of the polynomial regression relies on the higher-degree features and the coefficients, where they scale polynomially on the number of the features and exponentially on the degree. Our work in reducing the number of features and the choice to use small degree polynomials results in models that have almost no overhead. One of the main obstacles to fit these models is the absence of available training data. To generate such training sets would require the outputs of all the possible \(L\)Ps on the most critical values of the features. As a result, we conducted thorough experiments on two real datasets, which produced 66K result factors. They covered all the intended query types on different environment settings. This allowed us to extract three nontrivial training sets for each model. Finally, we conducted extensive experiments to validate our method and to test the RMOI models.