  The requirements for OLTP database systems are becoming ever more demanding.
Domains such as finance and computer games increasingly mandate that developers
be able to encode complex application logic and control transaction latencies
in in-memory databases. At the same time, infrastructure engineers in these
domains need to experiment with and deploy OLTP database architectures that
ensure application scalability and maximize resource utilization in modern
machines. In this paper, we propose a relational actor programming model for
in-memory databases as a novel, holistic approach towards fulfilling these
challenging requirements. Conceptually, relational actors, or reactors for
short, are application-defined, isolated logical actors that encapsulate
relations and process function calls asynchronously. Reactors ease reasoning
about correctness by guaranteeing serializability of application-level function
calls. In contrast to classic transactional models, however, reactors allow
developers to take advantage of intra-transaction parallelism and state
encapsulation in their applications to reduce latency and improve locality.
Moreover, reactors enable a new degree of flexibility in database deployment.
We present ReactDB, a system design exposing reactors that allows for flexible
virtualization of database architecture between the extremes of shared-nothing
and shared-everything without changes to application code. Our experiments
illustrate latency control, low overhead, and asynchronicity trade-offs with
ReactDB in OLTP benchmarks.
