ausocean / cloud

GNU General Public License v3.0
1 stars 1 forks source link

cmd: Common standalone filestore #115

Closed ao-david closed 2 months ago

ao-david commented 3 months ago

When testing with standalone instances of the different services, it is useful to have them all using the same filestore. This way oceanbench is able to read the broadcasts that have been saved by oceanTV. In their current state, unless using appengine mode, each service uses a distinct filestore which each other service does not have access to.

scruzin commented 3 months ago

At present, there's a pretty easy work around to this already, though. Just run all binaries from the same working directory and the standalone file store is shared.

For example, say you wish to run oceanbench and oceancron.

From terminal 1:

cd ~/go/src/github.com/ausocean/cloud/cmd/oceanbench
./oceanbench --standalone

From terminal 2:

cd ~/go/src/github.com/ausocean/cloud/cmd/oceanbench
../oceancron/oceancron -- standalone

That said, we could add a --standalone-store flag that specifies the path to the shared file store.

ao-david commented 3 months ago

This is probably fine behaviour, but it would be good to document this if it is not already. If it is already documented, maybe we need to think about how this documentation is being done as I missed this.

ao-david commented 3 months ago

@scruzin After doing some more testing using this method today, I have discovered an issue with this.

When bench is accessing broadcasts from the store it uses the vidgrind store (store/vidgrind), whereas oceantv will store its broadcasts in store/oceantv. This means that you can successfully save a broadcast, but you won't be able to load that broadcast from the filestore.

scruzin commented 3 months ago

Two solutions:

scruzin commented 2 months ago

Implemented in Pull Request #238