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

[Feature] FileStorageMongoDb #1005

Open
sirchnik opened this issue Jan 13, 2025 · 2 comments
Open

[Feature] FileStorageMongoDb #1005

sirchnik opened this issue Jan 13, 2025 · 2 comments

Comments

@sirchnik
Copy link

sirchnik commented Jan 13, 2025

Description

In version 1.2.0, MongoDB was introduced as a means to store AAS data in a NoSQL database. This is a significant improvement, as it enables scalable and efficient data storage.

However, MongoDB currently does not support FileStorage for AssetInformation.thumbnail and SubmodelElement.Attachment in AAS.

Introducing a FileStorageMongoDb implementation would provide centralized file storage and a unified source for complete AAS data and files. This feature would also enable running multiple instances of FA³ST-Services with the same database, facilitating load balancing and improving scalability.


Description old

The v1.2.0 MongoDB persistence does not save blobs in the database thus making it harder to use for horizontal scaling as a shared filesystem has to be used between Instances of the service. This costs performance is questionable to be safe concurrently.

This affects AAS file storage and AAS asset-information thumbnails.

It would be nice if FA³ST-Service could also save files on mongoDB.

@sirchnik sirchnik changed the title [MongoDB Persistence] Not covering blobs [MongoDB Persistence] Covering blobs Jan 13, 2025
@mjacoby
Copy link
Member

mjacoby commented Jan 17, 2025

What exactly o you mean by blobs? In AAS there are different things you could refer to:

SubmodelElements of type Blob
These should be saved in the persistence/MongoDB and if that is not the case, please report this (preferably with an example)

AssetInformation.thumbnail and files embedded in an imported AASX or attached via PUT /submodel/submodel-elements/{idShortPath}/attachment
In FA³ST, these are not stored using the Persistence interface but the FileStorage interface. This is intentional as storing large files in a database is often not desired. However, in case you want these files to also be stored in MongoDB you would have to create your own implementation of the FileStorage interface that does that.

@sirchnik
Copy link
Author

Oh you're right the word blobs isn't correct. Files would be a better word sorry.

This issue wasn't very well prepared. After creating I read that there is the FileStorage Interface. I just saw the saving of files as a gives as BaSyx Java does so and was confused with the responses when running multiple FA³ST instances.

Yeah I could create my own FileStorageMongoDb but don't have time for this. 😄 I think MongoDb could handle the files very effectively.
But your somewhat right next day someone will request S3 then Azure maybe that's better implemented by users.

I will rewrite this issue a bit to better document that is a mere feature "recommendation".

@sirchnik sirchnik changed the title [MongoDB Persistence] Covering blobs [Feature] FileStorageMongoDb Jan 17, 2025
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