Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change models to match column names with old backend #6

Open
wschildbach opened this issue Feb 22, 2021 · 2 comments
Open

Change models to match column names with old backend #6

wschildbach opened this issue Feb 22, 2021 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@wschildbach
Copy link
Collaborator

The old backend uses different column names in places. We could change the code to match the old column names.
Note however that the REST API uses quite different names. This means we would have to write a lot of custom code just to translate the column/field names back and forth in serialization, and it servers no purpose as far as I can see. We should consider whether that is worth it, or whether we are better off renaming the model fields to what is used in the REST API.

@wschildbach wschildbach added enhancement New feature or request help wanted Extra attention is needed labels Feb 22, 2021
@stevo01
Copy link
Collaborator

stevo01 commented Feb 22, 2021

We need to consider that other OpenSeaMap Services are using same database, tables and that changes could cause runtime errors. Sample : UMN Mapserver

@wschildbach
Copy link
Collaborator Author

Fair point.
Assuming we match the table names (which is easy to do, see #5) we have two major options for the field names.

  1. Match the fields to the old database. This will keep any services alive that operate directly on the database but it means the new back-end needs to do a lot of special case code just to translate database fields into differently-named REST API data structures.
  2. Change the field names to those which are used in the REST API. This would mean less special-case code in the back-end, but will impact services that operate directly on those fields unless those services are adapted to the new field names.

My hope is that any other services do not actually operate on those fields served by the REST API (i.e. the map server might not be concerned with user data but rather with tracks or just points and lines). That would make a strong case for option 2.

More research needed...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants