SearcharxivSearch

arXiv subjects

Dan Plyukhin

Publications and source records attributed to Dan Plyukhin.

7 recordsLinked to original sources

Accompanist: A Runtime for Resilient Choreographic Programming

In service-oriented architecture, services coordinate in one of two ways: directly, using point-to-point communication, or indirectly, through an intermediary called the orchestrator. Orchestrators tend to be more popular because their local state is a 'single source of truth' for the status of ongoing workflows, which simplifies fault recovery and rollback for distributed transactions that use the 'saga' pattern. But orchestration is not always an option because of hardware constraints and security policies. Without a central orchestrator, resilient saga transactions are hard to implement correctly. A natural idea is to use choreographic programming, a paradigm that brings the 'global view' of orchestrators to a decentralised setting. Unfortunately, choreographic programming relies on strong assumptions about network reliability and service uptime that often do not hold. Recent work weakens some of these assumptions with 'failure-aware' language features, but these features make programs more complex. We propose a complementary approach: to co-design the programming interface with a customizable runtime that can replay computation to mask faults. Our approach keeps programs simple, does not require modifying the compiler, and lends itself to a clean separation of concerns in formal proofs. We present Accompanist, a resilient runtime for the Choral choreographic programming language. With Accompanist, programmers can implement decentralised saga transactions as choreographic programs and deploy the compiled code to 'sidecars' that run alongside services in a pre-existing codebase. Our key assumptions are that choreographic programs should be deterministic, transactions within a saga should be idempotent, and messages should be written to a durable message queue. Based on these assumptions, we present a formal model and prove that target code is correct-by-construction.

cs.PL

Ozone: Fully Out-of-Order Choreographies

Choreographic programming is a paradigm for writing distributed applications. It allows programmers to write a single program, called a choreography, that can be compiled to generate correct implementations of each process in the application. Although choreographies provide good static guarantees, they can exhibit high latency when messages or processes are delayed. This is because processes in a choreography typically execute in a fixed, deterministic order, and cannot adapt to the order that messages arrive at runtime. In non-choreographic code, programmers can address this problem by allowing processes to execute out of order -- for instance by using futures or reactive programming. However, in choreographic code, out-of-order process execution can lead to serious and subtle bugs, called communication integrity violations (CIVs). In this paper, we develop a model of choreographic programming for out-of-order processes that guarantees absence of CIVs and deadlocks. As an application of our approach, we also introduce an API for safe non-blocking communication via futures in the choreographic programming language Choral. The API allows processes to execute out of order, participate in multiple choreographies concurrently, and to handle unordered data messages. We provide an illustrative evaluation of our API, showing that out-of-order execution can reduce latency and increase throughput by overlapping communication with computation.

cs.PL

A Scalable Algorithm for Decentralized Actor Termination Detection

Automatic garbage collection (GC) prevents certain kinds of bugs and reduces programming overhead. GC techniques for sequential programs are based on reachability analysis. However, testing reachability from a root set is inadequate for determining whether an actor is garbage: Observe that an unreachable actor may send a message to a reachable actor. Instead, it is sufficient to check termination (sometimes also called quiescence): an actor is terminated if it is not currently processing a message and cannot receive a message in the future. Moreover, many actor frameworks provide all actors with access to file I/O or external storage; without inspecting an actor's internal code, it is necessary to check that the actor has terminated to ensure that it may be garbage collected in these frameworks. Previous algorithms to detect actor garbage require coordination mechanisms such as causal message delivery or nonlocal monitoring of actors for mutation. Such coordination mechanisms adversely affect concurrency and are therefore expensive in distributed systems. We present a low-overhead deferred reference listing technique (called DRL) for termination detection in actor systems. DRL is based on asynchronous local snapshots and message-passing between actors. This enables a decentralized implementation and transient network partition tolerance. The paper provides a formal description of DRL, shows that all actors identified as garbage have indeed terminated (safety), and that all terminated actors--under certain reasonable assumptions--will eventually be identified (liveness).

cs.LO

Scalable Termination Detection for Distributed Actor Systems

Automatic garbage collection (GC) prevents certain kinds of bugs and reduces programming overhead. GC techniques for sequential programs are based on reachability analysis. However, testing reachability from a root set is inadequate for determining whether an actor is garbage because an unreachable actor may send a message to a reachable actor. Instead, it is sufficient to check termination (sometimes also called quiescence): an actor is terminated if it is not currently processing a message and cannot receive a message in the future. Moreover, many actor frameworks provide all actors with access to file I/O or external storage; without inspecting an actor's internal code, it is necessary to check that the actor has terminated to ensure that it may be garbage collected in these frameworks. Previous algorithms to detect actor garbage require coordination mechanisms such as causal message delivery or nonlocal monitoring of actors for mutation. Such coordination mechanisms adversely affect concurrency and are therefore expensive in distributed systems. We present a low-overhead reference listing technique (called DRL) for termination detection in actor systems. DRL is based on asynchronous local snapshots and message-passing between actors. This enables a decentralized implementation and transient network partition tolerance. The paper provides a formal description of DRL, shows that all actors identified as garbage have indeed terminated (safety), and that all terminated actors--under certain reasonable assumptions--will eventually be identified (liveness).

cs.LO

Random walks on uniform and non-uniform combs and brushes

We consider random walks on comb- and brush-like graphs consisting of a base (of fractal dimension $D$) decorated with attached side-groups. The graphs are also characterized by the fractal dimension $D_a$ of a set of anchor points where side-groups are attached to the base. Two types of graphs are considered. Graphs of the first type are uniform in the sense that anchor points are distributed periodically over the base, and thus form a subset of the base with dimension $D_a=D$. Graphs of the second type are decorated with side-groups in a regular yet non-uniform way: the set of anchor points has fractal dimension smaller than that of the base, $D_a 1$) and numerically tested for the Sierpinski brush (with the base and anchor set built on the same Sierpinski gasket). As an example of nonuniform graphs we consider the Cantor comb composed of a one-dimensional base and side-groups, the latter attached to the former at anchor points forming the Cantor set. A peculiar feature of this and other nonuniform systems is a long-lived regime of super-diffusive transport when side-groups are of a finite size.

cond-mat.stat-mech

Random walks with fractally correlated traps: Stretched exponential and power law survival kinetics

We consider the survival probability $f(t)$ of a random walk with a constant hopping rate $w$ on a host lattice of fractal dimension $d$ and spectral dimension $d_s\le 2$, with spatially correlated traps. The traps form a sublattice with fractal dimension $d_a w$, including the limit of perfect traps $w_a\to \infty$, the stretched exponential regime is absent and the decay of $f(t)$ follows, after a short transient, the aforementioned power law for all times.

cond-mat.stat-mech

Correlations of correlations: Secondary autocorrelations in finite harmonic systems

The momentum or velocity autocorrelation function C(t) for a tagged oscillator in a finite harmonic system decays like that of an infinite system for short times, but exhibits erratic behavior at longer time scales. We introduce the autocorrelation function of the long-time noisy tail of C(t) ("a correlation of the correlation"), which characterizes the distribution of recurrence times. Remarkably, for harmonic systems with same-mass particles this secondary correlation may coincide with the primary correlation C(t) (when both functions are normalized) either exactly, or over a significant initial time interval. When the tagged particle is heavier than the rest, the equality does not hold, correlations shows non-random long-time scale pattern, and higher order correlations converge to the lowest normal mode.

cond-mat.stat-mech