Skip to content

Releases: aljoscha/statefun-rust

v0.2.0-alpha

03 Jul 04:18
c25b8d6

Choose a tag to compare

v0.2.0-alpha Pre-release
Pre-release

This release includes support for v3.2.0 of Apache Statefun.

The list of changes:

  • The main API is still protocol buffers. However the internal payloads (client-defined types) are no longer protocol buffers. Instead they are tagged values called TypedValue (itself a protobuf message type). This allows the client code to pick its own serialization frameworks, and even use different serialization formats for different structures. It's up to the client code to pick what they want. This is explained in detail here.
  • v3.x supports cross-language unification of primitive types. This means that for primitive types like int, float, string, etc, they are all serialized in the same way, making them cross-language compatible. Again see here for more details. More specifically, these types are serialized with Protocol buffers, see serialization.rs in this repo how this is done.
  • Any user-defined types which are expected to be passed over the wire must implement two traits: Serializable, and TypeName. Serializable defines how the type should be serialized, whereas TypeName encodes the full name of the type, which could for example be example.io.truweb/my-type.
  • Added support for TTL for state values. Function's state can be set to never expire, or to expire after a certain number of time. When set to AfterInvoke, expiration time begins to count after last read or write, when set to AfterWrite, expiration time begins to count after the initial create or the last write.
  • Added support for cancellation of delayed invocations by associating delayed invocations with cancellation tokens.

Additional changes include:

  • Refactored the library and moved everything into its own module. Previously a lot of the code lived in lib.rs. There's still some usages of private fields within the library, as a workaround I'm using pub (crate) -- but we should probably implement getters here.
  • Now contains 3 examples, one is based on the playground example and uses their own docker image. While the existing kafka example in the SDK has been ported to work with the new SDK. I've also added a separate example demonstrating delayed invocation, cancellation of delayed invocation, and state expiry.

For an intro to v3 changes see these release notes:

Newer minor changes since v3 include:

Statefun Rust SDK v0.1.1

08 Jul 08:27
301584b

Choose a tag to compare

This only fixes one bug.

Fixes

  • sdk: Make state updates available in subsequent invocations and coalesce state (#1)

Statefun Rust SDK v0.1.0

08 Jul 08:25
7dc58b3

Choose a tag to compare

Pre-release

Initial release.