akka / akka-edge-rs

Akka Edge support in Rust
https://doc.akka.io/docs/akka-edge/current/
Other
9 stars 1 forks source link

Introduces persist_event_if #142

Closed huntc closed 9 months ago

huntc commented 9 months ago

I introduced a new persist_event_if effect function to be used where a potential async side effect needs to be performed so that we may construct a persistent event.

In my particular situation, I have a behavior that maintains a synchronized counter and a private key for all edge-based gateways. This counter is required to be incremented and then encrypted along with an entity's stable MAC address, which is a field of the entity state. The result is a value that can be used in a "public address" which does not reveal an underlying stable address.

For more background on how to determine this type of address: https://en.wikipedia.org/wiki/IPv6_address#Stable_privacy_addresses.