Skip to content

Commit

Permalink
feat: Extend proCosmosReactor to become Indexer (#132)
Browse files Browse the repository at this point in the history
* Move/split cosmosReactor -> Indexer
* Add sync/snapshot commands
  • Loading branch information
bartelink authored Aug 29, 2023
1 parent 6842b97 commit f510b27
Show file tree
Hide file tree
Showing 27 changed files with 875 additions and 321 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,17 @@ The `Unreleased` section name is replaced by the expected version of next releas
## [Unreleased]

### Added

- `proIndexer`: Template demonstrating a reactor app that maintais a summarised form of an Aggregate's as `RollingState` in a separated `Views` Container [#132](https://github.com/jet/dotnet-templates/pull/132)

### Changed

- Target `Equinox` v `4.0.0-rc.13`, `Propulsion` v `3.0.0-rc.8.10`, `FsCodec` v `3.0.0-rc.11.1`
- Target `Equinox` v `4.0.0-rc.13`, `Propulsion` v `3.0.0-rc.8.10`, `FsCodec` v `3.0.0-rc.11.1` [#131](https://github.com/jet/dotnet-templates/pull/131)

### Removed

- `proCosmosReactor`: Extended/split to become `proIndexer` [#132](https://github.com/jet/dotnet-templates/pull/132)

### Fixed

<a name="6.3.1"></a>
Expand Down
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,18 @@ The specific behaviors carried out in reaction to incoming events often use `Equ

- It is necessary to reset the CFP checkpoint (delete the checkpoint documents, or use a new Consumer Group Name) to trigger a re-traversal if events have expired since the lsat time a traversal took place.

- [`proCosmosReactor`](propulsion-cosmos-reactor/README.md) - Stripped down derivative of `proReactor` template. :pray: [@ragiano215](https://github.com/ragiano215)
- [`proIndexer`](propulsion-cosmos-reactor/README.md) - Derivative of `proReactor` template. :pray: [@ragiano215](https://github.com/ragiano215)

- Specific to CosmosDb
- Specific to CosmosDB, though it would be easy to make it support DynamoDB

- For applications where the reactions using the same Container, credentials etc as the one being Monitored by the change feed processor (simpler config wiring and less argument processing)

- includes full wiring for Prometheus metrics emission from the Handler outcomes

- Demonstrates notion of an `App` project that hosts common wiring common to a set of applications without having the Domain layer reference any of it.

- Implements `sync` and `snapshot` subcommands to enable updating snapshots and/or keeping a cloned database in sync

<a name="eqxShipping"></a>
- [`eqxShipping`](equinox-shipping/README.md) - Example demonstrating the implementation of a [Process Manager](https://www.enterpriseintegrationpatterns.com/patterns/messaging/ProcessManager.html) using [`Equinox`](https://github.com/jet/equinox) that manages the enlistment of a set of `Shipment` Aggregate items into a separated `Container` Aggregate as an atomic operation. :pray: [@Kimserey](https://github.com/Kimserey).

Expand Down Expand Up @@ -189,11 +193,11 @@ To use from the command line, the outline is:
dotnet new eqxShipping

# ... to add a Reactor against a Cosmos container for both listening and writing
md -p ../CosmosReactor | Set-Location
dotnet new proCosmosReactor
md -p ../Indexer | Set-Location
dotnet new proIndexer

# ... to add a Hotel Sample for use with MessageDb or DynamoDb
md -p ../ProGotel | Set-Location
md -p ../ProHotel | Set-Location
dotnet new proHotel

## TESTING
Expand Down
34 changes: 25 additions & 9 deletions dotnet-templates.sln
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,13 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FeedConsumer", "feed-consum
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Domain.Tests", "feed-source\Domain.Tests\Domain.Tests.fsproj", "{E0F63351-FADB-4972-BDE7-D5F5731B8EE4}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "proReactorCosmos", "proReactorCosmos", "{3E4CC1AC-FFA2-457E-9103-ACB497BCB270}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "proIndexer", "proIndexer", "{3E4CC1AC-FFA2-457E-9103-ACB497BCB270}"
ProjectSection(SolutionItems) = preProject
propulsion-cosmos-reactor\.template.config\template.json = propulsion-cosmos-reactor\.template.config\template.json
propulsion-indexer\README.md = propulsion-indexer\README.md
propulsion-indexer\.template.config\template.json = propulsion-indexer\.template.config\template.json
propulsion-indexer\propulsion-indexer.sln = propulsion-indexer\propulsion-indexer.sln
EndProjectSection
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Reactor", "propulsion-cosmos-reactor\Reactor.fsproj", "{3A22EA30-C741-41EA-9499-7C93E5EE29FA}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "periodicIngester", "periodicIngester", "{4738344F-839D-4B82-8417-1B2D298E76C2}"
ProjectSection(SolutionItems) = preProject
periodic-ingester\.template.config\template.json = periodic-ingester\.template.config\template.json
Expand Down Expand Up @@ -181,6 +181,12 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Reactor", "propulsion-hotel
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Reactor.Integration", "propulsion-hotel\Reactor.Integration\Reactor.Integration.fsproj", "{36D15020-4ED7-49FE-B0C3-FC89C45655D2}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Indexer", "propulsion-indexer\Indexer\Indexer.fsproj", "{17DF28A5-3A3A-474F-B4E8-2AF30CE73C38}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "App", "propulsion-indexer\App\App.fsproj", "{233053E0-41B3-45CE-8EB0-93CCBCB8FF0D}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Domain", "propulsion-indexer\Domain\Domain.fsproj", "{4A9F4729-12F7-4423-8A27-012913E39A53}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -287,10 +293,6 @@ Global
{E0F63351-FADB-4972-BDE7-D5F5731B8EE4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E0F63351-FADB-4972-BDE7-D5F5731B8EE4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E0F63351-FADB-4972-BDE7-D5F5731B8EE4}.Release|Any CPU.Build.0 = Release|Any CPU
{3A22EA30-C741-41EA-9499-7C93E5EE29FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3A22EA30-C741-41EA-9499-7C93E5EE29FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3A22EA30-C741-41EA-9499-7C93E5EE29FA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3A22EA30-C741-41EA-9499-7C93E5EE29FA}.Release|Any CPU.Build.0 = Release|Any CPU
{AB0C8BC0-4C30-4177-9469-C06E97C9568E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AB0C8BC0-4C30-4177-9469-C06E97C9568E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AB0C8BC0-4C30-4177-9469-C06E97C9568E}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -323,6 +325,18 @@ Global
{36D15020-4ED7-49FE-B0C3-FC89C45655D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{36D15020-4ED7-49FE-B0C3-FC89C45655D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{36D15020-4ED7-49FE-B0C3-FC89C45655D2}.Release|Any CPU.Build.0 = Release|Any CPU
{17DF28A5-3A3A-474F-B4E8-2AF30CE73C38}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{17DF28A5-3A3A-474F-B4E8-2AF30CE73C38}.Debug|Any CPU.Build.0 = Debug|Any CPU
{17DF28A5-3A3A-474F-B4E8-2AF30CE73C38}.Release|Any CPU.ActiveCfg = Release|Any CPU
{17DF28A5-3A3A-474F-B4E8-2AF30CE73C38}.Release|Any CPU.Build.0 = Release|Any CPU
{233053E0-41B3-45CE-8EB0-93CCBCB8FF0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{233053E0-41B3-45CE-8EB0-93CCBCB8FF0D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{233053E0-41B3-45CE-8EB0-93CCBCB8FF0D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{233053E0-41B3-45CE-8EB0-93CCBCB8FF0D}.Release|Any CPU.Build.0 = Release|Any CPU
{4A9F4729-12F7-4423-8A27-012913E39A53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4A9F4729-12F7-4423-8A27-012913E39A53}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4A9F4729-12F7-4423-8A27-012913E39A53}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4A9F4729-12F7-4423-8A27-012913E39A53}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -351,7 +365,6 @@ Global
{28EBD7E4-6130-4444-B44F-BB741172A233} = {CF54228E-4DC5-4CE4-B5BC-B9A5D438B03F}
{FE141E84-1AA3-4136-BD7C-318AE7BD84A5} = {EDC5EB0D-EE6D-489A-B0B0-DA85ECDF04B2}
{E0F63351-FADB-4972-BDE7-D5F5731B8EE4} = {CF54228E-4DC5-4CE4-B5BC-B9A5D438B03F}
{3A22EA30-C741-41EA-9499-7C93E5EE29FA} = {3E4CC1AC-FFA2-457E-9103-ACB497BCB270}
{AB0C8BC0-4C30-4177-9469-C06E97C9568E} = {4738344F-839D-4B82-8417-1B2D298E76C2}
{B3B0C203-2648-432F-B49B-F9F8E1A4B4F1} = {A3A3AA9F-E039-4D1A-BA64-A8291A239861}
{2D673A49-19A2-41E9-B32E-E73FE05A8457} = {DAE9E2B9-EDA2-4064-B0CE-FD5294549374}
Expand All @@ -360,6 +373,9 @@ Global
{DE76D4BF-619A-4553-A113-6F8D83CE63D6} = {C76DEE36-C648-4351-9BB6-F4470D72D473}
{0F4E4FF4-0471-4D1E-B80D-F6AB8EA87DD5} = {C76DEE36-C648-4351-9BB6-F4470D72D473}
{36D15020-4ED7-49FE-B0C3-FC89C45655D2} = {C76DEE36-C648-4351-9BB6-F4470D72D473}
{17DF28A5-3A3A-474F-B4E8-2AF30CE73C38} = {3E4CC1AC-FFA2-457E-9103-ACB497BCB270}
{233053E0-41B3-45CE-8EB0-93CCBCB8FF0D} = {3E4CC1AC-FFA2-457E-9103-ACB497BCB270}
{4A9F4729-12F7-4423-8A27-012913E39A53} = {3E4CC1AC-FFA2-457E-9103-ACB497BCB270}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D8B64643-4049-466D-BAFC-0437B8C1E508}
Expand Down
14 changes: 0 additions & 14 deletions propulsion-cosmos-reactor/Contract.fs

This file was deleted.

148 changes: 0 additions & 148 deletions propulsion-cosmos-reactor/Program.fs

This file was deleted.

Loading

0 comments on commit f510b27

Please sign in to comment.