Releases: sers-dev/tyra
Releases · sers-dev/tyra
1.0.0
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.tomlto overwrite config parameters- defaults <
./config/tyra.toml< mutable config overwrite
- defaults <
- removed
RouterMessage<M>- routers now support any user-defined message per default through a generic implementation
- increase internal sleep in
await_shutdownto decrease cpu load
0.8.0
last minor release before 1.0.0
- switch internal actor mailbox to
flumefromcrossbeam-channelcrossbeam-channelis still being used to keep actors thread independent- see github issue #13 for reasoning
- added generic
ActorInitMessagewithout a genericHandlerimplementation- a
Handler<ActorInitMessage>can optionally be implemented by the user for anyactorwhich can then be used to initialize the actor
- a
- update documentation + tests + examples
0.7.0
- actors can now delay message processing by going into a sleep state
- can be achieved through
actor.sleep(duration)on theActorWrapperor by returningActorState::Sleep(duration)from within the actor
- can be achieved through
- 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_poolthat allows user to retrieve how many actors can still be spawned on a given thread_pool - added
ShardedRouterthat will consistently route messages to the targets- added
get_idtoMessagetrait - shards are reset whenever an actor is added/removed to the router
- shard count is equal to the amount of targets times 5
- added
ActorFactory::new_actornow returns a result- result of type error will result in same behavior as a panic
send_afternow returnsResultlikesendandsend_timeout- added
stop_with_codetoActorSystemthat stops the system with a user defined error code - changed
ActorResulttoResult<ActorResult, Box<dyn Error>>and addedon_error()toActortrait
0.6.0
- add error handling
ActorBuilder.spawn()now returns a Result, containing either theActorWrapper<A>or anActorError- added
ActorResultthat is returned by all relevantActorfunctions- configures how the Actor should proceed
- Proper panic handling now in all parts of the
ActorandHandler<M>andActorFactory<A>- panic now triggers
Actor.on_panicproviding the source of panic and allows User to determine how to proceedActor.on_panicis 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 returningActorResult::Restart()inActor.on_paniccan trigger a restart loop that will block the thread untilActorFactory<A>.new_actor()was successful
- panic now triggers
- replaced
RestartPolicywithActorResult
0.5.0
- added
send_aftertoActorWrapper<A>to allow sending of delayed messages- delayed messages are handled through system internal DelayActor
- system internal Actors are running on the
tyraThreadpool. It is not recommended to re-use or re-configure that thread pool in any way
0.4.0
- added
serializeexample - added
router_benchmarkexample - added
bulk_router_benchmarkexample - added
BulkActorMessageandBulkRouterMessage- all implemented Messages
Mautomatically support being sent through aBulkActorMessage<M>wrapper
- all implemented Messages
- env configuration now done with
TYRAprefix instead ofTYRACTOSAUR - 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 ofActorBuilder- will now return an
Option<ActorRef>to the correct actor, even if it was not built by the sameActorBuilderbeforehand, 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
- will now return an
- added
getting_startedexample
0.3.0
0.2.0
0.1.1
0.1.0
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->ActorMessageTrait->ActorMessageActorRef->ActorWrapperActorProps->ActorFactoryActorHandler->Executor
- moved routers from
mod preludetomod router - add documentation
- fixed a bug where
ActorSystem.send_to_address()was not correctly executed - refactor
ActorBuildertoActorBuilder<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
Noneif the ActorAddress exists, but was not created by the same Builder
- creating the same Actor with a Builder twice, will create a single Actor and return the
- stores Actors that have already been created