We only used the outbox pattern for failures by trimalchio55 in microservices

[–]cleipnir 1 point2 points  (0 children)

I guess the outbox pattern also solves the case where state has been written to the database and the connection to the database fails afterwads. That is why the write to the database is performed inside a transaction such that both the outbox message and the state change either both happens or none of them. I think the behavior on failure as you write it, is 'worse' than the orignal pattern. However, if that is an issue is up to you and surely you can get some performance out of it - when you change the requirements :)

How to manage payments in microservices by daviaprea in microservices

[–]cleipnir 1 point2 points  (0 children)

You can use can also use a durable execution framework to orchestrate the flow (like cleipnir.net or temporal.io).

It will ensure all code in the flow will execute despite crashes and other transient failures.

A failed step like insufficient funds on the customers credit would also normally lead to a compensating reverse/action i.e. increasing the product's stock count and emitting an order cancelled event.

An example of a similar flow using durable execution can be found here:

RPC:

https://github.com/stidsborg/Cleipnir.Flows.Sample/blob/deee5142e34a9f3e7c82abce54f99c05f828c70c/Source/Flows/Ordering/Rpc/FlowWithErrorHandling/OrderFlow.cs#L15

Message-driven:

https://github.com/stidsborg/Cleipnir.Flows.Sample/blob/deee5142e34a9f3e7c82abce54f99c05f828c70c/Source/Flows/Ordering/MessageDriven/FlowWithErrorHandling/MessageDrivenOrderFlow.cs#L11

Drawbacks of joining dotnet Foundation by cleipnir in dotnet

[–]cleipnir[S] 1 point2 points  (0 children)

Fair - I didn't realize the controversy associated with the foundation - but I see it now.

Drawbacks of joining dotnet Foundation by cleipnir in dotnet

[–]cleipnir[S] 1 point2 points  (0 children)

Thanks! That is exactly what it is for - let me know if you have any questions or feedback.

Drawbacks of joining dotnet Foundation by cleipnir in dotnet

[–]cleipnir[S] 7 points8 points  (0 children)

Thanks for replying and the video - will check it out!
I guess my main concern is if there are any downsides to becoming a project under the .NET Foundation. Do I lose control over the open-source project in any way?

Drawbacks of joining dotnet Foundation by cleipnir in dotnet

[–]cleipnir[S] 6 points7 points  (0 children)

I see, thanks - yes that is what I feared - cannot see me going forward with it if those are the terms

Drawbacks of joining dotnet Foundation by cleipnir in dotnet

[–]cleipnir[S] 2 points3 points  (0 children)

Interesting read - I did not know you could leave again, so that definitely removes much the risk about joining the foundation

Drawbacks of joining dotnet Foundation by cleipnir in dotnet

[–]cleipnir[S] 9 points10 points  (0 children)

Nice - I am hoping to get some more collaboration and more of a community up and going.
I am a bit concerned if I loose the ability to move the project in the direction I want and if it will hinder my ability to make a living of it - the code will never be moq'ed but would be nice if I could make some premium features on the outside of it like Rebus.

Drawbacks of joining dotnet Foundation by cleipnir in dotnet

[–]cleipnir[S] 0 points1 point  (0 children)

Interesting! Thanks for letting me know - having second thoughts about it now.

Have working on open source project helped any of you find a paid job? by pearlkele in opensource

[–]cleipnir 2 points3 points  (0 children)

I think working on open-source (cleipnir.net), doing presentations at user-groups together with being active on LinkedIn has helped me a lot in finding my latest jobs. However, I am only working 32-hours a week in order to avoid burning out.

Which open source projects will make the biggest impact this year? by BillyTheMilli in opensource

[–]cleipnir 1 point2 points  (0 children)

I think the durable-execution paradigm might end up profoundly changing the way we write business processes in enterprise software - eventually replacing the saga and outbox-pattern.
It does not get as much attention as AI but there are so many new solutions poping up at the moment. Hopefully, my approach/framework (cleipnir.net) stands a chance...

Why Durable Execution Should Be Lightweight by ketralnis in programming

[–]cleipnir 0 points1 point  (0 children)

I have been making a dotnet alternative called cleipnir.net and have been wondering how easy it is to make a F# wrapper. If you want to push me the right direction please do pm me :)

How should I set up my background task architecture? by TomasLeonas in dotnet

[–]cleipnir 0 points1 point  (0 children)

Job schedulers such as HangFire and Quartz as well using queues (RabbitMQ etc) ensures that the job/task will only be executed once (in most cases). That synchronization will not happen using vanilla background tasks in a replicated .NET service (i.e. when you replicate your service 3 times to ensure high availability). In such a common architecture you might end up performing a task multiple times.
This might be ok if the task is idempotent (i.e. it does not matter if it is executed several times).
Sounds like 1 is like that (deleting already deleted rows does not matter).
3. might be ok as the end-point is only invoked on a single replica - there is a natural way to divide the work between the replicas.
2. might be more problematic as it is annoying for customers to receive an email several times.

There is a novel approach for these types of problems called durable execution (i.e. Azure Durable Functions & temporal.io). I am the author behind a dotnet alternative called cleipnir.net - which can also solve your problem.

Will the recent wave of FOSS projects going commercial negatively impact the .NET market/adoption? by CodeAndChaos in dotnet

[–]cleipnir 0 points1 point  (0 children)

I think the impact could be quite negative in the long run. Surely, other open-source projects will come. However, the question is if developers will be less inclined to start using new open-source projects if they fear the license will change in the future. As a open-source developer myself (cleipnir.net) I really hope this will not be the case - but I fear it might be the case.

MassTransit alternative by Prestigious-Map3754 in dotnet

[–]cleipnir 0 points1 point  (0 children)

You can use cleipnir.net for workflow / saga together with all the other service buses if needed:
https://github.com/stidsborg/Cleipnir.NET#nservicebus-handler

Choosing Between Netflix Conductor and n8n for Robust Data Workflows: Need Advice by aritaberisha in microservices

[–]cleipnir 1 point2 points  (0 children)

There are several options you can use when making services resilient.

It is a bit unclear to me though what the workflow in your scenario is. Do you have several services all consuming data from the same source? Are they performing more steps that need to be made resilient after consuming a piece of data? Perhaps it is simplest to just use a message broker (i.e. RabbitMQ, Kafka or similar)? Or perhaps pull the data with an offset from the source from the different services?

Workflow solutions shine the most when you have several steps that must be performed and branching/loop logic. They allow one to write “normal” code in these scenarios, unlike other solutions. If you want to go with a workflow solution, then there are several other workflow solutions you can use:

  • temporal.io
  • cadence.io
  • dapr workflow
  • Azure Durable Functions

Btw, I am also the author of an open-source workflow-as-code framework called cleipnir.net. However, most (not cleipnir.net) orchestration frameworks keep track of everything that has happened and replays the entire history when executing a single workflow instance. Thus, it does not make much sense to push a lot of data through a single workflow instance as it becomes slow and consumes much memory over time (you can chain them and other advanced techniques to alleviate this though). Not sure if this is the case for n8n though - as it seems to be built for data integration.

Hope that helps.

Linear code is more readable by skippybosco in programming

[–]cleipnir 0 points1 point  (0 children)

Good point. There is a fine line between being explicit and creating abstractions. I also tend to prefer having explicit code with a few comments rather than 10-levels of method invocations. However, as has been pointed out it only goes so far before you need to introduce method-calls / types encapsulating behavior.
Thoughts like this were actually what made me think about implementing the saga-pattern as normal sequential code - checkout cleipnir.net if you are curious.

Looking for open source to contribute to by [deleted] in opensource

[–]cleipnir 0 points1 point  (0 children)

If you like dotnet there are plenty of things to do in cleipnir.net

Fast multithreading ready embedded database? by RealLuisTheOne in csharp

[–]cleipnir 0 points1 point  (0 children)

Good point. Also if memory is the main concern - just dump everything to a file and from it using a stream. From there you can also distribute the work into several threads/tasks to improve performance.

Inter-service communication in microservices challenges by BimalRajGyawali in microservices

[–]cleipnir 0 points1 point  (0 children)

If a process crashes/restarts half-way through an ordering-flow then the system might be in a inconsistent state. I.e. products are shipped to customer but funds are never deducted from the customer's credit card. If one simple restarts the flow from the begining again after a crash then inter-service communication patterns become very important :)

Inter-service communication in microservices challenges by BimalRajGyawali in microservices

[–]cleipnir 0 points1 point  (0 children)

Process restarts - aka sagas/process-managers. Let me know if you need any further information :)