/DownloadWebService

OHDM Server with map download service for Andropid App

Primary LanguageJavaGNU Lesser General Public License v3.0LGPL-3.0

Developer Starting Guide for the OHDM-Download-Service

Introduction

Hi, my name is Tino Geißler and I'm one of the People who worked on this part of the OHDM Project for about one Semester now. I wasn't really the first one and I probably wont be the last (at least I hope so ^^).

(This Service was originally created here (in Python). My Job was, to rewrite it in Java and put it though further development)

I really had fun working on on this and I hope you will too. To make it easier getting into this Project, maybe answering some questions you maybe have and showing some tough processes I put into this, I wanted to write a Starting Guide for people which want to work further on this.

All the Documentation can be found in the Wiki

If you got any questions you want to have answered, as long as I'm still a Student at the HTW Berlin, my E-Mail is Tino.Geissler@student.htw-berlin.de .


What is this ?

To Start, let's answer the question : What even is this?

This Program is the "Server Part" of the Android App : OHDM Offline Viewer

The 3 Main Services are:

  • Receiving Requests from the App or a Website to "create" a Map of a specific size from a specific point in time
  • Using the OHDMConverter and osmosis to "build" a map-File from the request, and...
  • Distributing the map-File to the App or the Website

For these Services, I decided to use:

  • Spring Boot (for "Request Handling" and "Status Distribution")
  • Apache MINA (SFTP for the Distribution of said map-files)
  • OHDMConverter and osmosis (for the "building" of the map file)
  • and Java as the Main Programming Language

The Program itself is "module based". (Which means it's build out of specific Modules which where made to work independently from one another, so they can be restarted/changed/swapped/etc. without damaging the rest of the System)

These Modules are:

  • The Request Manager

    • Manager for the Query Requests, can start and stop ongoing "Requests".

    • manages the number of Requests, that are allowed to run at the same time and automatically starts new, if they are allowed

    • is it's own Thread

  • The Web Service (Spring Boot)

    • just takes HTTP Requests and processes them

    • in the Main Class (Spring Class)

  • The SFTP File Service (Apache MINA)

    • used to create an SFTP Server

    • is it's own Thread

  • The ID Management "System"

    • Just saves/creates/deletes IDs

    • not a Thread

  • The Query Requests

    • is an Object

    • specifically build for downloading, creating and converting map files from a Database

    • is it's own Thread

    • is/are managed by the Request Manager

  • The "Static Variables Initializer"

    • Initializes Variables from a File

    • is used for initializing the entire System

    • not a Thread

  • The Logger

    • A small Logger System with re-usability in mind

    • is it's own Thread

  • The Controller Endpoint

    • Access-point for the Service Controller
    • is it's own Thread

Authors Note: I've tried to build every single Module with the Idea in mind, that you can just take one out and even run it Standalone. This didn't always work out, but with a little bit of tweaking, I bet these things can be reused anywhere. Feel free to try it out yourself.

Footer

OHDM Server with map download service for Andropid App Wiki : https://github.com/OpenHistoricalDataMap/DowloadWebService/wiki

Download Web Service for the Android App : https://github.com/OpenHistoricalDataMap/OHDMOfflineViewer