Our main result is that any topological algebra based on a Boolean space is the extended Stone dual space of a certain associated Boolean algebra with additional operations. A particular case of this result is that the profinite completion of any abstract algebra is the extended Stone dual space of the Boolean algebra of recognizable subsets of the abstract algebra endowed with certain residuation operations. These results identify a connection between topological algebra as applied in algebra and Stone duality as applied in logic, and show that the notion of recognition originating in computer science is intrinsic to profinite completion in mathematics in general. This connection underlies a number of recent results in automata theory including a generalization of Eilenberg-Reiterman theory for regular languages and a new notion of compact recognition applying beyond the setting of regular languages. The purpose of this paper is to give the underlying duality theoretic result in its general form. Further we illustrate the power of the result by providing a few applications in topological algebra and language theory. In particular, we give a simple proof of the fact that any topological algebra quotient of a profinite algebra which is again based on a Boolean space is in fact a profinite algebra and we derive the conditions dual to the ones of the original Eilenberg theorem in a fully modular manner. We cast our results in the setting of extended Priestley duality for distributive lattices with additional operations as some classes of languages of interest in automata theory fail to be closed under complementation.2010 Mathematics Subject Classification. Primary 06D50,20M35,22A30; keywords: Stone/Priestley duality for lattices with additional operations, topological algebra, automata and recognition, profinite completion.The author acknowledges support from ANR 2010 BLAN 0202 02 FREC.