Abstract
The ReactiveX API, also known as the Reactive Extensions in the .NET world, is a recently popularized reactive programming framework for asynchronous, event-based, multi-threaded programming. Presented by its proponents as a solid tool for applications requiring a simple yet powerful approach to event-driven systems, it has seen favorable adoption in many popular languages. Although Ada has been long-favored by powerful tasking capabilities that reduce the need for additional multi-threading support, the reactive approach has properties that are well-suited to the safety and maintainability culture predominant in the Ada world, such as complexity reduction, race-condition and deadlock avoidance, and enhanced maintainability by means of concise and well-defined information flows. This work presents the design for a ReactiveX Ada implementation that aims to balance desirable library properties such as compile-time checks, reasonable user-required generic instantiations, and a shallow learning curve for both library clients and maintainers. The Ada programmer can henceforth benefit from the abundant documentation existing for the language-agnostic ReactiveX approach without stepping out of the Ada tool chain.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsNotes
- 1.
A related Rx concept that does create a subscription is a Subject, that is out of the scope of this introduction. This is of importance for cold observables, which is another Rx concept left out of this introduction.
References
Bainomugisha, E., Carreton, A.L., Cutsem, T.V., Mostinckx, S., Meuter, W.D.: A survey on reactive programming. ACM Comput. Surv. 45(4), 52:1–52:34 (2013)
Bonér, J., Farley, D., Kuhn, R., Thompson, M.: The Reactive Manifesto (2014). http://www.reactivemanifesto.org/
Briot, E.: Traits-based containers (2015). http://blog.adacore.com/traits- based-containers
Edwards, J.: Coherent reaction. In: Proceedings of the 24th ACM SIGPLAN Conference Companion on Object Oriented Programming Systems Languages and Applications, OOPSLA 2009, pp. 925–932. ACM, New York (2009)
Elliott, C.M.: Push-pull functional reactive programming. In: Proceedings of the 2nd ACM SIGPLAN Symposium on Haskell, Haskell 2009, pp. 25–36. ACM (2009)
Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley Longman, Inc., Boston (1995)
Maglie, A.: ReactiveX and RxJava. In: Reactive Java Programming, pp. 1–9. Springer, New York (2016)
Mosteo, A.R.: RxAda (2017). https://bitbucket.org/amosteo/rxada
Salvaneschi, G., Margara, A., Tamburrelli, G.: Reactive programming: a walkthrough. In: 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering, vol. 2, pp. 953–954, May 2015
ReactiveX: An API for asynchronous programming with observable streams. http://reactivex.io/
Rx design guidelines. https://blogs.msdn.microsoft.com/rxteam/2010/10/28/rx- design-guidelines/
Thornley, J.: Parallel programming with declarative Ada. Technical report, Caltech (1993)
Wan, Z., Hudak, P.: Functional reactive programming from first principles. In: Proceedings of the ACM SIGPLAN 2000 Conference on Programming Language Design and Implementation, PLDI 2000, pp. 242–252. ACM, New York (2000)
Aknowledgements
This work has been supported by projects RoboChallenge (DPI2016-76676-R-AEI/FEDER-UE) and Alerta (CUD2016-17). The author thanks the regulars at comp.lang.ada for insightful discussions and the AdaCore support team for their prompt response to bugs uncovered during RxAda development.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2017 Springer International Publishing AG
About this paper
Cite this paper
Mosteo, A.R. (2017). RxAda: An Ada implementation of the ReactiveX API. In: Blieberger, J., Bader, M. (eds) Reliable Software Technologies – Ada-Europe 2017. Ada-Europe 2017. Lecture Notes in Computer Science(), vol 10300. Springer, Cham. https://doi.org/10.1007/978-3-319-60588-3_10
Download citation
DOI: https://doi.org/10.1007/978-3-319-60588-3_10
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-60587-6
Online ISBN: 978-3-319-60588-3
eBook Packages: Computer ScienceComputer Science (R0)