| LuaOrb | ![]() |
This site presents LuaOrb, a binding between the interpreted language Lua and CORBA. As usual, this binding defines mappings between Lua and IDL types. However, unlike other bindings, LuaOrb relies on the reflexive facilities of CORBA and the dynamic nature of Lua.The main goal of LuaOrb is offering a more suitable support to develop open applications, which allows the dynamic incorporation of CORBA objects. Using the CORBA's features for introspection (Interface Repository) and dynamic construction of method calls (Dynamic Invocation Interface - DII), LuaOrb offers a binding where scripts can incorporate and make effective use of new objects interfaces at run time. Moreover, as in other bindings, Lua can use external CORBA servers transparently, in the same way it uses internal objects. Using the CORBA's Dynamic Skeleton Interface (DSI), LuaOrb also supports dynamic implementation of new CORBA object servers.
LuaOrb uses proxies for each external CORBA object to be handled by a program. A proxy is an internal object created to represent an external one; its basic functionality is to delegate to the external object it represents any operation performed over itself. To implement this interface, LuaOrb uses the reflexive mechanisms of both CORBA and Lua.
To provide dynamic object implementations with Lua, LuaOrb uses generic adaptors. A generic adaptor is registered in the CORBA Object Adaptor as an object server that provides a specific interface, and delegates the real method implementations to an object defined in Lua, in a way similar to proxies: Any operation performed over the adaptor is applied over the real implementation. Because these implementations are written in Lua, they can be dynamically created and linked to adaptors. The linking between the adaptor and the real object uses the same reflexive mechanisms used by our client proxy, but this time these mechanisms are provided by the language interface (the Lua API also allows the dynamic construction of method calls).
The key point in this language binding is its dynamic nature. Every step, from type checking to method identification and invocation, is done at run time. Therefore, a program can incorporate new objects without any additional declarations and without stopping for recompilation. Because of this dynamic nature, some coercions between data types are possible. Therefore, many changes in an IDL interface do not affect its uses in Lua, such as reordering and removing of struct fields; and changes between IDL types which have similar representations in Lua, such as short and long, or array and sequence. This coercion works recursively, so a list of Lua tables can be automatically converted to an array of records, for instance.
A possible run-time performance penalty has been greatly reduced with the minimization of the number of queries to the Interface Repository. This has been achieved simply by caching the most recent queries.
The LuaOrb binding is implemented in a C++ library called LuaOrb. This library must be embedded in some application in order to be used.
LuaOrb has already been used in some CORBA based applications for network management [RMIC97], cooperative work [GFCI98,FRB+98] and configuration management[RIC98].
We are also working on the implementation of bindings of Lua to Java (LuaJava) and COM (LuaCom). With these three bindings, Lua acts as a unifying glue language, wherein we can write scripts that freely use and mix components from the three component systems.
Lua is an interpreted programming language that has been widely used as a tool to customize applications. Its extension facilities allow it to adapt to diverse application domains, from CGI (like CGILua) to astronomical data analysis.Lua integrates in its design data-description facilities, reflexive facilities, and familiar imperative constructs. On the "traditional" side, Lua is a procedural language with usual control structures (whiles, ifs, etc.), function definitions with parameters and local variables, and the like. On the less traditional side, Lua provides functions as first order values, closures, and dynamically created associative arrays (called tables in Lua) as a single, unifying data-structuring mechanism.
A fundamental concept in the design of Lua is to provide meta-mechanisms for implementing features, instead of providing a host of features directly in the language. For example, although Lua is not a pure object-oriented language, it does provide meta-mechanisms for implementing classes and inheritance. Lua's meta-mechanisms bring an economy of concepts and keep the language small, while allowing the semantics to be extended in unconventional ways. Extensible semantics is a distinguishing feature of Lua.
Lua is implemented as a small library of C functions, written in ANSI C, and compiles unmodified in all known platforms. The implementation goals are simplicity, efficiency, portability, and low embedding cost.
Lua has been developed at Tecgraf, the Computer Graphics Technology Group of PUC-Rio (the Pontifical Catholic University of Rio de Janeiro in Brazil). TeCGraf is a laboratory of the Department of Computer Science. Dozens of industrial products developed by TeCGraf use Lua.
"Automated Testing for a CORBA-Based Distributed System"
Renato Cerqueira and Roberto Ierusalimschy. In eXtreme Programming and Flexible Processes in Software Engineering (XP2000), Cagliari, Sardinia, Italy, 2000.
A revised version of this paper was published in Extreme Programming Examined, 2001. Addison-Wesley."Dynamic Component Gluing Across Different Componentware Systems"
Renato Cerqueira, Carlos Cassino and Roberto Ierusalimschy.
In International Symposium on Distributed Objects and Applications (DOA'99), Edinburgh, Scotland, 1999. IEEE Press."Dynamic Extension of CORBA servers"
Marco Martins, Noemi Rodriguez and Roberto Ierusalimschy.
In Euro-Par'99 Parallel Processing, Springer-Verlag, Toulouse, France, 1999. (LNCS 1685)"Multiple Display Viewing Architecture for Virtual Environments over Heterogeneous Networks"
Alexandre Ferreira, Renato Cerqueira, Waldemar Celes and Marcelo Gattass.
In SIBGRAPI'99, Campinas, Brazil, 1999. IEEE Press."Using Reflexivity to Interface with CORBA"
Roberto Ierusalimschy, Renato Cerqueira and Noemi Rodriguez.
In IEEE International Conference on Computer Languages (ICCL'98), Chicago, 1998. IEEE Press."Dynamic Configuration with CORBA Components"
Noemi Rodriguez, Roberto Ierusalimschy and Renato Cerqueira.
In 4th International Conference on Configurable Distributed Systems (ICCDS'98), Annapolis, MA, 1998. IEEE Press."Reactivity and Pro-activeness in Virtual Prototyping"
Paulo Rodacki Gomes, Bruno Feijó, Renato Cerqueira and Roberto Ierusalimschy.
In Tools and Methods for Concurrent Engineering'98, 1998."Distributed Agents Supporting Event-driven Design Processes"
Bruno Feijó, Paulo Rodacki, João Bento, Sérgio Scheer and Renato Cerqueira.
In 5th International Conference on Artificial Intelligence in Design'98, Lisbon, Portugal, July 1998."Binding an Interpreted Language to CORBA"
Renato Cerqueira, Noemi Rodriguez and Roberto Ierusalimschy.
In II Simpósio Brasileiro de Linguagens de Programação, pages 23-36, Campinas, Brazil, September 1997."A Dynamic Approach for Composing CORBA Objects"
Renato Cerqueira, Roberto Ierusalimschy and Noemi Rodriguez.
Techinical Report 43/97, PUC-Rio, Rio de Janeiro, Brazil, 1997."Aplicações de Gerência com Comportamento Dinâmico"
Noemi Rodriguez, Ana Moura, Roberto Ierusalimschy and Renato Cerqueira.
In Anais do SFBSID'97, pages 476-487, Fortaleza, Brazil, 1997.
There is an active mailing list for discussing LuaOrb at luaorb-l@tecgraf.puc-rio.br. Everyone is welcome to join.To subscribe or unsubscribe to the list, send a message to luaorb-l-request@tecgraf.puc-rio.br with your request in the Subject (simply "subscribe" or "unsubscribe"). Please be careful not to send such requests to the list. If your browser understands subjects in mailto URLs, then you can subscribe to luaorb-l or unsubscribe to luaorb-l just by clicking on these links. Administrative requests may take a day or so to be processed.
Please be careful when replying to a message posted to the list, because your reply will be sent to the list, instead of just to the author. You may want to read some useful information on mailing list netiquette; see also this and this.
LuaOrb has been developed by a small group of researchers and graduate students of the Computer Science Department of PUC-Rio, under coordination of Renato Cerqueira, Noemi Rodriguez and Roberto Ierusalimschy. Our research group is composed by:Our group can also count on people that work with us, using and giving important suggestions to LuaOrb: Paulo Rodacki, Thais Vasconcelos, Marco Catunda, and Ralf Heckhausen.Ana Lucia de Moura Carlos Cassino Cristina Ururahy Leticia Nogueira Noemi Rodriguez Renato Cerqueira Roberto Ierusalimschy Vinicius Almendra
This work has been developed at the Computer Science Department of PUC-Rio, thanks to the sponsorship of CNPq, Tecgraf/PUC-Rio, LES/PUC-Rio and Petrobras/CENPES. We are also very grateful to Object-Oriented Concepts for providing an excellent ORB and support, without fees for academic usage.
This home page is maintained by Renato Cerqueira and should be at http://www.tecgraf.puc-rio.br/luaorb. This manual works only in Netscape 4 or above, and Internet Explorer 4 or above because of the JavaScript 1.1 code used.