about summary refs log tree commit diff
path: root/finito-postgres
AgeCommit message (Collapse)AuthorFilesLines
2018-12-13 feat(postgres): Introduce database connection poolVincent Ambo3-10/+44
Adds an r2d2 database connection pool to the backend type. This makes it possible for separate FSMs to run at the same time through the same backend, by retrieving separate connections.
2018-12-13 feat(postgres): Add human-readable Display implementation for errorsVincent Ambo1-3/+30
2018-12-13 feat(postgres): Introduce chained error variantsVincent Ambo2-33/+91
Introduces error variants for external crate errors and internal errors. Additional context can be provided at sites where errors occur using a simple `.context()` call.
2018-12-13 refactor(postgres): Implement FSMBackend trait for FinitoPostgresVincent Ambo1-123/+111
Implements the new backend trait for the FinitoPostgres type which now represents instances of the Postgres backend. This refactoring is not yet fully complete, as some restructuring of the code is in order.
2018-11-19 chore: Fix email address in Cargo filesVincent Ambo1-1/+1
2018-09-26 feat(postgres): Compatibility with new associated error typeVincent Ambo3-13/+26
Changes the implementation of action execution to deal with the returned associated errors. The only sensible constraint on those errors that I could think of for now is `Debug`, meaning that errors are now persisted as debug messages. This is not as nice to work with for a future implementation of retryable actions as the equivalent in Haskell, but maybe an idea shows up underway. The main issue is that most of the common error types will not be implementing Serde traits, so serialization to/from the same error type is difficult. Adding an implementation constraint for JSON serialisation on error types (i.e. `S::Error: Serialize + Deserialize`) would probably cause headaches for users, especially if they are trying to use an out-of-the-box error type or an error type wrapping foreign errors. Det ska'kke være lett ...
2018-09-26 feat(postgres): Implement initial (synchronous) actoin executionVincent Ambo1-25/+127
Implements a simple model for executing actions which will run them in sequence, synchronously, after advancing an FSM and committing the initial transaction. Note that multiple things are not yet taken into account: * Error handling of actions (they can not currently fail) * Retrying of actions * Concurrency model I started out by implementing the concurrency model similarly to the green-threading method used in Hamingja (but using OS threads), but slowly noticed that it may not be the best way to do that. It needs a little bit of discussion. Either way for most actions this method is fast enough to work for implementing things on top of Finito's model.
2018-09-26 test(postgres): Add test for insert_machine and advanceVincent Ambo2-0/+50
Adds a test for the two most important functions in Finito's PostgreSQL backend. These actually require a local Postgres database to be available when running. Currently the connection details are hardcoded in the test.
2018-09-26 fix(postgres): Minor fixes in Postgres queries and handlingVincent Ambo2-3/+9
2018-09-26 refactor(postgres): Minor changes to match actual table schemaVincent Ambo1-7/+10
2018-09-26 feat(postgres): Add initial table schema for Finito tablesVincent Ambo2-0/+41
2018-09-26 docs: Add rustdoc header lines as expected by the formatVincent Ambo1-0/+2
These are rendered in the rustdoc crate overview sidebar.
2018-09-26 feat(postgres): Implement Postgres-backed 'advance' functionVincent Ambo2-14/+73
Transactionally updates a state machine with an incoming event. Note that this does not yet interpret actions.
2018-09-26 feat(postgres): Bootstrap Postgres persistence implementationVincent Ambo3-0/+270
Adds the initial finito-postgres crate with type definitions for the tables and initial functions to interact with persisted FSMs. This is far from feature complete at this commit.