Skip to content

Releases: psibr/REstate

9.3.0 - Improved Natural State Machines with EF Core

17 Apr 17:26
Compare
Choose a tag to compare

This release focuses on querying the current state of a state machine, specifically using a SQL implementation. Previously users would have to illicit information from the state JSON which was computationally expensive at scale. Users can now use the new index to query the current state much more effectively.

Natural State Machines

In order to effectively get state a new computed column has been added and indexed in order to quickly find the state of a given machine.

Unlisting 9.2

Unfortunately the updates that originally put these changes in place in version 9.2 did not address the root cause of the performance problems. The version 9.2 is therefore being unlisted and user using 9.2 would need to run the following script to change the dB in place

DROP INDEX [IX_Machines_SchematicName_NaturalStateName_UpdatedTime] ON [dbo].[Machines]
GO

Update [dbo].[Machines] set [NaturalStateName]= null

CREATE NONCLUSTERED INDEX [IX_Machines_SchematicName_NaturalStateName_UpdatedTime] ON [dbo].[Machines]
(
	[SchematicName] ASC,
	[UpdatedTime] ASC,
	[NaturalStateName] ASC
)
INCLUDE ([MachineId]) 
GO

9.1.0 - Less I/O!

14 Jan 00:47
Compare
Choose a tag to compare

This release focuses on Request-Response path applications as opposed to long-lived contexts as has previously been the focus. In the case of both new optimizations being adopted, users can see a reduction in 2/3rds of the read operations.

GetMachineReference(string machineId)

In request life-cycles a machine must be retrieved before a signal or input/payload can be sent, which requires I/O to ensure the machine exists. This has been mitigated with a new method on IStateEngine that does not require any I/O and is synchronous: GetMachineReference.

This also opens the door to more usage patterns where a machine reference would have been desired to store, but the I/O requirement meant designs had to instead hold a lower component and lazy initialize.

IOptimisticallyConcurrentStateRepository<TState, TInput>

REstate is designed to minimize the possibility of stale writes for State as it's primary responsibility. The issue arises that each data-store handles concurrency differently, some with optimistic some pessimistic, and many have stale read semantics with eventual consistency. In the case of stale reads, this highly increases the chance of hitting a concurrency exception and needing to go through retry cycles. These differences has meant REstate has had to handle the worst case of each possible implementation previously. This is now being addressed with an optional interface IOptimisticallyConcurrentStateRepository<TState, TInput> that a Repository may implement. When implemented, REstate will send its recently loaded state to the repository so that the repository can avoid another read before making an update.

Current Implementations

  • EntityFrameworkCore

Copied from: #61

9.0.0 - Natural Schematics!

11 Jan 04:06
Compare
Choose a tag to compare

🎇

This is a huge release that does introduce a number of small breaking changes to some behavior from 8.0.1, so testing will be required to update.

The big deliverable here is Natural Schematics and StateMachines, this is a model that uses strongly-typed states and interface based actions with AUTOMATIC registration! Docs are pending free time, but the Provisioning System example in the code is a great place to pick up from!

8.0.1

16 Apr 23:10
Compare
Choose a tag to compare

This update relaxes Ninject package versions for the NET45 target to 3.2 instead of 3.3 as was used by NETSTANDARD2.0 #45

8.0.0

16 Apr 23:09
e877eef
Compare
Choose a tag to compare

This release renames some core components of REstate and is considered the LTS tag and version until stated otherwise.

Connector renames:

  • OnEntry => Action
  • Guard => Precondition

7.0.0

04 Apr 04:21
Compare
Choose a tag to compare

🎇

6.1.0

13 Feb 13:25
Compare
Choose a tag to compare

Ninject adapter is now available!

SendAsync calls inside entry actions now change the state returned by the initial SendAsync, this allows tail calls while still informing the caller of what state the machine ended up in.

Added some new ways of registering connectors when they are strongly typed rather than unbound generics.

v6.0

02 Feb 12:06
Compare
Choose a tag to compare

🎇

  • Changed CommitTag Guid to CommitNumber long for sequencing and causal ordering assistance downstream. #34
  • Added REstate.Concurrency.Primitives for Mutex and Semaphores using REstate Machines! #35

v5.0

22 Jan 13:13
Compare
Choose a tag to compare
  • Add retry on state conflict #32
  • Entity Framework Core support #33
  • Bulk create returns the Machines created #33

v4.0

29 Dec 23:56
9542dfe
Compare
Choose a tag to compare
  • Allow for creating Machines with a predefined MachineId #17 #22 #23
  • REstateGrpcServer has a BoundPorts property for discovering which ports were bound when using 0 (pick unassigned) #28
  • Allow multiple instance of REstateHost #18
  • ToString is useful of Machines and Schematics #20