Skip to content

Commit 9bbbc36

Browse files
s-heppnerzrgt
authored andcommitted
Refactor Backend concept for data persistence (eclipse-basyx#370)
Previously, we tried to use the `Backend` concept for both data persistence and data integration. This led to complicated cross-dependencies, architectures and badly maintainable code. Now, we decided to split these two concepts and use the existing `Backend` `ObjectStore`s for just the data persistence. Concretely, this commit does the following: 1. Remove the abstract `Backend` class (backends.py), as well as their concrete implementations (`CouchDBBackend`, `LocalFileBackend`), as they are no longer needed 2. Remove the `Referable.source` attribute, as it was only needed for the `Backend` class 3. Remove methods related to the `Referable.source` attribute, such as `Referable.update()` and `Referable.commit()` (base.py), as they were used together to perform the data integration. 4. Adapt other related codes such as tutorials and tests to reflect these changes 5. Adapt documentation to reflect these changes
1 parent 81737bb commit 9bbbc36

File tree

18 files changed

+115
-885
lines changed

18 files changed

+115
-885
lines changed

sdk/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ For further examples and tutorials, check out the `basyx.aas.examples`-package.
127127
* [`tutorial_storage`](./basyx/aas/examples/tutorial_storage.py): Manage a larger number of Asset Administration Shells in an ObjectStore and resolve references
128128
* [`tutorial_serialization_deserialization`](./basyx/aas/examples/tutorial_serialization_deserialization.py): Use the JSON and XML serialization/deserialization for single objects or full standard-compliant files
129129
* [`tutorial_aasx`](./basyx/aas/examples/tutorial_aasx.py): Export Asset Administration Shells with related objects and auxiliary files to AASX package files
130-
* [`tutorial_backend_couchdb`](./basyx/aas/examples/tutorial_backend_couchdb.py): Use the *Backends* interface (`update()/commit()` methods) to manage and retrieve AAS objects in a CouchDB document database
130+
* [`tutorial_backend_couchdb`](./basyx/aas/examples/tutorial_backend_couchdb.py): Use the *CouchDBObjectStore* to manage and retrieve AAS objects in a CouchDB document database
131131

132132

133133
### Documentation

sdk/basyx/aas/backend/__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
"""
2-
This module implements a standardized way of integrating data from existing systems into AAS objects. To achieve this,
3-
the abstract :class:`~basyx.aas.backend.backends.Backend` class implements the class methods
4-
:meth:`~basyx.aas.backend.backends.Backend.update_object` and :meth:`~basyx.aas.backend.backends.Backend.commit_object`,
5-
which every implementation of a backend needs to overwrite. For a tutorial on how to implement a backend, see
6-
:ref:`this tutorial <tutorial_backend_couchdb>`
2+
This module implements a standardized way of persisting AAS objects using various backends.
73
"""

sdk/basyx/aas/backend/backends.py

Lines changed: 0 additions & 175 deletions
This file was deleted.

0 commit comments

Comments
 (0)