Introduction

When working with CORBA (Common Object Request Broker Architecture), developers often face challenges in maintaining and updating their application’s interfaces. One common question is: “If I want to add a method to my existing server’s CORBA interface, will I need to recompile all my clients?” This question resonates with many developers who are looking for efficient ways to enhance their system without extensive downtime or reengineering.

In this blog post, we will explore the solution that allows you to change your CORBA interface without the need for recompilation, and we will explain why you can achieve this smoothly, particularly when working with TAO (The ACE ORB).

Understanding CORBA and TAO

CORBA is a standard defined by the Object Management Group (OMG) to enable communication between various systems regardless of their location or the programming languages they use. TAO is an implementation of CORBA, designed for real-time and high-performance systems.

When discussing interfaces in CORBA, we refer to the specifications that clients use to communicate with servers, which are defined in an Interface Definition Language (IDL).

The Problem: Adding Methods to CORBA Interfaces

In a typical CORBA application, your server communicates with various clients through its defined interfaces. A situation can arise when you want to enhance the functionality of your server by adding a new method or operation to its interface.

The key concern for developers is whether making this change will require all existing clients to be recompiled. Recompiling can lead to increased workloads, potential disruptions, and risks if not handled correctly.

The Solution: No Recompilation Required

According to the insights gathered from working with ACE/TAO-based systems, recompilation of clients is not required when you add new methods to a CORBA interface. Here’s why:

Lookups by Operation Name

  • Text Comparison: CORBA performs lookups for methods based on operation names through a straightforward text comparison mechanism. This means that when a new method is added to the server, existing clients do not need to change their code as long as they do not attempt to call the new method.

Real-World Application

  • Many developers have successfully modified their ACE/TAO systems without encountering any issues, even when their clients were built with different programming languages (e.g., C++, C#, Python).
  • For example, clients using C#, Borland’s Janeva, or OmniORBPy have continued functioning without the need for recompilation while interacting with enhanced server interfaces.

Conclusion

To summarize, when working with CORBA and specifically with TAO, making adjustments to your server’s interface—such as adding new methods—does not necessitate recompilation of all clients. The ability to perform lookups by operation name allows for greater flexibility and ease in maintaining your software.

This efficiency can save you time and effort, enabling you to focus on developing new features rather than on compiling existing code that remains compatible with updated interfaces.

If you found this post helpful, feel free to share it with your fellow developers who may face similar inquiries about CORBA interfaces!