|
1 |
| -[](https://mvnrepository.com/artifact/software.xdev/standard-maven-template) |
2 |
| -[](https://github.com/xdev-software/standard-maven-template/actions/workflows/checkBuild.yml?query=branch%3Adevelop) |
3 |
| -[](https://sonarcloud.io/dashboard?id=xdev-software_standard-maven-template) |
| 1 | +[](https://mvnrepository.com/artifact/software.xdev/spring-data-eclipse-store) |
| 2 | +[](https://github.com/xdev-software/spring-data-eclipse-store/actions/workflows/checkBuild.yml?query=branch%3Adevelop) |
| 3 | +[](https://sonarcloud.io/dashboard?id=xdev-software_spring-data-eclipse-store) |
4 | 4 |
|
5 |
| -# standard-maven-template |
| 5 | +<div align="center"> |
| 6 | + <img src="assets/Logo.png" height="200" alt="XDEV Spring-Data Eclipse-Store Logo"> |
| 7 | +</div> |
6 | 8 |
|
| 9 | +# spring-data-eclipse-store |
| 10 | + |
| 11 | +A library to simplify using [EclipseStore](https://eclipsestore.io/) in the [Spring environment](https://spring.io/projects/spring-data/). |
| 12 | + |
| 13 | +What makes this library special is, that it creates a working copy of the data. |
| 14 | +This way EclipseStore behaves almost exactly like relational database from a coding perspective. |
| 15 | + |
| 16 | +## Features |
| 17 | + |
| 18 | +The library provides following features: |
| 19 | + |
| 20 | +* Enforces the |
| 21 | + **[Spring data repository concept](https://docs.spring.io/spring-data/jpa/reference/repositories/core-concepts.html)** |
| 22 | + for EclipseStore by using [working copies](#working-copies) |
| 23 | +* **[Drop in compatible](#usage)** for your existing Spring application |
| 24 | +* Utilizes **ultra-fast EclipseStore serializing and storing** |
| 25 | +* Enables your application to **select |
| 26 | + any [EclipseStore target](https://docs.eclipsestore.io/manual/storage/storage-targets/index.html)** (e.g. |
| 27 | + [PostgreSQL](https://docs.eclipsestore.io/manual/storage/storage-targets/sql-databases/postgresql.html), |
| 28 | + [AWS S3](https://docs.eclipsestore.io/manual/storage/storage-targets/blob-stores/aws-s3.html) or |
| 29 | + [IBM COS](https://github.com/xdev-software/eclipse-store-afs-ibm-cos)) |
| 30 | +* Can save up to **99%[^1] of monthly costs** in the IBM Cloud and up to 82%[^2] in the AWS Cloud |
| 31 | + |
| 32 | +[^1]:If the COS Connector is used in the IBM Cloud instead of a PostgreSQL and approx. 10,000 entries with a total size |
| 33 | +of 1 |
| 34 | +GB of data are stored. ([IBM Cloud Pricing](https://cloud.ibm.com/estimator/estimates), as of 08.01.2024) |
| 35 | + |
| 36 | +[^2]: If the S3 connector is used instead of DynamoDB under the same conditions at |
| 37 | +AWS. ([AWS Pricing Calculator](https://calculator.aws/#/estimate?id=ab85cddf77f0d1aa0457111ed82785dfb836b1d8), as of |
| 38 | +08.01.2024) |
| 39 | + |
| 40 | +### Working copies |
| 41 | + |
| 42 | +If you use EclipseStore without our library, EclipseStore loads the data from the datastore directly into memory. You make your changes on these loaded Java objects and by calling ``store`` EclipseStore writes it directly from memory to the datastore. |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | +If you e.g. change the address of a person, the changed address is already in your data model, **even before storing** this person. |
| 47 | +This is very different from the behavior a Spring user expects. |
| 48 | + |
| 49 | +With *Spring-Data-Eclipse-Store* every time an object is loaded from the datastore, a working copy of that object (or rather the object tree) is created and returned to the user. Therefore, the user can make the changes on the working copy without any changes to the actual data model. The changes are only persisted after calling ``save`` on a repository. |
| 50 | + |
| 51 | + |
7 | 52 |
|
8 | 53 | ## Installation
|
9 |
| -[Installation guide for the latest release](https://github.com/xdev-software/standard-maven-template/releases/latest#Installation) |
| 54 | +[Installation guide for the latest release](https://github.com/xdev-software/spring-data-eclipse-store/releases/latest#Installation) |
| 55 | + |
| 56 | +### Prerequisites |
| 57 | + |
| 58 | +| | Minimal Version | |
| 59 | +|--------------|-----------------| |
| 60 | +| Java | ``17`` | |
| 61 | +| Spring Data | ``3.2.2`` | |
| 62 | +| EclipseStore | ``1.1.0`` | |
| 63 | + |
| 64 | +### Usage |
| 65 | + |
| 66 | +After adding the library in your dependencies, using it is as easy as adding the ``@EnableEclipseStoreRepositories`` annotation to your ``@SpringBootApplication`` annotation. |
| 67 | + |
| 68 | +## Demo |
| 69 | + |
| 70 | +To see how easy it is to implement EclipseStore in your Spring project, take a look at the three |
| 71 | +[demos](./spring-data-eclipse-store-demo):<br/> |
| 72 | +A [simple](./spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/simple), a |
| 73 | +more [complex demo](./spring-data-eclipse-store-demo/src/main/java/software/xdev/spring/data/eclipse/store/demo/complex) |
| 74 | +and |
| 75 | +a [demo with coexisting JPA](./spring-data-eclipse-store-jpa/src/main/java/software/xdev/spring/data/eclipse/store/jpa). |
| 76 | + |
| 77 | +> [!NOTE] |
| 78 | +> Since the library is using reflection to copy data, the following JVM-Arguments may have to be set: |
| 79 | +> ``` |
| 80 | +> --add-opens=java.base/java.util=ALL-UNNAMED |
| 81 | +> --add-exports java.base/jdk.internal.misc=ALL-UNNAMED |
| 82 | +> --add-opens=java.base/java.lang=ALL-UNNAMED |
| 83 | +> --add-opens=java.base/java.time=ALL-UNNAMED |
| 84 | +> ``` |
10 | 85 |
|
11 | 86 |
|
12 | 87 | ## Support
|
13 |
| -If you need support as soon as possible and you can't wait for any pull request, feel free to use [our support](https://xdev.software/en/services/support). |
| 88 | +
|
| 89 | +If you need support as soon as possible, and you can't wait for any pull request, feel free to |
| 90 | +use [our support](https://xdev.software/en/services/support). |
14 | 91 |
|
15 | 92 | ## Contributing
|
16 | 93 | See the [contributing guide](./CONTRIBUTING.md) for detailed instructions on how to get started with our project.
|
17 | 94 |
|
18 | 95 | ## Dependencies and Licenses
|
19 |
| -View the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/standard-maven-template/dependencies/) |
| 96 | +View the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/spring-data-eclipse-store/dependencies/) |
0 commit comments