Skip to content

Instantly share code, notes, and snippets.

View Horusiath's full-sized avatar

Bartosz Sypytkowski Horusiath

View GitHub Profile
@Horusiath
Horusiath / gist:bd00d33a130e4add2491
Created April 3, 2015 15:23
At least once delivery snapshoting desync
import akka.persistence.AtLeastOnceDelivery.AtLeastOnceDeliverySnapshot
import akka.persistence.{SnapshotOffer, PersistentActor, AtLeastOnceDelivery}
import akka.actor.{Props, ActorSystem, ActorPath, Actor}
case class Message(data: String)
case class Confirmable(deliveryId: Long, data: String)
case class Confirmation(deliveryId: Long)
case class Snap(snapshot: AtLeastOnceDeliverySnapshot)
class ExampleAtLeastOnceDeliveryActor(val deliveryPath: ActorPath) extends PersistentActor with AtLeastOnceDelivery {
@Horusiath
Horusiath / gist:36ab3ef3f1989f8b46ce
Created July 6, 2014 17:24
F#/C# OO syntax comparison
// class inheritance - C#
public abstract class Ancestor {}
public class Descendant: Ancestor, IDisposable
{
public void Dispose() {}
public virtual void MyVirt() {}
}
// class inheritance - F#