FlowDance.Client
1.0.13-alpha
dotnet add package FlowDance.Client --version 1.0.13-alpha
NuGet\Install-Package FlowDance.Client -Version 1.0.13-alpha
<PackageReference Include="FlowDance.Client" Version="1.0.13-alpha" />
paket add FlowDance.Client --version 1.0.13-alpha
#r "nuget: FlowDance.Client, 1.0.13-alpha"
// Install FlowDance.Client as a Cake Addin #addin nuget:?package=FlowDance.Client&version=1.0.13-alpha&prerelease // Install FlowDance.Client as a Cake Tool #tool nuget:?package=FlowDance.Client&version=1.0.13-alpha&prerelease
FlowDance
FlowDance aims to address several critical aspects in the context of microservices architecture. Let's delve into each of these goals:
Support Inter-service Communication Between Microservices (Database-per-Service Pattern): In a microservices architecture, each service often manages its own database. The Database-per-Service Pattern encourages this separation. By adopting this pattern, services can communicate with each other through well-defined APIs, avoiding direct database access. This approach enhances modularity, scalability, and isolation, allowing services to evolve independently.
Replacing Distributed Transactions Calls supported by MSDTC: MSDTC (Microsoft Distributed Transaction Coordinator) is commonly used for distributed transactions across multiple databases. However, MSDTC introduces complexity, performance overhead, and potential deadlocks. FlowDance proposes a shift towards synchronous RPC (Remote Procedure Call) communication. Services share a Correlation ID / Trace ID to track related requests across the system. Instead of distributed transactions, services coordinate their actions using synchronous calls, simplifying the architecture. While strong consistency is essential in some business cases, FlowDance aims to minimize the need for distributed transactions.
Moving Away from Strong Consistency to Eventual Consistency Using the Compensating Transaction (or Compensating Action) Pattern: In distributed systems, achieving strong consistency (ACID properties) across all services can be challenging. FlowDance embraces eventual consistency, where operations may temporarily yield inconsistent results. The Compensating Transaction Pattern comes into play when a step in a process fails. If a step cannot be fully rolled back (e.g., due to concurrent changes), compensating transactions undo the effects of previous steps. This pattern ensures that the system eventually converges to a consistent state, even after partial failures.
Documentation and Examples
For more info please see FlowDance.Documentation
Here are some sample apps FlowDance.Examples
You need
Docker Desktop
Inspiration
- Compensating Action - https://learn.microsoft.com/en-us/azure/architecture/patterns/compensating-transaction
- Distributed Transactions with the Saga Pattern - https://dev.to/willvelida/the-saga-pattern-3o7p
Get started
Install Docker Desktop and start it up.
Download the files https://github.com/olahallvall/FlowDance/blob/master/Setup/docker-compose.yml and https://github.com/olahallvall/FlowDance/blob/master/Setup/db-script.sql to a local folder.
Open a command prompt (not Powershell or Linux) in that folder and run the commands:
docker-compose up -d
Wait until both RabbitMQ and SQL Server has started.
Run the commands:
docker exec rabbitmq rabbitmq-plugins enable rabbitmq_stream
docker exec rabbitmq rabbitmqadmin declare queue --vhost=/ name=FlowDance.SpanCommands durable=true
docker exec rabbitmq rabbitmqadmin declare queue --vhost=/ name=FlowDance.SpanEvents durable=true
docker exec -i mssql /opt/mssql-tools/bin/sqlcmd -S . -U SA -P "Admin@123" < db-script.sql
Restart the container flowdance in Docker Desktop.
Here are some sample apps FlowDance.Examples
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.Extensions.Configuration (>= 8.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 8.0.2)
- Microsoft.Extensions.Configuration.Json (>= 8.0.0)
- Microsoft.Extensions.Logging (>= 8.0.0)
- Newtonsoft.Json (>= 13.0.3)
- RabbitMQ.Client (>= 6.8.1)
-
net6.0
- Microsoft.Extensions.Configuration (>= 8.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 8.0.2)
- Microsoft.Extensions.Configuration.Json (>= 8.0.0)
- Microsoft.Extensions.Logging (>= 8.0.0)
- Newtonsoft.Json (>= 13.0.3)
- RabbitMQ.Client (>= 6.8.1)
-
net7.0
- Microsoft.Extensions.Configuration (>= 8.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 8.0.2)
- Microsoft.Extensions.Configuration.Json (>= 8.0.0)
- Microsoft.Extensions.Logging (>= 8.0.0)
- Newtonsoft.Json (>= 13.0.3)
- RabbitMQ.Client (>= 6.8.1)
-
net8.0
- Microsoft.Extensions.Configuration (>= 8.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 8.0.2)
- Microsoft.Extensions.Configuration.Json (>= 8.0.0)
- Microsoft.Extensions.Logging (>= 8.0.0)
- Newtonsoft.Json (>= 13.0.3)
- RabbitMQ.Client (>= 6.8.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.13-alpha | 49 | 8/28/2024 |
1.0.12-alpha | 37 | 7/3/2024 |
1.0.11-alpha | 50 | 6/19/2024 |
1.0.10-alpha | 53 | 6/17/2024 |
1.0.9-alpha | 52 | 5/29/2024 |
1.0.8-alpha | 82 | 5/16/2024 |
1.0.7-alpha | 58 | 5/16/2024 |
1.0.6-alpha | 39 | 5/15/2024 |
1.0.5-alpha | 58 | 5/14/2024 |
1.0.4-alpha | 51 | 5/13/2024 |
1.0.3-alpha | 51 | 5/13/2024 |
1.0.2-alpha | 51 | 5/13/2024 |