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.toml
to 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_shutdown
to decrease cpu load
0.8.0
last minor release before 1.0.0
- switch internal actor mailbox to
flume
fromcrossbeam-channel
crossbeam-channel
is still being used to keep actors thread independent- see github issue #13 for reasoning
- added generic
ActorInitMessage
without a genericHandler
implementation- a
Handler<ActorInitMessage>
can optionally be implemented by the user for anyactor
which 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 theActorWrapper
or 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_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
toMessage
trait - 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_actor
now returns a result- result of type error will result in same behavior as a panic
send_after
now returnsResult
likesend
andsend_timeout
- added
stop_with_code
toActorSystem
that stops the system with a user defined error code - changed
ActorResult
toResult<ActorResult, Box<dyn Error>>
and addedon_error()
toActor
trait
0.6.0
- add error handling
ActorBuilder.spawn()
now returns a Result, containing either theActorWrapper<A>
or anActorError
- added
ActorResult
that is returned by all relevantActor
functions- configures how the Actor should proceed
- Proper panic handling now in all parts of the
Actor
andHandler<M>
andActorFactory<A>
- panic now triggers
Actor.on_panic
providing the source of panic and allows User to determine how to proceedActor.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 returningActorResult::Restart()
inActor.on_panic
can trigger a restart loop that will block the thread untilActorFactory<A>.new_actor()
was successful
- panic now triggers
- replaced
RestartPolicy
withActorResult
0.5.0
- added
send_after
toActorWrapper<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
- added
serialize
example - added
router_benchmark
example - added
bulk_router_benchmark
example - added
BulkActorMessage
andBulkRouterMessage
- all implemented Messages
M
automatically support being sent through aBulkActorMessage<M>
wrapper
- all implemented Messages
- env configuration now done with
TYRA
prefix 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 sameActorBuilder
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
- will now return an
- added
getting_started
example
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
->Actor
MessageTrait
->ActorMessage
ActorRef
->ActorWrapper
ActorProps
->ActorFactory
ActorHandler
->Executor
- moved routers from
mod prelude
tomod router
- add documentation
- fixed a bug where
ActorSystem.send_to_address()
was not correctly executed - refactor
ActorBuilder
toActorBuilder<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
- creating the same Actor with a Builder twice, will create a single Actor and return the
- stores Actors that have already been created