Welcome to the winter 2023 edition of CSE290S (“Distributed Software Systems: Global-First and Local-First Perspectives”), a graduate seminar course in the Computer Science and Engineering Department at the UC Santa Cruz Baskin School of Engineering. This course will cover emerging topics in distributed software systems, organized into two themes: global-first and local-first.

Part I: Global First!

In the global-first part of the course, we’ll study multitier programming and choreographic programming – distributed programming paradigms in which a single, unified program expresses the behavior of multiple participants. We call this approach “global-first” because in multitier and choreographic programming, one begins by considering the behavior of an entire system rather than the behavior of individual participants. While various approaches to distributed programming purport to “let you think about your application as a single program that happens to run on multiple machines, rather than a collection of programs running on different machines that talk to one another”, global-first programming takes this point of view to the extreme: in global-first programming, you have no choice but to think of your application as a single program.

Our exploration of the multitier and choreographic programming research literature will include pioneering work, such as the Links programming language from the mid-2000s, as well as recent work such as the Pirouette language. As we read these papers, we’ll consider the strengths and weaknesses of a global-first approach. For example, a strength of choreographic programming is “deadlock-freedom-by-design”: because communication between participants can only be expressed by a single language construct (which compiles to a message send on one participant and a receive on another), it is impossible for the resulting collection of programs to contain a mismatched send and receive. On the other hand, much work on choreographic programming assumes that communication must be instantaneous, synchronous, and lossless. Can the promise of deadlock-freedom-by-design actually be realized on an asynchronous Internet where “everything fails all the time”? Furthermore, does a global-first approach make sense for applications where we may not know in advance how all participants in an execution will behave or how they should interact?

Part II: Local First!

In seeming contrast to multitier and choreographic programming is the notion of “local-first” software, in which network connections are expected to be intermittent, different participants may be running different versions of an application, and individuals operate autonomously with a minimum of centralization and coordination. The local-first ethos also emphasizes user agency, privacy, security, and long-term preservation of data, and we hope to honor these principles in our study of local-first software – while resisting techno-utopianism and longtermism.

In this part of the course, we will aim at developing an understanding of what local-first software means in terms of technical requirements, especially from a languages and systems perspective. Local-first software should work when a network connection is absent or intermittent, and after reconnecting, there should be a way to resolve Alice’s edits against the edits made by Bob and Carol while Alice was offline. Network storage and peer-to-peer connectivity may be necessary. Conflict-free replicated data types – data structures designed for replication across multiple participants in a setting where coordination may be infrequent – have been proposed as a foundational technology for local-first software, and have seen much attention in the programming languages and verification research world in the last ten years. Content-addressable storage will also be a topic of discussion: it is particularly well suited to decentralized systems, in which the contents of the data to be retrieved are more important than its current physical location.

At the end of the course, we’ll attempt to synthesize what we’ve learned from studying global-first and local-first distributed software systems into a coherent whole. Perhaps these paradigms need not be at odds with each other. Can we write local-first software in a global-first paradigm?

For more details, read the course overview and check out the schedule of readings.