Fault Tolerance Via Idempotence

Total Page:16

File Type:pdf, Size:1020Kb

Fault Tolerance Via Idempotence Fault Tolerance via Idempotence G. Ramalingam and Kapil Vaswani Microsoft Research, India grama,[email protected] Abstract ing comes with its own pitfalls, such as process failures, imperfect Building distributed services and applications is challenging due messaging, asynchrony and concurrency. to the pitfalls of distribution such as process and communication Consider the prototypical bank account transfer service in failures. A natural solution to these problems is to detect potential Fig. 1. The goal of the service is to transfer money between bank failures, and retry the failed computation and/or resend messages. accounts, potentially in different banks. If the accounts belong to Ensuring correctness in such an environment requires distributed different banks, ensuring that the transfer executes as an atomic services and applications to be idempotent. (distributed) transaction is usually not feasible, and the natural way In this paper, we study the inter-related aspects of process fail- of expressing this computation is as a workflow [10, 20] consisting ures, duplicate messages, and idempotence. We first introduce a of two steps, a debit followed by a credit. simple core language (based on λ-calculus) inspired by modern dis- What if the process executing the workflow fails in between the tributed computing platforms. This language formalizes the notions debit and credit steps? A natural solution is to detect this failure and ensure that a different process completes the remaining steps of a service, duplicate requests, process failures, data partitioning, 1 and local atomic transactions that are restricted to a single store. of the workflow. A challenging aspect of realizing this solution We then formalize a desired (generic) correctness criterion for is figuring out whether the original process failed before or after applications written in this language, consisting of idempotence completing a particular step (either debit or credit). If not done (which captures the desired safety properties) and failure-freedom carefully, the debit or credit step may be executed multiple times, (which captures the desired progress properties). leading to further correctness concerns. Services often rely on a We then propose language support in the form of a monad that central workflow manager to manage process failures during the automatically ensures failfree idempotence. A key characteristic of workflow (using distributed transactions). our implementation is that it is decentralized and does not require Now consider a (seemingly) different problem. Messages sent distributed coordination. We show that the language support can between the client initiating the transfer and the service may be lost. be enriched with other useful constructs, such as compensations, The only option for a client, when it does not receive a response while retaining the coordination-free decentralized nature of the within some reasonable time, is to resend its request. Yet the client implementation. does not want the transfer to occur twice! We have implemented the idempotence monad (and its variants) In this paper, we study process and communication failures in in F# and C# and used our implementation to build realistic appli- the context of workflows. The seemingly different problems caused cations on Windows Azure. We find that the monad has low runtime by process and communication failures are, in fact, inter-related. overheads and leads to more declarative applications. Idempotence, a correctness criterion that requires the system to tol- erate duplicate requests, is the key to handling both communication Categories and Subject Descriptions D.4.5 [Operating Systems]: and process failures efficiently. Idempotence, when combined with Reliability—Fault-tolerance; C.2.4 [Computer-Communication Net- retry, gives us the essence of a workflow, a fault tolerant composi- works]: Distributed Systems—Client/server, Distributed applica- tion of atomic actions, for free without the need for distributed co- tions ordination. In the transfer example, a fault tolerant account trans- fer can be implemented without a central workflow manager if the General Terms Reliability, Languages, Design debit and credit steps can be designed to be idempotent, Keywords fault tolerance, idempotence, workflow, transaction, Formalizing Failfree Idempotence. In this paper, we introduce a monad simple core language λFAIL, inspired by contemporary cloud plat- forms. This language formalizes process failure, duplicate requests, 1. Introduction partitioned data, and local transactions. A local transaction pro- Distributed computing is becoming mainstream. Several modern vides ACID guarantees but is restricted to access data within a sin- platforms offer virtualized distributed systems at low entry cost gle partition (typically a single server). Computations in λFAIL are with the promise of scaling out on demand. But distributed comput- like workflows, but without any fault-tolerance guarantees for the composition (i.e., the computation may fail between transactions). We then formalize a generic correctness criterion for applica- tions written in λFAIL. A simple, powerful and tempting criterion is that an application’s behavior in the presence of duplicate requests Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed and process failures should be indistinguishable from its behav- for profit or commercial advantage and that copies bear this notice and the full citation ior in the absence of duplicate requests and failures. We formal- on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. 1 In general, detecting failures perfectly in an asynchronous, message pass- POPL’13, January 23–25, 2013, Rome, Italy. ing system is impossible [8]. Conservative failure detection can also lead to Copyright c 2013 ACM 978-1-4503-1832-7/13/01. $10.00 the same problem of duplicated computation. let process (request) = workflow monad [2, 4]. We find that the core business logic in these match request with applications can be declaratively expressed using the monad. Our j (“getBalance”,(branch, account)) ! evaluation shows that performance overheads of using the monad atomic branch flookup accountg over hand-coded implementations are statistically insignificant. j (“transfer”,(fromBranch, fromAccount, toBranch, toAccount, amt) ! atomic fromBranch f The rest of the paper is organized as follows. In Section 2, we update fromAccount ((lookup fromAccount) − amt) introduce a language λFAIL and formalize duplicate requests and g; process failures. We formalize what it means for a λFAIL application atomic toBranch f to correctly tolerate duplicate requests and failures. In Section 3, update toAccount ((lookup toAccount) + amt) we present the idempotence monad and show how it can be used to g; tolerate duplicate requests as well as process failures. In Section 4, “Transfer complete.” we describe extensions of the idempotence construct. In Section 5, we evaluate the idempotence monad and our implementation from Figure 1: A banking service example, in syntactically sugared the perspective of expressiveness, benefits and overheads. Section 6 discusses related work. λFAIL, that is neither idempotent nor fault-tolerant. 2. Failfree Idempotence ize a slightly weaker, but more appropriate, correctness criterion, In this section we present a language λFAIL that distils essential el- namely failure-freedom modulo message duplication. Informally, ements of distributed computing platforms such as Windows Azure this criterion permits the system to send duplicate responses. This and formalize the concept of failfree idempotence. weakening is appropriate from the perspective of composition: if the recipient of the responses can also tolerate duplicate messages, 2.1 The Language λFAIL then the sender is freed of the obligation to send the response ex- actly once. Informal Overview. A λFAIL program e represents a service that receives input requests and produces output responses. An input Automating Idempotence. Next, we address the problem of auto- request v is processed by creating an agent to evaluate e v. When matically ensuring idempotence for a service. We present our solu- the evaluation of e v terminates, producing a value v0, v0 is sent tion as a monad, the idempotence monad. We then show that idem- back as the response. Multiple input requests can be processed con- potence, when coupled with a simple retry mechanism, provides a currently, and their evaluation can be interleaved. Shared, mutable, “free” solution to the problem of tolerating process failures, guaran- persistent data is stored in tables. teeing failure-freedom modulo message duplication. We then pro- Agents. An agent has its own internal state (captured by local pose dedicated language support for idempotent computations. variables of the code). An agent may fail at any point in time. A failure models problems such as hardware failure, software crashes Decentralized Idempotence and Workflow. The idea underlying and reboots . Data stored in tables is persistent and is unaffected by the idempotence monad is conceptually simple, but tedious to im- agent failures. plement manually (i.e., without the monad). Given a unique iden- Tables. Tables are persistent maps. They provide primitives to tifier associated with a computation, the monad essentially adds update the value
Recommended publications
  • Semiring Frameworks and Algorithms for Shortest-Distance Problems
    Journal of Automata, Languages and Combinatorics u (v) w, x–y c Otto-von-Guericke-Universit¨at Magdeburg Semiring Frameworks and Algorithms for Shortest-Distance Problems Mehryar Mohri AT&T Labs – Research 180 Park Avenue, Rm E135 Florham Park, NJ 07932 e-mail: [email protected] ABSTRACT We define general algebraic frameworks for shortest-distance problems based on the structure of semirings. We give a generic algorithm for finding single-source shortest distances in a weighted directed graph when the weights satisfy the conditions of our general semiring framework. The same algorithm can be used to solve efficiently clas- sical shortest paths problems or to find the k-shortest distances in a directed graph. It can be used to solve single-source shortest-distance problems in weighted directed acyclic graphs over any semiring. We examine several semirings and describe some specific instances of our generic algorithms to illustrate their use and compare them with existing methods and algorithms. The proof of the soundness of all algorithms is given in detail, including their pseudocode and a full analysis of their running time complexity. Keywords: semirings, finite automata, shortest-paths algorithms, rational power series Classical shortest-paths problems in a weighted directed graph arise in various contexts. The problems divide into two related categories: single-source shortest- paths problems and all-pairs shortest-paths problems. The single-source shortest-path problem in a directed graph consists of determining the shortest path from a fixed source vertex s to all other vertices. The all-pairs shortest-distance problem is that of finding the shortest paths between all pairs of vertices of a graph.
    [Show full text]
  • Basic Properties of Filter Convergence Spaces
    Basic Properties of Filter Convergence Spaces Barbel¨ M. R. Stadlery, Peter F. Stadlery;z;∗ yInstitut fur¨ Theoretische Chemie, Universit¨at Wien, W¨ahringerstraße 17, A-1090 Wien, Austria zThe Santa Fe Institute, 1399 Hyde Park Road, Santa Fe, NM 87501, USA ∗Address for corresponce Abstract. This technical report summarized facts from the basic theory of filter convergence spaces and gives detailed proofs for them. Many of the results collected here are well known for various types of spaces. We have made no attempt to find the original proofs. 1. Introduction Mathematical notions such as convergence, continuity, and separation are, at textbook level, usually associated with topological spaces. It is possible, however, to introduce them in a much more abstract way, based on axioms for convergence instead of neighborhood. This approach was explored in seminal work by Choquet [4], Hausdorff [12], Katˇetov [14], Kent [16], and others. Here we give a brief introduction to this line of reasoning. While the material is well known to specialists it does not seem to be easily accessible to non-topologists. In some cases we include proofs of elementary facts for two reasons: (i) The most basic facts are quoted without proofs in research papers, and (ii) the proofs may serve as examples to see the rather abstract formalism at work. 2. Sets and Filters Let X be a set, P(X) its power set, and H ⊆ P(X). The we define H∗ = fA ⊆ Xj(X n A) 2= Hg (1) H# = fA ⊆ Xj8Q 2 H : A \ Q =6 ;g The set systems H∗ and H# are called the conjugate and the grill of H, respectively.
    [Show full text]
  • 7.2 Binary Operators Closure
    last edited April 19, 2016 7.2 Binary Operators A precise discussion of symmetry benefits from the development of what math- ematicians call a group, which is a special kind of set we have not yet explicitly considered. However, before we define a group and explore its properties, we reconsider several familiar sets and some of their most basic features. Over the last several sections, we have considered many di↵erent kinds of sets. We have considered sets of integers (natural numbers, even numbers, odd numbers), sets of rational numbers, sets of vertices, edges, colors, polyhedra and many others. In many of these examples – though certainly not in all of them – we are familiar with rules that tell us how to combine two elements to form another element. For example, if we are dealing with the natural numbers, we might considered the rules of addition, or the rules of multiplication, both of which tell us how to take two elements of N and combine them to give us a (possibly distinct) third element. This motivates the following definition. Definition 26. Given a set S,abinary operator ? is a rule that takes two elements a, b S and manipulates them to give us a third, not necessarily distinct, element2 a?b. Although the term binary operator might be new to us, we are already familiar with many examples. As hinted to earlier, the rule for adding two numbers to give us a third number is a binary operator on the set of integers, or on the set of rational numbers, or on the set of real numbers.
    [Show full text]
  • 3. Closed Sets, Closures, and Density
    3. Closed sets, closures, and density 1 Motivation Up to this point, all we have done is define what topologies are, define a way of comparing two topologies, define a method for more easily specifying a topology (as a collection of sets generated by a basis), and investigated some simple properties of bases. At this point, we will start introducing some more interesting definitions and phenomena one might encounter in a topological space, starting with the notions of closed sets and closures. Thinking back to some of the motivational concepts from the first lecture, this section will start us on the road to exploring what it means for two sets to be \close" to one another, or what it means for a point to be \close" to a set. We will draw heavily on our intuition about n convergent sequences in R when discussing the basic definitions in this section, and so we begin by recalling that definition from calculus/analysis. 1 n Definition 1.1. A sequence fxngn=1 is said to converge to a point x 2 R if for every > 0 there is a number N 2 N such that xn 2 B(x) for all n > N. 1 Remark 1.2. It is common to refer to the portion of a sequence fxngn=1 after some index 1 N|that is, the sequence fxngn=N+1|as a tail of the sequence. In this language, one would phrase the above definition as \for every > 0 there is a tail of the sequence inside B(x)." n Given what we have established about the topological space Rusual and its standard basis of -balls, we can see that this is equivalent to saying that there is a tail of the sequence inside any open set containing x; this is because the collection of -balls forms a basis for the usual topology, and thus given any open set U containing x there is an such that x 2 B(x) ⊆ U.
    [Show full text]
  • Continuous Closure, Natural Closure, and Axes Closure
    CONTINUOUS CLOSURE, AXES CLOSURE, AND NATURAL CLOSURE NEIL EPSTEIN AND MELVIN HOCHSTER Abstract. Let R be a reduced affine C-algebra, with corresponding affine algebraic set X.Let (X)betheringofcontinuous(Euclideantopology)C- C valued functions on X.Brennerdefinedthecontinuous closure Icont of an ideal I as I (X) R.Healsointroducedanalgebraicnotionofaxes closure Iax that C \ always contains Icont,andaskedwhethertheycoincide.Weextendthenotion of axes closure to general Noetherian rings, defining f Iax if its image is in 2 IS for every homomorphism R S,whereS is a one-dimensional complete ! seminormal local ring. We also introduce the natural closure I\ of I.Oneof many characterizations is I\ = I+ f R : n>0withf n In+1 .Weshow { 2 9 2 } that I\ Iax,andthatwhencontinuousclosureisdefined,I\ Icont Iax. ✓ ✓ ✓ Under mild hypotheses on the ring, we show that I\ = Iax when I is primary to a maximal ideal, and that if I has no embedded primes, then I = I\ if and only if I = Iax,sothatIcont agrees as well. We deduce that in the @f polynomial ring [x1,...,xn], if f =0atallpointswhereallofthe are C @xi 0, then f ( @f ,..., @f )R.WecharacterizeIcont for monomial ideals in 2 @x1 @xn polynomial rings over C,butweshowthattheinequalitiesI\ Icont and ✓ Icont Iax can be strict for monomial ideals even in dimension 3. Thus, Icont ax✓ and I need not agree, although we prove they are equal in C[x1,x2]. Contents 1. Introduction 2 2. Properties of continuous closure 4 3. Seminormal rings 8 4. Axes closure and one-dimensional seminormal rings 13 5. Special and inner integral closure, and natural closure 18 6.
    [Show full text]
  • General Topology
    General Topology Tom Leinster 2014{15 Contents A Topological spaces2 A1 Review of metric spaces.......................2 A2 The definition of topological space.................8 A3 Metrics versus topologies....................... 13 A4 Continuous maps........................... 17 A5 When are two spaces homeomorphic?................ 22 A6 Topological properties........................ 26 A7 Bases................................. 28 A8 Closure and interior......................... 31 A9 Subspaces (new spaces from old, 1)................. 35 A10 Products (new spaces from old, 2)................. 39 A11 Quotients (new spaces from old, 3)................. 43 A12 Review of ChapterA......................... 48 B Compactness 51 B1 The definition of compactness.................... 51 B2 Closed bounded intervals are compact............... 55 B3 Compactness and subspaces..................... 56 B4 Compactness and products..................... 58 B5 The compact subsets of Rn ..................... 59 B6 Compactness and quotients (and images)............. 61 B7 Compact metric spaces........................ 64 C Connectedness 68 C1 The definition of connectedness................... 68 C2 Connected subsets of the real line.................. 72 C3 Path-connectedness.......................... 76 C4 Connected-components and path-components........... 80 1 Chapter A Topological spaces A1 Review of metric spaces For the lecture of Thursday, 18 September 2014 Almost everything in this section should have been covered in Honours Analysis, with the possible exception of some of the examples. For that reason, this lecture is longer than usual. Definition A1.1 Let X be a set. A metric on X is a function d: X × X ! [0; 1) with the following three properties: • d(x; y) = 0 () x = y, for x; y 2 X; • d(x; y) + d(y; z) ≥ d(x; z) for all x; y; z 2 X (triangle inequality); • d(x; y) = d(y; x) for all x; y 2 X (symmetry).
    [Show full text]
  • DEFINITIONS and THEOREMS in GENERAL TOPOLOGY 1. Basic
    DEFINITIONS AND THEOREMS IN GENERAL TOPOLOGY 1. Basic definitions. A topology on a set X is defined by a family O of subsets of X, the open sets of the topology, satisfying the axioms: (i) ; and X are in O; (ii) the intersection of finitely many sets in O is in O; (iii) arbitrary unions of sets in O are in O. Alternatively, a topology may be defined by the neighborhoods U(p) of an arbitrary point p 2 X, where p 2 U(p) and, in addition: (i) If U1;U2 are neighborhoods of p, there exists U3 neighborhood of p, such that U3 ⊂ U1 \ U2; (ii) If U is a neighborhood of p and q 2 U, there exists a neighborhood V of q so that V ⊂ U. A topology is Hausdorff if any distinct points p 6= q admit disjoint neigh- borhoods. This is almost always assumed. A set C ⊂ X is closed if its complement is open. The closure A¯ of a set A ⊂ X is the intersection of all closed sets containing X. A subset A ⊂ X is dense in X if A¯ = X. A point x 2 X is a cluster point of a subset A ⊂ X if any neighborhood of x contains a point of A distinct from x. If A0 denotes the set of cluster points, then A¯ = A [ A0: A map f : X ! Y of topological spaces is continuous at p 2 X if for any open neighborhood V ⊂ Y of f(p), there exists an open neighborhood U ⊂ X of p so that f(U) ⊂ V .
    [Show full text]
  • A Guide to Self-Distributive Quasigroups, Or Latin Quandles
    A GUIDE TO SELF-DISTRIBUTIVE QUASIGROUPS, OR LATIN QUANDLES DAVID STANOVSKY´ Abstract. We present an overview of the theory of self-distributive quasigroups, both in the two- sided and one-sided cases, and relate the older results to the modern theory of quandles, to which self-distributive quasigroups are a special case. Most attention is paid to the representation results (loop isotopy, linear representation, homogeneous representation), as the main tool to investigate self-distributive quasigroups. 1. Introduction 1.1. The origins of self-distributivity. Self-distributivity is such a natural concept: given a binary operation on a set A, fix one parameter, say the left one, and consider the mappings ∗ La(x) = a x, called left translations. If all such mappings are endomorphisms of the algebraic structure (A,∗ ), the operation is called left self-distributive (the prefix self- is usually omitted). Equationally,∗ the property says a (x y) = (a x) (a y) ∗ ∗ ∗ ∗ ∗ for every a, x, y A, and we see that distributes over itself. Self-distributivity∈ was pinpointed already∗ in the late 19th century works of logicians Peirce and Schr¨oder [69, 76], and ever since, it keeps appearing in a natural way throughout mathematics, perhaps most notably in low dimensional topology (knot and braid invariants) [12, 15, 63], in the theory of symmetric spaces [57] and in set theory (Laver’s groupoids of elementary embeddings) [15]. Recently, Moskovich expressed an interesting statement on his blog [60] that while associativity caters to the classical world of space and time, distributivity is, perhaps, the setting for the emerging world of information.
    [Show full text]
  • Higher Braid Groups and Regular Semigroups from Polyadic-Binary Correspondence
    mathematics Article Higher Braid Groups and Regular Semigroups from Polyadic-Binary Correspondence Steven Duplij Center for Information Technology (WWU IT), Universität Münster, Röntgenstrasse 7-13, D-48149 Münster, Germany; [email protected] Abstract: In this note, we first consider a ternary matrix group related to the von Neumann regular semigroups and to the Artin braid group (in an algebraic way). The product of a special kind of ternary matrices (idempotent and of finite order) reproduces the regular semigroups and braid groups with their binary multiplication of components. We then generalize the construction to the higher arity case, which allows us to obtain some higher degree versions (in our sense) of the regular semigroups and braid groups. The latter are connected with the generalized polyadic braid equation and R-matrix introduced by the author, which differ from any version of the well-known tetrahedron equation and higher-dimensional analogs of the Yang-Baxter equation, n-simplex equations. The higher degree (in our sense) Coxeter group and symmetry groups are then defined, and it is shown that these are connected only in the non-higher case. Keywords: regular semigroup; braid group; generator; relation; presentation; Coxeter group; symmetric group; polyadic matrix group; querelement; idempotence; finite order element MSC: 16T25; 17A42; 20B30; 20F36; 20M17; 20N15 Citation: Duplij, S. Higher Braid Groups and Regular Semigroups from Polyadic-Binary 1. Introduction Correspondence. Mathematics 2021, 9, We begin by observing that the defining relations of the von Neumann regular semi- 972. https://doi.org/10.3390/ groups (e.g., References [1–3]) and the Artin braid group [4,5] correspond to such properties math9090972 of ternary matrices (over the same set) as idempotence and the orders of elements (period).
    [Show full text]
  • CLOSURES of EXPONENTIAL FAMILIES 3 the (Common) Convex Support of the P.M.’S in E Has Positive Probability Under These P.M.’S, by [7], Remark 3
    The Annals of Probability 2005, Vol. 33, No. 2, 582–600 DOI: 10.1214/009117904000000766 c Institute of Mathematical Statistics, 2005 CLOSURES OF EXPONENTIAL FAMILIES1 By Imre Csiszar´ and Frantiˇsek Matu´ˇs Hungarian Academy of Sciences and Academy of Sciences of the Czech Republic The variation distance closure of an exponential family with a convex set of canonical parameters is described, assuming no regu- larity conditions. The tools are the concepts of convex core of a mea- sure and extension of an exponential family, introduced previously by the authors, and a new concept of accessible faces of a convex set. Two other closures related to the information divergence are also characterized. 1. Introduction. Exponential families of probability measures (p.m.’s) include many of the parametric families frequently used in statistics, proba- bility and information theory. Their mathematical theory has been worked out to a considerable extent [1, 2, 3, 11]. Although limiting considerations are important and do appear in the literature, less attention has been paid to determining closures of exponential families. For families supported by a finite or countable set, closures were consid- ered in [1], pages 154–156, and [2], pages 191–201, respectively, the latter with regularity conditions. In the general case, different closure concepts come into account. Our main result, Theorem 2 in Section 3, determines the closure in variation distance (variation closure) of a full exponential fam- ily and, more generally, of any subfamily with a convex set of canonical parameters. Weak closures appear much harder to describe in general, but Theorem 1 in Section 3 is a step in that direction.
    [Show full text]
  • Propositional Fuzzy Logics: Tableaux and Strong Completeness Agnieszka Kulacka
    Imperial College London Department of Computing Propositional Fuzzy Logics: Tableaux and Strong Completeness Agnieszka Kulacka A thesis submitted in partial fulfilment of the requirements for the degree of Doctor of Philosophy in Computing Research. London 2017 Acknowledgements I would like to thank my supervisor, Professor Ian Hodkinson, for his patient guidance and always responding to my questions promptly and helpfully. I am deeply grateful for his thorough explanations of difficult topics, in-depth discus- sions and for enlightening suggestions on the work at hand. Studying under the supervision of Professor Hodkinson also proved that research in logic is enjoyable. Two other people influenced the quality of this work, and these are my exam- iners, whose constructive comments shaped the thesis to much higher standards both in terms of the content as well as the presentation of it. This project would not have been completed without encouragement and sup- port of my husband, to whom I am deeply indebted for that. Abstract In his famous book Mathematical Fuzzy Logic, Petr H´ajekdefined a new fuzzy logic, which he called BL. It is weaker than the three fundamental fuzzy logics Product,Lukasiewicz and G¨odel,which are in turn weaker than classical logic, but axiomatic systems for each of them can be obtained by adding axioms to BL. Thus, H´ajek placed all these logics in a unifying axiomatic framework. In this dissertation, two problems concerning BL and other fuzzy logics have been considered and solved. One was to construct tableaux for BL and for BL with additional connectives. Tableaux are automatic systems to verify whether a given formula must have given truth values, or to build a model in which it does not have these specific truth values.
    [Show full text]
  • On the Structure of a Complete Metric Space
    Math 541 Lecture #3 I.13: Metric Spaces, Part II I.16: On the Structure of a Complete Metric Space 13.1: Separation and axioms of countability. Metric spaces enjoys many nice properties. Proposition 13.2. A metric space fX; dg is separable (i.e., has a countable dense subset) if and only if it satisfies the second axiom of countability. Proof. If the metric topology satisfies the second axiom of countability, then by Propo- sition 4.2, it is separable. So suppose that fX; dg is separable. Then there is a countable dense subset A of X. The collection of balls centered at points of A having rational radii forms a countable base for the topology. 16: On the structure of complete metric spaces. For a topological space fX; Ug, c a subset E of X is nowhere dense in X if E = X − E is dense in X, i.e., if the closure of X − E is X. Proposition. Here are some basic facts about nowhere dense sets. (i) If E is nowhere dense in X, then E is nowhere dense. (ii) A closed set E is nowhere dense if and only if E does not contain any nonempty open set. (iii) If E is nowhere dense and O is nonempty and open, then O − E contains an nonempty open set. Proof. (i) If E is nowhere dense, then X − E is dense in X. Since the closure of the closed set E is itself, then X − E = X − E is dense, so E is nowhere dense. (ii) For a closed set E, suppose that E is nowhere dense, so X − E is dense in X.
    [Show full text]