CORBA_3
CORBA_3
Programming Languages
a
Thomas M. Prinz
Course Evaluation Service, Friedrich Schiller University Jena, Jena, Germany
Abstract: Service-orientation recommends dividing software into separate independent services, with each service being
implemented in the programming language that best ts into the service’s problem space. However, data must
be shared between the distributed services, so common data models and interfaces must be dened in each
programming language used. This leads to a higher development effort and dependencies, while neglecting
the benets. This paper explains a new idea that arranges a distributed program as if it is a single one, even
though it consists of different parts using possibly different programming languages. For this purpose, the
idea of meta network programming languages is introduced. They are based on network machines and hide
the complexity arising during development of distributed software. A compiler translates and distributes these
programs by splitting them into several parts. As a result, this should reduce the overhead of developing
distributed general purpose software. The intention of this position paper is to give new ideas to implement
distributed programs in the future. An implementation of the idea does not exist yet.
191
Prinz, T.
Compilation of Distributed Programs to Services Using Multiple Programming Languages.
DOI: 10.5220/0012151500003584
In Proceedings of the 19th International Conference on Web Information Systems and Technologies (WEBIST 2023), pages 191-198
ISBN: 978-989-758-672-9; ISSN: 2184-3252
Copyright © 2023 by SCITEPRESS – Science and Technology Publications, Lda. Under CC license (CC BY-NC-ND 4.0)
Compilation of Distributed Programs to Services Using Multiple Programming Languages
193
Compilation of Distributed Programs to Services Using Multiple Programming Languages
Programming distributed software is a challenge be- The implementation of the program with the cur-
cause the developer cannot simply call another func- rent state-of-the-art is not a challenge but time con-
tion in a distributed part of the program, but must call suming. First the data structure Pair must be im-
an external service using the right parameters, for- plemented in Java and in R. Then, the Java part of
mat, etc. It is helpful during development to imag- the program must be implemented and made avail-
ine that all functions of a program are located in the able as a service, e. g., with REST. In addition, de-
same environment, regardless of where they are ac- velopers must implement the R part of the program
tually located (Kozlovics, 2019). The idea of net- and also make it available as a service. Since data
work programs creates this situation. Network pro- is transferred, a protocol must be dened or an exist-
grams are executed on the previously dened network ing one like JSON (Ecma International, 2017) must
machines and are written in a so-called network pro- be used for the exchange. Furthermore, the data must
gramming language that mainly denes data models be mapped to the correct parameters.
and the software structure as services. The advan- The implementation overhead can cause develop-
tages of such network programs are: (1) they dene ers to implement the program/software in a single
the interfaces of all services, (2) service calls are more language instead of multiple ones. However, some
similar to function/method calls, and (3) they describe problems can be solved, computed, and implemented
shared data models only once. much more efcient in other programming languages.
Figure 3 shows an example of a small network This advantage is then missing and, therefore, leads to
program. It is written in a Java-like language only increasing implementation costs (Apel et al., 2019).
as an example. At the beginning, the program de- Network programs should improve this situation since
nes the data model (class) Pair with two elds developers avoid the previous described steps.
a and b and a constructor. It also denes a class
Computation, which contains two methods. The
method handlePairs is written in Java and transfers
a nested integer array of pairs into a list of objects of 5 COMPILER ARCHITECTURE
type Pair. At the end, the method returns the sum of FOR NETWORK PROGRAMS
the list of pairs by calling the computeSums method,
which is written in R. The method computeSums re- Network programs are transferred to a runnable soft-
quires an array (or list) of pairs dened by the class ware with the help of a compiler. Basically, the archi-
Pair. It then calculates the sum of the two elds a tecture of such a compiler can follow a similar struc-
and b of each Pair object and returns it as an array. ture as classical compilers (e. g., (Cooper and Torc-
195
Compilation of Distributed Programs to Services Using Multiple Programming Languages
most programming languages there are compilers that pends on the number and types of programming lan-
generate executable les. guages initially supported. The network program-
Many modern programming languages, such as ming language itself should be less complex, as
Java, R, Python, and JavaScript, require special en- should its compiler. One difculty will be recognizing
vironments to be executable. Fortunately, there are calls to distributed functions in the target program-
tools to create such environments (e. g., (Docker Inc., ming languages. The use of a (language-dependent)
2023) and (Burns et al., 2019)). One goal of the com- library could be a solution for a rst prototype. The
piler is to generate containers for each partial pro- network machine should be the most complex part, as
gram describing their execution environments and the it provides several runtime components. A rst pro-
services. This is done in the Execution Environment totype should reuse an existing technology stack to
Generator and bundled in containers. As a result, the keep the implementation simple and feasible. How-
compiler generates a complete distributable and exe- ever, compared to other approaches, such as CORBA,
cutable network program. the implementation effort and the hurdle to use our
approach should be lower.
Future work includes the denition of a rst gram-
6 CONCLUSION / DISCUSSION mar of a network programming language, which al-
lows to include existing languages in the description
of functionality. The next step denes a parser of this
This paper presented a new idea for developing dis-
language and the phase of code extensions for service
tributed programs. An implementation would allow
calls in the compiler. Fortunately, the back end of the
to arrange each distributed program as if it is an undis-
compiler is lightweight, since it can reuse all existing
tributed one, although it consists of different parts,
compilers for the programming languages used in the
no matter which programming language they use. A
program. All this future work contains challenges, but
compiler distributes the program by splitting it into
could be feasible in a few years.
several parts in different programming languages. To
achieve this, the program must be dened in a so-
called network programming language. A network
program denes data models and services, where the REFERENCES
service functionality is described in an individually
available programming language chosen by the de- Apel, S. (2018). Reducing Development Overheads with
veloper. That language that best solves the function- a Generic and Model-Centric Architecture for On-
line Games. In IEEE International Conference on
ality can be used. The overall concept is based on
Software Architecture, ICSA 2018, Seattle, WA, USA,
principles of network machines, which generalize ar- April 30 - May 4, 2018, pages 21–28. IEEE Computer
chitectures of distributed and multiprocessor systems Society.
and are a runtime environment for network programs. Apel, S., Hertrampf, F., and Späthe, S. (2019). Towards
In this paper only the idea of network programs and a Metrics-Based Software Quality Rating for a Mi-
a conceptual compiler architecture are described. It croservice Architecture - Case Study for a Measure-
shall give a new view on developing distributed sys- ment and Processing Infrastructure. In Lüke, K., Eich-
tems and state-of-the-art approaches. Therefore, an ler, G., Erfurth, C., and Fahrnberger, G., editors, Inno-
vations for Community Services - 19th International
implementation does not exist yet.
Conference, I4CS 2019, Wolfsburg, Germany, June
Of course, the proposed approach does not have 24-26, 2019, Proceedings, volume 1041 of Communi-
only advantages. If development teams do not imple- cations in Computer and Information Science, pages
ment services separately, the resulting services (and 205–220. Springer.
their interfaces) might be less reusable and more cou- Burns, B., Beda, J., and Hightower, K. (2019). Kubernetes:
pled. This problem depends more on architecture and Up and Running — Dive into the Future of Infrastruc-
design decisions than on implementation decisions, ture. O’Reilly, California, USA, 2 edition.
which are the focus of our approach. Furthermore, Catlin, H. (2023). Haml. http://haml.info/. Last visit in
our approach leads to new middleware (the network September 2023.
machine) that must be installed and maintained by en- Ciccozzi, F., Malavolta, I., and Selic, B. (2019). Execution
terprises, although the goal is to keep this to a mini- of UML models: a systematic review of research and
practice. Software & Systems Modeling, 18(3):2313–
mum. Finally, some developers specialize in a small
2360.
number of programming languages. For this reason,
Cooper, K. D. and Torczon, L. (2011). Engineering a Com-
such developers might have problems writing, read- piler. Morgan Kaufmann, USA, 2nd edition.
ing, and understanding network programs. De Paoli, F. (2018). Challanges in services research: A
The implementation effort of our approach de- software architecture perspective. In Lazovik, A. and
197
WEBIST 2023 - 19th International Conference on Web Information Systems and Technologies
Schulte, S., editors, Advances in Service-Oriented and Object Management Group (2021). Common Object Re-
Cloud Computing, pages 219–227, Cham. Springer quest Broker Architecture Specication, Version 3.4.
International Publishing. https://www.omg.org/spec/CORBA/3.4.
Dobing, B. and Parsons, J. (2006). How UML is used. Com- OpenMP Architecture Review Board (2018).
munications of the ACM, 49(5):109–113. OpenMP Application Programming Interface
Docker Inc. (2023). Empowering App Development for De- — version 5.0. https://www.openmp.org/wp-
velopers — Docker. https://www.docker.com/. Last content/uploads/OpenMP-API-Specication-5.0.pdf.
visit in September 2023. Oquendo, F., Leite, J., and Batista, T. (2016). Execut-
Ecma International (2012). Standard ECMA-335: Common ing Software Architecture Descriptions with SysADL.
Language Infrastructure (CLI) — 6th edition (June In Tekinerdogan, B., Zdun, U., and Babar, A., ed-
2012). http://www.ecma-international.org/publica itors, Software Architecture, pages 129–137, Cham.
tions/les/ECMA-ST/ECMA-335.pdf. Springer International Publishing.
Ecma International (2017). Standard ECMA-404: The Prinz, T. M., Heinze, T. S., Amme, W., Kretzschmar, J., and
JSON Data Interchange Syntax — 2nd edition (De- Beckstein, C. (2015). Towards a Compiler for Busi-
cember 2017). http://www.ecma-international.org/p ness Processes - A Research Agenda. In de Barros,
ublications/les/ECMA-ST/ECMA-404.pdf. M. and Rückemann, C.-P., editors, SERVICE COM-
Fielding, R. T. and Taylor, R. N. (2002). Principled design PUTATION 2015: The Seventh International Confer-
of the modern Web architecture. ACM Trans. Internet ences on Advanced Service Computing, Nice, France,
Techn., 2(2):115–150. March 22–27, 2015. Proceedings, pages 49–54.
Geisriegler, M., Kolodiy, M., Stani, S., and Singer, R. Prinz, T. M., Spieß, N., and Amme, W. (2014). A rst
(2017). Actor based business process modeling and step towards a compiler for business processes. In
execution: A reference implementation based on on- Cohen, A., editor, Compiler Construction - 23rd In-
tology models and microservices. In 43rd Euromicro ternational Conference, CC 2014, Held as Part of the
Conference on Software Engineering and Advanced European Joint Conferences on Theory and Practice
Applications, SEAA 2017, Vienna, Austria, August 30 of Software, ETAPS 2014, Grenoble, France, April 5-
- Sept. 1, 2017, pages 359–362. IEEE Computer Soci- 13, 2014. Proceedings, volume 8409 of Lecture Notes
ety. in Computer Science, pages 238–243. Springer.
Google (2023). Flutter - Beautiful native apps in record pug (2023). Getting Started - Pug. https://pugjs.org/. Last
time. https://utter.dev/. Last visit in September 2023. visit in September 2023.
Khronos OpenCL Working Group (2023). The OpenCLTM Raible, M. (2018). The JHipster mini-book. C4Media,
Specication. https://registry.khronos.org/OpenCL/ USA, 5.0.1 edition.
specs/3.0-unied/html/OpenCL\ API.html. Shafranovich, Y. (2005). RFC 4180: Common Format
Kozlovics, S. (2019). The web computer and its operat- and MIME Type for Comma-Separated Values (CSV)
ing system: A new approach for creating web applica- Files. https://datatracker.ietf.org/doc/html/rfc4180.
tions. In Bozzon, A., Mayo, F. J. D., and Filipe, J., edi- Singer, R. (2016). Business process modeling and execu-
tors, Proceedings of the 15th International Conference tion - A compiler for distributed microservices. CoRR,
on Web Information Systems and Technologies, WE- abs/1601.05976.
BIST 2019, Vienna, Austria, September 18-20, 2019, Swagger (2023a). The Best APIs are Built with Swagger
pages 46–57. ScitePress. Tools. https://www.swagger.io/. Last visit in Septem-
Lindholm, T., Yellin, F., Bracha, G., and Buckley, A. ber 2023.
(2014). The Java Virtual Machine Specication, Java Swagger (2023b). OpenAPI Specication. https://swagger.
SE 8 Edition. Addison-Wesley Professional, Califor- io/specication/. Last visit in September 2023.
nia, USA, 8 edition. Tacy, A., Hanson, R., Essington, J., and Tokke, A. (2013).
Mono Project (2023). Mono — Cross platform, open source GWT in Action. Manning Publications Co., Green-
.NET framework. https://www.mono-project.com/. wich, CT, USA, 2nd edition.
Last visit in September 2023. Unity Technologies (2023). Unity — Game Engine.
Newman, S. (2015). Building Microservices: Designing https://unity.com/. Last visit in September 2023.
Fine-Grained Systems. O’Reilly, California, USA, 1 Yu, C., Royuela, S., and Quiñones, E. (2020). OpenMP
edition. to CUDA graphs: a compiler-based transformation to
Object Management Group (2017a). Action Lan- enhance the programmability of NVIDIA devices. In
guage for Foundational UML (Alf). Concrete Syn- Stuijk, S. and Corporaal, H., editors, SCOPES ’20:
tax for a UML Action Language, Version 1.1. 23rd International Workshop on Software and Com-
https://www.omg.org/spec/ALF/1.1. pilers for Embedded Systems, St. Goar, Germany, May
Object Management Group (2017b). OMG Uni- 25-26, 2020, pages 42–47. ACM.
ed Modeling Language — version 2.5.1.
https://www.omg.org/spec/UML/2.5.1.
Object Management Group (2018). Semantics of a Founda-
tional Subset for Executable UML Models (fUML),
Version 1.4. https://www.omg.org/spec/ALF/1.1.
198