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::newhas been deprecated, use::defaultinstead.- (Strong)ActorRef's
askmethod 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 anAskinstance, 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_withfunction, which works likeAsk::complete, except that it's async and also takes an async function as a completion function. - Added the new
Completabletrait toKPromise, allowing promises to be fulfilled using the default value of the underlying type by callingpromise.complete(). KFutureis 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
NetworkStatusPortwhich users can subscribe to to receiveNetworkStatusmessages about connectivity changes, and which users may sendNetworkStatusRequestmessages to control the network layer. - Added Blocking to the Networking implementation, users may block/allow a specific
SystemPath,IpAddrorIpNetby sending a message on theNetworkStatusPort - New syntax for the
match_desermacro - Added
SessionIdstructure ( a wrapper forUuid's) associated with network connections. It's added as a field to theNetMessageand allows users to detect possible message loss when the session from a sender has been changed. - Added
Soft Connection LimitandHard Connection Limitwhich 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
ConfigEntrystruct, 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_lifecyclemacro, that works likeignore_lifecyclebut 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/RequiredPortonly has a single type parameter now- All event/message handlers must return a special
Handledstruct 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/ActorStorehas a new API, but I don't expect any external issues with that.
Other Changes
Serialisablemay override theclonedmethod 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
SystemPathandNamedPath. 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_serhas been replaced withActorPath::tell_serialisedwith uses pooled buffersActorRefFactorynow takes an associated type instead of a type parameter- Rename
KompactConfig::schedulertoKompactConfig::executorand add a newKompactConfig::schedulerfunction that actually takesSchedulerinstances - Within components only a limited version of
KompactSystemis exposed, to avoid people using blocking APIs from within Kompact threads. NetMessagehas new API that makes it easier to use thesenderandreceiverfields- The function
Fulfillable::fulfillhas been renamed tofulfilto 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_uuidis 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 SystemFieldis now a public trait- Switched to external timer crate
- Component panics are now downcast if possible for better error messages
ActorPathnow supports forwardingNetMessagewithout 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_sermethod onActorPath. - Component macros now generate implementations for
ProvideRefandRequireReftraits, which allow easier component connection, for example viabiconnect_componentsor viaconnect_to_provided/connect_to_required. - Support for a narrower version of
ActorRefcalled aRecipient, which auto-boxes messages into the type expected by the receiving actor. - A
wait_expectmethod onFutureto avoid thewait_timeout -> expect -> expectsequence 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_pinningfeature. - A new trait
NetworkActorthat can be used to conveniently implement actors that handle the same set of messages from remote and local source (i.e., viaActorReforActorPath). ComponentContextnow 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
KompactSystemcan now fail, which is accounted for by returning aResultinstead of the raw system KompactSystemno longer implementsDefault. UseKompactConfig::default().build()instead.- Allow network to bind on random port properly (use
<IP>:0asSocketAddrto request this behaviour). - Failing to bind on a port will now cause the
NetworkDispatcherto fail starting and thus poison theKompactSystemas described above. - Changed remaining Kompics references to Kompact.
- Users must change all references to
KompicsConfigandKompicsSystemtoKompactConfigandKompactSystemrespectively.
- Users must change all references to