Releases: kompics/kompact
Releases · kompics/kompact
Release Kompact 0.11.3
Changes
- Update all dependencies.
- Removed the dependency on the bitfields crate (https://github.com/johanmickos/bitfields-rs) by inlining it, as requested in #204 by the owner @johanmickos.
- Updated the nightly we use for rustfmt and clippy.
- Removed some dead code and applied clippy lints for newer APIs.
Kompact v0.11.2
Dependency Updates
Updated all dependencies to newest versions.
Of particular note is the protobuf
update from 2.x to 3.x, which removes our dependency on protoc
for tests.
Kompact v0.11.1
Dependency Updates
Updated all dependencies to newest versions.
Of particular note is the uuid
update from 0.8 to 1.3, which is public faces and may lead to compilation issues when two different uuid
versions are in scope.
Kompact v0.11.0
Main Changes
- Added support for disconnecting channels
KompactConfig::new
has been deprecated, use::default
instead.- (Strong)ActorRef's
ask
method has been renamed toask_with
- A new ask method has been introduced, which is only available on reference with message type
Ask<_, _>
. This method takes the request value directly and creates anAsk
instance, without using a function to map in the promise. Since this is the most common case, it seemed sensible to have the minimal API for the common case. - Added
Ask::complete_with
function, which works likeAsk::complete
, except that it's async and also takes an async function as a completion function. - Added the new
Completable
trait toKPromise
, allowing promises to be fulfilled using the default value of the underlying type by callingpromise.complete()
. KFuture
is nowmust_use
, which may break dependencies denying warnings during compilation.- Removed panics from places where they shouldn't be
- Various bug fixes, docs improvements and error message improvements.
Dependencies
- Bytes dependency bumped to 1.0
- Wheel Timer bumped to 1.1
Networking Layer Changes
- The NetworkDispatcher now detects panics in the NetworkThread spawns a new NetworkThread in such cases.
- The NetworkThread no longer panics if it runs out of buffers, instead connections will be dropped after some number of retries if there are no buffers available.
- Lazy serialisation is now performed by the NetworkThread rather than the NetworkDispatcher.
- Added the
NetworkStatusPort
which users can subscribe to to receiveNetworkStatus
messages about connectivity changes, and which users may sendNetworkStatusRequest
messages to control the network layer. - Added Blocking to the Networking implementation, users may block/allow a specific
SystemPath
,IpAddr
orIpNet
by sending a message on theNetworkStatusPort
- New syntax for the
match_deser
macro - Added
SessionId
structure ( a wrapper forUuid
's) associated with network connections. It's added as a field to theNetMessage
and allows users to detect possible message loss when the session from a sender has been changed. - Added
Soft Connection Limit
andHard Connection Limit
which limits the number of concurrent network connections. The hard limit limits the absolute number of connections in any state while the soft limit limits the number of active connections.
Kompact Devevelopement changes
- Various testing and CI improvements.
- There is a new config module which contains (primarily) the
ConfigEntry
struct, as well as a macrokompact_config!()
used to conveniently generate the entries as well as rustdoc for them.
Kompact 0.10.1
Small bugfix release for rust nightly >2020-10-29 including the needed feature flag changes.
Other Changes
- Added an
info_lifecycle
macro, that works likeignore_lifecycle
but with INFO level output.
Kompact 0.10.0
Features
- Async/Await Support
- UDP networking support
- Network Buffers can now be configured using
BufferConfig
- Support for custom component recovery handlers
- Buffer chunks can now be chained, allowing essentially arbitrary sized messages to be serialised (limited by the buffer pool configuration and system memory, of course)
- Explicit and implicit routing for incoming messages on named paths has been implemented
- Type Erased Components (nightly-only, feature gated)
Breaking Changes
ProvidedPort
/RequiredPort
only has a single type parameter now- All event/message handlers must return a special
Handled
struct now. Normally that should simply beHandled::Ok
. - Within serialisers the
buf.bytes()
method does not necessarily return the complete slice anymore. This in accordance with the interface specification, but differs from previous behaviour. - Serialisers must now implement
TryClone
, as cloning the serialiser is sometimes necessary. Since most are stateless, they can fulfil this requirement by simply derivingClone
. - Named actor paths are now added correctly into the store, which may cause some runtime issues for users of path hierarchies. This is technically a bug fix, though, as paths were always meant to be added split by / and not as a single blob.
ActorLookup
/ActorStore
has a new API, but I don't expect any external issues with that.
Other Changes
Serialisable
may override thecloned
method to avoid the broadcast policy having to serialise an otherwise local and cloneable structure.- The same goes for
Serialiser::try_clone_data
. - To preserve my sanity while testing, I added a few convenience methods for constructing named actor paths to
SystemPath
andNamedPath
. In particular you can now use something likepath / "new-child" / '*'
to extend a named path. - Nagle's algorithm can now be configured in the
NetworkConfig
And many other changes...too many to list, really. This has become quite a large release.
Kompact 0.9.0
Breaking Changes
ActorPath::tell_ser
has been replaced withActorPath::tell_serialised
with uses pooled buffersActorRefFactory
now takes an associated type instead of a type parameter- Rename
KompactConfig::scheduler
toKompactConfig::executor
and add a newKompactConfig::scheduler
function that actually takesScheduler
instances - Within components only a limited version of
KompactSystem
is exposed, to avoid people using blocking APIs from within Kompact threads. NetMessage
has new API that makes it easier to use thesender
andreceiver
fields- The function
Fulfillable::fulfill
has been renamed tofulfil
to be consistent with BE usage
Other Changes
- Add Eq to ControlEvent
- Removed dependency on Tokio
- Network buffers are now pooled and reused to avoid allocations
- Add API docs for everything public
- There's now a Hocon based system config API
- There is now a tutorial for Kompact
- Kompact now runs on stable Rust
ScheduledTimer::from_uuid
is now a public API- Actor paths can now be registered from within components using a message-based API instead of a future-based one
- Named actor paths can now be reregistered using
update_alias_registration
SystemField
is now a public trait- Switched to external timer crate
- Component panics are now downcast if possible for better error messages
ActorPath
now supports forwardingNetMessage
without deserialising first
Kompact 0.8.1
A small maintenance release with some dependency updates (fixing a threadpool bug) and improved re-exports, as well as less output in release builds.
Kompact 0.8.0
Breaking Changes
- Local actor communication (i.e., via
ActorRef
) is now statically typed. - Local actor communication does not include implicit sender references anymore.
Other Changes
- A new macro
match_deser!
that makes handling network messages more convenient. - Support for eager (on the sending actor) message serialisation via the
tell_ser
method onActorPath
. - Component macros now generate implementations for
ProvideRef
andRequireRef
traits, which allow easier component connection, for example viabiconnect_components
or viaconnect_to_provided
/connect_to_required
. - Support for a narrower version of
ActorRef
called aRecipient
, which auto-boxes messages into the type expected by the receiving actor. - A
wait_expect
method onFuture
to avoid thewait_timeout -> expect -> expect
sequence during actor registration. - Support for running components on dedicated threads, instead of the shared threadpool. Dedicated component can optionally be pinned to CPU cores with the
thread_pinning
feature. - A new trait
NetworkActor
that can be used to conveniently implement actors that handle the same set of messages from remote and local source (i.e., viaActorRef
orActorPath
). ComponentContext
now has a methodsuicide()
, allowing it to shut itself down.
Kompact 0.6.0
Breaking Changes
- Added some fault handling
- The supervisor will deallocate faulty components (or at least release its
Arc
) - If the fault happens at a system component, the whole system will be poisoned
- Components will now execute lifecycle handlers before informing the supervisor (so that a component that panics during its start handler is never considered active by the supervisor)
- The supervisor will deallocate faulty components (or at least release its
- Creating a
KompactSystem
can now fail, which is accounted for by returning aResult
instead of the raw system KompactSystem
no longer implementsDefault
. UseKompactConfig::default().build()
instead.- Allow network to bind on random port properly (use
<IP>:0
asSocketAddr
to request this behaviour). - Failing to bind on a port will now cause the
NetworkDispatcher
to fail starting and thus poison theKompactSystem
as described above. - Changed remaining Kompics references to Kompact.
- Users must change all references to
KompicsConfig
andKompicsSystem
toKompactConfig
andKompactSystem
respectively.
- Users must change all references to