eclipse-basyx / basyx-java-server-sdk

MIT License
56 stars 45 forks source link

[FEATURE] Reload AASX files (and config) on SIGUP signal withouth restart #478

Open StenGruener opened 1 week ago

StenGruener commented 1 week ago

Hi guys,

we got a use-case where AASX packages are updated from a side-sevice, e.g., blob storage or something. After each such update we need to cycle/reload the whole basyx solution including env and registries (yea, env does crash in case of a duplicate in registry). Whole cycle takes about 2m until everything is up and healthy again.

So the idea would be to let env reload the config and the aasx files using some IPC mechanism. Maybe some custom mgmt rest api, or a SIGHUP posix signal (mosquitto is working this way). So signlas would be a preferred solution. image

aaronzi commented 5 days ago

Hi Sten,

just out of curiosity, why are you not updating/creating the shells via the respective rest endpoints? The AAS Environment also has an endpoint for uploading AASX-files. Would that solve your problem?

StenGruener commented 2 days ago

hi,

  1. changes may be too huge
  2. will it also support "replacing" the AAS or do we have to "purge" everything first using DELETE verbs?
  3. will it also be able to handle "attached" files within the aasx package?
aaronzi commented 2 days ago
  1. Too huge for a web request you mean?
  2. When using for example PUT /shells on an existing shell this will replace the old one with the new one. The /upload endpoint won't work in that scenario because the shell already exists.
  3. That would only work when using the /upload endpoint or multiple request to add the attachment files to the shell after it was created/updated.

What you are talking about sounds like a tool for handling AASX Packages like the AASX File Server (including some extra features for starting those shells as Type 2 Shells on a server). We are currently considering integrating the file server and the repositories, but we won't implement this soon.