Package

com.github.trex_paxos

internals

Permalink

package internals

Visibility
  1. Public
  2. All

Type Members

  1. trait AkkaLoggingAdapter extends PaxosLogging

    Permalink
  2. case class CommittedMembership(slot: Long, membership: Membership) extends Product with Serializable

    Permalink

    A membership becomes committed at a slot index and a client can state the slot it last knew the membership.

    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.

    slot

    The log index at which the membership was committed.

    membership

    The cluster membership.

  3. class MapDBStore extends Journal with TrexMembership with Closeable

    Permalink

    A MapDB storage engine.

    A MapDB storage engine. Note that you must call close on the file for a clean shutdown.

  4. sealed trait MemberStatus extends AnyRef

    Permalink
  5. case class MembershipCommandValue(msgId: Long, membership: Membership) extends CommandValue with Product with Serializable

    Permalink

  6. case class MembershipQuery(slot: Long) extends Product with Serializable

    Permalink

    Used to poll for membership change.

    Used to poll for membership change. If the membership has changed since the

  7. sealed trait OptimizableReadOnlyWork extends AnyRef

    Permalink

    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.

  8. case class OutdatableReadWork(raw: AnyRef) extends OptimizableReadOnlyWork with Product with Serializable

    Permalink

    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.

    raw

    The actual raw client command which is opaque to Trex.

  9. abstract class PaxosActor extends PaxosActorNoTimeout

    Permalink

    This class reschedules a random interval CheckTimeout used to timeout on responses and an evenly spaced Paxos.HeartBeat which is used by a leader.

  10. abstract class PaxosActorNoTimeout extends Actor with PaxosIO with ActorLogging with AkkaLoggingAdapter

    Permalink

    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.

  11. case class PaxosProperties(leaderTimeoutMin: Long, leaderTimeoutMax: Long) extends Product with Serializable

    Permalink
  12. sealed trait ReadOnlyCommand extends CommandValue

    Permalink

    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.

  13. case class StrongReadWork(raw: AnyRef) extends OptimizableReadOnlyWork with Product with Serializable

    Permalink

    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.

    raw

    The actual raw client command which is opaque to Trex.

  14. case class TimelineReadWork(raw: AnyRef) extends OptimizableReadOnlyWork with Product with Serializable

    Permalink

    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.

    raw

    The actual raw client command which is opaque to Trex.

Value Members

  1. object Accepting extends MemberStatus with Product with Serializable

    Permalink
  2. object Departed extends MemberStatus with Product with Serializable

    Permalink
  3. object Learning extends MemberStatus with Product with Serializable

    Permalink
  4. object Member extends Serializable

    Permalink
  5. object MemberStatus

    Permalink
  6. object PaxosActor

    Permalink
  7. object PaxosProperties extends Serializable

    Permalink
  8. object Pickle extends LazyLogging

    Permalink

    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.

Ungrouped