A membership becomes committed at a slot index and a client can state the slot it last knew the membership.
A MapDB storage engine.
A MapDB storage engine. Note that you must call close on the file for a clean shutdown.
Used to poll for membership change.
Used to poll for membership change. If the membership has changed since the
Placeholder currently not implemented.
Placeholder currently not implemented.
There are a number of optimisations that are possible with read-only work. These trade consistency for speed and scalability; possibly even offloading the read to a follower. These case classes let you wrap your work in case classes that tag the work as optimisable. Whether the work is optimised, and how, will depend on the current feature set and current configuration of trex.
Placeholder currently not implemented.
Placeholder currently not implemented.
An Outdated
read is read work which is safe to read directly from a replica. No special effort is made to order
the read with respect to pending writes going via the leader. Depending on the replication lag of the follower and
possible network partitions the value read may be very stale. Semantically such reads are equivalent to reading from
a cache which that has a timeout equal to the leader timeout off the followers in the cluster.
This case class marks client work as safe to stale cached reads such that it is eligible to be optimised as a single read if the cluster is configured to allow that.
The actual raw client command which is opaque to Trex.
This class reschedules a random interval CheckTimeout used to timeout on responses and an evenly spaced Paxos.HeartBeat which is used by a leader.
Note that for testing this class does not schedule and manage its own timeouts.
Note that for testing this class does not schedule and manage its own timeouts. Use the subclass which schedules its timeout rather than this baseclass.
Placeholder currently not implemented.
Placeholder currently not implemented.
Marking traffic as read-only allows for optimisation such as not forcing disk flushes and reading from replicas.
Placeholder currently not implemented.
Placeholder currently not implemented.
A Strong
read is a read of committed work which is always strongly ordered with respect to writes. This requires
the leader to assign an order to reads and writes upon arrive, then only run the reads when it learns that all
preceeding writes have been chosen. It then must return the results in the same order.
The actual raw client command which is opaque to Trex.
Placeholder currently not implemented.
Placeholder currently not implemented.
A Timeline
read is a read of committed work where a single thread (a single timeline) will see it's own writes but
its reads may see stale (cached) reads with respect to write made on separate timelines (other client processes or
other threads in the same process).
This case class marks client work as safe to stale cached reads such that it is eligible to be optimised as a single read if the cluster is configured to allow the optimisation.
The actual raw client command which is opaque to Trex.
Binary pickling.
Binary pickling. I did try scala pickling but had all sorts of runtime problems including jvm crashes. Note that RetransmitResponse could be big so in the future we might send a handle and have the responder connect back and stream it one accept over time over TCP.
A membership becomes committed at a slot index and a client can state the slot it last knew the membership. A server in the cluster can then know if it is stale and reply with the latest membership.
The log index at which the membership was committed.
The cluster membership.