Move and Store the Data Source and Data Store Logos on Polypheny-DB
Summary
In this pull request, we move the logos from stored at the Frontend (Polypheny-UI) to the Backend (Polypheny-DB). We also add the logo path/icon identifier on the response regarding Data Store and Data Source (/getSnapshot). By doing this, we can simplify the process of adding new Data Stores / Data Sources by storing the logos in Polypheny-DB sources together with the adapter implementation.
Fixes: #222
Changes
- Add adapterLogo attribute on AdapterProperties annotation interface
- Send adapterLogo attribute with existing adapter information
- Change Polypheny-UI logic regarding adapterLogo
Related PRs
Screenshots
-
Asset files can be served by Polypheny-DB, under
/publichosted path -
Polypheny-UI can access the Polypheny-DB static files and the Data Source and Data Store logos are shown successfully
@malikrafsan thank you very much for this PR, this looks really promising! While I'm satisfied with most of it I have one bigger change request before the review:
At the moment you attach the logo to the AdapterTemplateModel, which is a part of the SnapshotModel.
The SnapshotModel is broadcast to the client on every update of the schema and therefore it includes as little data as possible.
With your approach the size is increased drastically, which is not ideal.
I would suggest that you expose the images via static routes from the backend and only attach the paths in the AdapterTemplateModel to circumvent that.
Hi @datomo, thank you so much for the feedback and for taking the time to review the PR. I really appreciate your insights and suggestions!
I'd like to clarify that I have indeed followed the suggested approach. The images are served through static routes from the backend (<origin>/public/assets/dbms-logos/<filename>), and only the paths to these images (/assets/dbms-logos/<filename>) are linked in the AdapterTemplateModel. There's no direct embedding of the logo images (base64 image string) within the AdapterTemplateModel
However, I am afraid that my understanding is incorrect or that there are any aspects of the implementation that need further clarification. Please kindly let me know if so. Your guidance is greatly appreciated!
Thank you once again for your time and consideration
Hey @malikrafsan My bad, I totally missed this. You are right, then you already used the optimal way.
Thanks for confirming @datomo ! It's great to know this is the optimal approach. I'll mark this PR as ready for review then, looking forward to your review! Once again, thank you so much