Skip to content

Releases: sers-dev/tyra

1.0.0

02 Oct 17:44
d8d3b4c
Compare
Choose a tag to compare

After a lot of testing and preparing, tyra can finally be called ready for production. As a result we're happy to finally announce the 1.0.0 release after roughly 1 1/2 years of development.

  • added LeastMessageRouter
  • config now supports loading optional file ./config/tyra.toml to overwrite config parameters
    • defaults < ./config/tyra.toml < mutable config overwrite
  • removed RouterMessage<M>
    • routers now support any user-defined message per default through a generic implementation
  • increase internal sleep in await_shutdown to decrease cpu load

0.8.0

26 Sep 11:49
Compare
Choose a tag to compare

last minor release before 1.0.0

  • switch internal actor mailbox to flume from crossbeam-channel
    • crossbeam-channel is still being used to keep actors thread independent
    • see github issue #13 for reasoning
  • added generic ActorInitMessage without a generic Handler implementation
    • a Handler<ActorInitMessage> can optionally be implemented by the user for any actor which can then be used to initialize the actor
  • update documentation + tests + examples

0.7.0

13 Sep 23:37
Compare
Choose a tag to compare
  • actors can now delay message processing by going into a sleep state
    • can be achieved through actor.sleep(duration) on the ActorWrapper or by returning ActorState::Sleep(duration) from within the actor
  • fixed a bug where an actor with a limited mailbox can get stuck on shutdown
  • added send_timeout()
  • added return Result<(), ActorSendError> to message sending functions
  • actually enforce configured actor limits per thread_pool
  • added get_available_actor_count_for_pool that allows user to retrieve how many actors can still be spawned on a given thread_pool
  • added ShardedRouter that will consistently route messages to the targets
    • added get_id to Message trait
    • shards are reset whenever an actor is added/removed to the router
    • shard count is equal to the amount of targets times 5
  • ActorFactory::new_actor now returns a result
    • result of type error will result in same behavior as a panic
  • send_after now returns Result like send and send_timeout
  • added stop_with_code to ActorSystem that stops the system with a user defined error code
  • changed ActorResult to Result<ActorResult, Box<dyn Error>> and added on_error() to Actor trait

0.6.0

20 Aug 11:28
Compare
Choose a tag to compare
  • add error handling
    • ActorBuilder.spawn() now returns a Result, containing either the ActorWrapper<A> or an ActorError
    • added ActorResult that is returned by all relevant Actor functions
      • configures how the Actor should proceed
    • Proper panic handling now in all parts of the Actor and Handler<M> and ActorFactory<A>
      • panic now triggers Actor.on_panic providing the source of panic and allows User to determine how to proceed
        • Actor.on_panic is allowed to panic once and will be re-triggered in that case. If another panic happens in the retry, the Actor will be stopped
      • handling a panic within ActorFactory<A>.new_actor() by returning ActorResult::Restart() in Actor.on_panic can trigger a restart loop that will block the thread until ActorFactory<A>.new_actor() was successful
  • replaced RestartPolicy with ActorResult

0.5.0

31 Jul 23:39
Compare
Choose a tag to compare
  • added send_after to ActorWrapper<A> to allow sending of delayed messages
    • delayed messages are handled through system internal DelayActor
    • system internal Actors are running on the tyra Threadpool. It is not recommended to re-use or re-configure that thread pool in any way

0.4.0

31 Jul 16:50
2b80000
Compare
Choose a tag to compare
  • added serialize example
  • added router_benchmark example
  • added bulk_router_benchmark example
  • added BulkActorMessage and BulkRouterMessage
    • all implemented Messages M automatically support being sent through a BulkActorMessage<M> wrapper
  • env configuration now done with TYRA prefix instead of TYRACTOSAUR
  • fix serialized message handling
    • SerializedMessages are now properly sent through the mailbox and will follow same rules as any other message
    • serialized messages are now handled by the exact same object as any other message instead of a copy
  • reworked spawn() behavior of ActorBuilder
    • will now return an Option<ActorRef> to the correct actor, even if it was not built by the same ActorBuilder beforehand, as long as the type matches
    • returns None only if the type of the Actor does not match the expected Actor type of the ActorBuilder
  • added getting_started example

0.3.0

09 Oct 10:40
f4aeed9
Compare
Choose a tag to compare
  • renamed to tyra
    • equal to tyractorsaur release 0.2.0
    • all releases before 0.2.0 will still be available as tyractorsaur, but will not be migrated to tyra
    • all releases after this one will only be available as tyra

0.2.0

09 Oct 10:29
Compare
Choose a tag to compare
  • add documentation link to metadata
  • update dependencies
    • upgrade config to 0.11.0
    • remove explicit lexical-core, since documentation should now be able to be generated without it

0.1.1

17 May 09:45
Compare
Choose a tag to compare
  • pin lexical-core to 0.7.6 to fix doc generation on nightlyfor docs.rs

0.1.0

17 May 09:24
Compare
Choose a tag to compare

All releases before this one set the groundwork for the actor framework and can be considered as Alpha releases.
Starting with this release the framework can be considered to be in Beta, which is why the most changes between 0.1.0 and 0.0.8 consist of refactoring, documentation and API cleanup.

Although a lot of work went into Refactoring of the public facing API, please do not yet consider the current API to be stable and expect some slight changes throughout the next Releases

  • cleanup
  • refactoring
  • the following User facing resources have been renamed:
    • ActorTrait -> Actor
    • MessageTrait -> ActorMessage
    • ActorRef -> ActorWrapper
    • ActorProps -> ActorFactory
    • ActorHandler -> Executor
  • moved routers from mod prelude to mod router
  • add documentation
  • fixed a bug where ActorSystem.send_to_address() was not correctly executed
  • refactor ActorBuilder to ActorBuilder<A>
    • stores Actors that have already been created
      • creating the same Actor with a Builder twice, will create a single Actor and return the ActorWrapper<A> for both
      • returns None if the ActorAddress exists, but was not created by the same Builder