Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
* refactor(cache): remove service from name * refactor(cacheservice): inmem (ongoing) * refactor(cacheservice): inmem (ongoing) * chore(docs): add structurizr (c4) * refactor(cache): inmem get user * refactor(cacheservice): in-mem version * refactor(cacheservice): redis version (ongoing) * refactor(cacheservice): add zio-config (ongoing) * refactor(cacheservice): redis implementation (ongoing) * refactor(cacheservice): redis implementation (ongoing) * refactor(cacheservice): redis implementation (ongoing) * refactor(cacheservice): add redis implementation * refactor(cacheservice): add redis serialization implementation (ongoing) * refactor: after spartan session (ongoing) * refactor(cacheservice): remove actor * refactor(cacheservice): fix tests (ongoing) * build: fix after merge * refactor(cacheservice): fix tests * refactor(cacheservice): add Redis Testcontainers layer * refactor(cacheservice): moving runtime initialization to main * refactor(cacheservice): moving runtime initialisation back where it was * docs: add ADR record * chore(deps): bump zio libraries * chore(deps): bump zio libraries * chore(deps): bump zio libraries * chore: remove unneeded file * refactor(cacheservice): ziofy redis testcontainers * cleanup * fix redis test container * fix redis test container * remove metrics logging * Update webapi/src/main/scala/org/knora/webapi/store/cacheservice/CacheServiceManager.scala Co-authored-by: irinaschubert <irina.schubert@dasch.swiss> * Update webapi/src/main/scala/org/knora/webapi/store/cacheservice/CacheServiceManager.scala Co-authored-by: irinaschubert <irina.schubert@dasch.swiss> * Update webapi/src/main/scala/org/knora/webapi/store/cacheservice/CacheServiceManager.scala Co-authored-by: irinaschubert <irina.schubert@dasch.swiss> * Update docs/architecture/decisions/0002-change-cache-service-manager-from-akka-actor-to-zlayer.md Co-authored-by: irinaschubert <irina.schubert@dasch.swiss> * cleanup * bumping dependencies * cleanup Co-authored-by: irinaschubert <irina.schubert@dasch.swiss>
- Loading branch information
Showing
with
2,095 additions
and 1,816 deletions.
- +1 −0 .adr-dir
- +3 −0 .gitignore
- +1 −1 .scalafmt.conf
- +5 −0 Makefile
- +17 −11 build.sbt
- +15 −0 docs/architecture/README.md
- +19 −0 docs/architecture/decisions/0001-record-architecture-decisions.md
- +19 −0 docs/architecture/decisions/0002-change-cache-service-manager-from-akka-actor-to-zlayer.md
- +21 −0 docs/architecture/workspace.dsl
- +2 −2 dsp-schema/repo/src/main/scala/dsp/schema/repo/SchemaRepoLive.scala
- +4 −4 dsp-schema/repo/src/main/scala/dsp/schema/repo/SchemaRepoTest.scala
- +70 −55 project/Dependencies.scala
- +63 −27 webapi/src/main/scala/org/knora/webapi/app/ApplicationActor.scala
- +36 −50 webapi/src/main/scala/org/knora/webapi/app/Main.scala
- +15 −0 webapi/src/main/scala/org/knora/webapi/config/AppConfig.scala
- +28 −0 webapi/src/main/scala/org/knora/webapi/core/Logging.scala
- +1 −1 webapi/src/main/scala/org/knora/webapi/exceptions/Exceptions.scala
- +6 −8 ...c/main/scala/org/knora/webapi/messages/admin/responder/projectsmessages/ProjectsMessagesADM.scala
- +16 −16 webapi/src/main/scala/org/knora/webapi/messages/admin/responder/usersmessages/UsersMessagesADM.scala
- +1 −6 ...pi/src/main/scala/org/knora/webapi/messages/store/cacheservicemessages/CacheServiceMessages.scala
- +2 −2 webapi/src/main/scala/org/knora/webapi/responders/admin/ProjectsResponderADM.scala
- +3 −3 webapi/src/main/scala/org/knora/webapi/responders/admin/StoresResponderADM.scala
- +680 −678 webapi/src/main/scala/org/knora/webapi/responders/admin/UsersResponderADM.scala
- +3 −3 webapi/src/main/scala/org/knora/webapi/settings/package.scala
- +6 −11 webapi/src/main/scala/org/knora/webapi/store/StoreManager.scala
- +0 −27 webapi/src/main/scala/org/knora/webapi/store/cacheservice/CacheService.scala
- +81 −69 webapi/src/main/scala/org/knora/webapi/store/cacheservice/CacheServiceManager.scala
- +47 −0 webapi/src/main/scala/org/knora/webapi/store/cacheservice/api/CacheService.scala
- +1 −1 webapi/src/main/scala/org/knora/webapi/store/cacheservice/{ → api}/CacheServiceExceptions.scala
- +7 −0 webapi/src/main/scala/org/knora/webapi/store/cacheservice/config/CacheServiceConfig.scala
- +220 −0 webapi/src/main/scala/org/knora/webapi/store/cacheservice/impl/CacheServiceInMemImpl.scala
- +293 −0 webapi/src/main/scala/org/knora/webapi/store/cacheservice/impl/CacheServiceRedisImpl.scala
- +0 −175 webapi/src/main/scala/org/knora/webapi/store/cacheservice/inmem/CacheServiceInMemImpl.scala
- +0 −397 webapi/src/main/scala/org/knora/webapi/store/cacheservice/redis/CacheServiceRedisImpl.scala
- +23 −32 webapi/src/main/scala/org/knora/webapi/store/cacheservice/serialization/CacheSerialization.scala
- +57 −12 webapi/src/main/scala/org/knora/webapi/util/ActorUtil.scala
- +3 −3 webapi/src/test/scala/org/knora/webapi/CoreSpec.scala
- +9 −23 webapi/src/test/scala/org/knora/webapi/IntegrationSpec.scala
- +12 −2 webapi/src/test/scala/org/knora/webapi/ManagersWithMockedSipi.scala
- +5 −5 webapi/src/test/scala/org/knora/webapi/TestContainerRedis.scala
- +2 −2 webapi/src/test/scala/org/knora/webapi/responders/IriLockerSpec.scala
- +8 −5 webapi/src/test/scala/org/knora/webapi/responders/admin/UsersResponderADMSpec.scala
- +5 −3 webapi/src/test/scala/org/knora/webapi/store/MockableStoreManager.scala
- +8 −10 webapi/src/test/scala/org/knora/webapi/store/cacheservice/CacheServiceManagerSpec.scala
- +16 −0 webapi/src/test/scala/org/knora/webapi/store/cacheservice/config/RedisTestConfig.scala
- +116 −0 webapi/src/test/scala/org/knora/webapi/store/cacheservice/impl/CacheInMemImplSpec.scala
- +92 −0 webapi/src/test/scala/org/knora/webapi/store/cacheservice/impl/CacheRedisImplSpec.scala
- +0 −69 webapi/src/test/scala/org/knora/webapi/store/cacheservice/inmem/CacheServiceInMemImplSpec.scala
- +0 −76 webapi/src/test/scala/org/knora/webapi/store/cacheservice/redis/CacheServiceRedisImplSpec.scala
- +20 −27 webapi/src/test/scala/org/knora/webapi/store/cacheservice/serialization/CacheSerializationSpec.scala
- +33 −0 webapi/src/test/scala/org/knora/webapi/testcontainers/RedisTestContainer.scala
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1 @@ | ||
docs/architecture/decisions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1,6 +1,6 @@ | ||
version = "2.7.5" | ||
maxColumn = 120 | ||
align.preset = most | ||
align.multiline = false | ||
continuationIndent.defnSite = 2 | ||
assumeStandardLibraryStripMargin = true | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,15 @@ | ||
# C4 Model and ADRs | ||
|
||
## Installation | ||
|
||
```bash | ||
$ brew install adr-tools | ||
``` | ||
|
||
## Usage | ||
|
||
Run the following command from the root directory to start the C4 model browser: | ||
|
||
```bash | ||
$ make structurizer | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,19 @@ | ||
# 1. Record architecture decisions | ||
|
||
Date: 2022-03-14 | ||
|
||
## Status | ||
|
||
Accepted | ||
|
||
## Context | ||
|
||
We need to record the architectural decisions made on this project. | ||
|
||
## Decision | ||
|
||
We will use Architecture Decision Records, as [described by Michael Nygard](http://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions). | ||
|
||
## Consequences | ||
|
||
See Michael Nygard's article, linked above. For a lightweight ADR toolset, see Nat Pryce's [adr-tools](https://github.com/npryce/adr-tools). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,19 @@ | ||
# 2. Change Cache Service Manager from Akka-Actor to ZLayer | ||
|
||
Date: 2022-04-06 | ||
|
||
## Status | ||
|
||
Accepted | ||
|
||
## Context | ||
|
||
The `org.knora.webapi.store.cacheservice.CacheServiceManager` was implemented as an `Akka-Actor`. | ||
|
||
## Decision | ||
|
||
As part of the move from `Akka` to `ZIO`, it was decided that the `CacheServiceManager` and the whole implementation of the in-memory and Redis backed cache is refactored using ZIO. | ||
|
||
## Consequences | ||
|
||
The usage from other actors stays the same. The actor messages and responses don't change. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,21 @@ | ||
workspace { | ||
|
||
model { | ||
user = person "User" | ||
softwareSystem = softwareSystem "Software System" | ||
|
||
user -> softwareSystem "Uses" | ||
} | ||
|
||
views { | ||
systemContext softwareSystem "Diagram1" { | ||
include * | ||
autoLayout | ||
} | ||
|
||
theme default | ||
} | ||
|
||
!adrs decisions | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -14,6 +14,6 @@ case class SchemaRepoLive() extends SchemaRepo { | ||
|
||
} | ||
|
||
object SchemaRepoLive { | ||
val layer: URLayer[Any, SchemaRepo] = ZLayer.succeed(SchemaRepoLive()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.