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

data displaying using OceanDataLab Syntool #71

Open
jerabaul29 opened this issue Jan 4, 2023 · 2 comments
Open

data displaying using OceanDataLab Syntool #71

jerabaul29 opened this issue Jan 4, 2023 · 2 comments

Comments

@jerabaul29
Copy link
Owner

@gauteh @oceandatalab feel free to edit if anything in the "statements" is inaccurate, and / or further discuss what you think is best for the discussion part :) .


If I understand well, the current workflow is:

A possible question is, how to make this further available to more users if they want, can this be automated, and / or can we provide a standard workflow that users can follow to see their data displayed online somewhere?

I guess the steps would be:

  • get a sfy-data server to collect and further serve their data; @gauteh , how would you like this to be organized? Do you think it may be possible to offer 2 solutions to users, ie either i) for MetNo to get the users Rock7 details and IDs to track and the MetNo server then collects the users data, or ii) making a simple recipe for helping users run their own sfy-data (a script or container or similar that non expert users could just run?)? I think i) may be easier on users, so if possible that would be great :) . Note: i) may request at some point having data access granularity and different user accounts with access to different subset of the data?

  • once a sfy-data server collects the user data, Syntool can be used to display them. Same point here, @oceandatalab do you think it would be possible / how to provide this as a service to the users? If it would be possible for users to provide for example the sfy-data server url and access credentials, and the list of IDs, could you add their data to your tool? And / or a simple recipe for running things locally, ideally a single script or container to run. Note: to keep things organized, it may be useful to be able to search for buoys using both i) category "openmetbuoy", ii) username or sfy-data server url / ID, iii) buoy individual name, iv) a combination of these, as if several users start using this for different campaigns, things may get a bit complicated otherwise.

Do you think / how do you think we should proceed further on that? :)


Key points from the email, copying here to keep them easy to find:

@oceandatalab
Copy link

Sorry for the very late reply, the beginning of the year has been quite busy...

Here is a simplified diagram showing how software components interacted when we ingested OMB data in Syntool during the January campaign at sea:

As you can see it relies on many 3rd party software and on the custom scheduling system that we use for automating our processing tasks, which makes it unsuitable for a local deployment.

Yet, with some effort it should be possible to replace the 3rd party software by less scalable but simpler/more user-friendly implementations, and to remove the ODL-specific parts of the processing scripts to create a Python package that is easy to install:

  • The webservice implementation currently supports only MySQL/MariaDB, these SQL servers may be difficult to install / configure for users. My colleague @zaygraveyard has made some experiments to add support for SQLite: it is usually already installed by default in most operating systems, querying the database does not require a service and Python natively supports it, so it would be a good option for an all-in-one package.
  • The Nginx webserver could be replaced by the implementation available in the Python standard library (python -m http.server).The Python webservice is a WSGI application running with the uwsgi server, which conveniently embeds a web server to make the apps available with the HTTP protocol. So all the Web software components could be implemented with Python.
  • Some work would be required to turn the processing scripts (download + export to GeoJSON + generation of spectra plots + export to database) into Python-only code without dependency on our scheduling system. They may still require the installation of the proj library to handle the conversion of coordinates, but aside from that I think all the dependencies are only one pip install away.
  • It would probably be necessary to implement one command to start the Web components (server + service) and another command that the user would execute to fetch and process new data. A configuration file would be needed to pass credentials and the list of devices to process.

So it would turn the previous diagram into this:

Not saying that we will have time to handle this in the near future, but this is how I would proceed to create a standalone version that users can run on their own computer.

@jerabaul29
Copy link
Owner Author

Many thanks for the explanation! Agree this looks like quite a lot of work, we can keep this in mind and see if there is a growing user group at some point in the future asking for something in this kind come back to this discussion :) .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants