why? geo server is a next level template for vangav backend where database and geo services utility are used

- transforms geo coordinates (latitude and longitude) into reverse geo code and geo hash
- it also offers getting top queried continents and countries
- this service is based on vangav backend's geo server template
- this service has the 90+% of the vangav backend's generated code + the 10-% of the logic code needed to complete the service
- for first timers - follow the steps in the system requirements tutorial
- for first timers - follow the steps in the workspace initialization tutorial
- download this
vos_geo_server.zip project (from the green clone or download button up there) inside the workspace directory created previously (my_services) and unzip it
- rename unzipped
vos_geo_server-master to vos_geo_server
- in the terminal
cd to vos_geo_server/cassandra/cql/
- execute
./_start_cassandra.sh to start cassandra
cd to vos_geo_server/cassandra/cql/drop_and_create/
- execute the command
./_execute_cql.sh gs_top_dev.cql to initialize the service's database tables
cd to vos_geo_server
- start the service:
./_run.sh
- from your prefered client (we recommned postman) start trying the service; refer to the features and service references sections for reference
- at the end to stop the service: press
control + d in the terminal session where the service was started in (10)
- to stop cassandra: execute
ps auwx | grep cassandra to get cassandra's (pid) then kill -9 (pid) to stop cassandra
- follow the following steps to import the downloaded backend service in eclipse
cd to the service's directory and execute the ./_eclipsify.sh script
- file > import > general > existing projects into workspace > next > set "select root directory" to my_services > under projects make sure that vos_calculate_sum is selected > finish
- double check the java version used for compiling the project: right click the project > properties > java compiler > enable project specific settings > compiler compliance level > 1.7 or 1.8
- generate a service with multi-entry-point api
- generate a database
- use the geo services utility
| controller(s) |
feature |
| reverse geo code |
transforms request's latitude and longitude into reverse geo code (continent, country, city, ...) and geo hash |
| top continents and top countries |
returns the top queried continents and countries |
| reference |
explanation |
| routes |
api routes |
| reverse_geo_coding |
reverse geo coding data |
| controllers.json |
api request/response's elements |
| gs_top.keyspace |
gs_top is the keysapce for all the tables keeping track of the most queried continents and countries |
| Global.java |
reverse geo coding initialization |
| common |
handles common operations like initializing the continents/countries names index |
| controllers |
api implementation |
| gs_top |
gs_top cassandra's keyspace client |
- this section lists the 10-% code added after vangav backend generated 90+% of the code
| file/dir |
change |
| conf/data |
added reverse geo coding data from vangav backend's data |
| Global.java |
added reverse geo coding initialization in beforeStart method |
| common |
contains common operations like initializing the continents/countries names index |
| controllers |
added the implementation of request processing logic under controller_name/HandlerControllerName.java classes and nested response json structures under controller_name/response_json packages |

