Skip to content

Async + Aff support + major optimisations

Compare
Choose a tag to compare
@louthy louthy released this 12 Oct 10:13
· 158 commits to main since this release

This is a big release, which should be treated with some caution - so make sure you have a bit of time to test it before going into a production environment

  • Early indications are that performance is 2.5x better (no formal benchmarks yet though)
  • Processes now use ValueTask internally for first class support of async operations within the setup, inbox, termination, and shutdown functions
    • Processes are now lock free
  • No threads are used if the Process is not processing a message
    • The underlying queues were previously used a pausable-blocking-queue implementation which caused two threads to be held for every Process, and so now we only have a thread alive when the message is being processed.
  • Support for language-ext Aff
    • New 'prelude' in Process<RT> which supports Aff runtimes
    • The underlying IO is not yet fully 'injectable', this will come with a future release
  • There are now 32 'ask actors', these are the Processes that receive an ask request and auto-resolves the response. The new system shards the ask-actor to use by the request ID. This should lead to performance gains for asks.
  • LocalScheduler which was used to send scheduled messages within the app-domain has been rewritten to use Threading.Timer, rather than its own scheduling implementation. This should lead to more accurate scheduling and probably more efficient scheduling
  • RemoteScheduler which schedules persistent messages has been refactored to store all schedulers for a specific process in a single Redis key - this removes the need to call the keys % command in Redis, improvement performance and reliability.
  • Removed dependency on Owin.WebSocket for Echo.Process.Own
  • Improved bootstrapping, for a more deterministic setup of the process system
    • Only the root Process needs bootstrapping, the rest of the system Processes are now regular echo processes, with no 'special' processing
  • Removed the transactionalIO system - this wasn't effective enough, and can probably be replaced by a AST with a bespoke Aff runtime (if necessary).
  • Moved to latest version of language-ext, with use of the new AtomHashMap and improved Atom stability