Use Case: Interoperability Between C++, Python, Java

Index Home MAE > MAE Overview > Use Case: Interoperability Between C++, Python, Java

(Future release use case.) Since the MAE environment is language agnostic with interfaces for C++, Python, and Java, your developers can create various components of your application in any of the supported languages; they will seemlessly exchange data and interoperate without the need for a shim or other technically challenging cross-language interface.

Problem

You have a development environment where C++, Java, Python and perhaps other programming languages have been used to create your overall offering. This may be for legacy reasons, the result of acquisition, or other reasons.  However, now you need some (if not all) of the software to communicate with each other.  Perhaps you have started experimenting with combining code from different languages using special tools or shim layers, but you've discovered it's more work than its worth.

You want to keep your existing programs in their native languages, but you want them to communicate transparently with your other programs.

Solution

MAE is a collection of programs that communicate via the MAE protocol for messaging, task control, and function calls.  The MAE protocol is not language specific.  Today, interfaces exist for C++; future releases will see support for Java, Python, and perhaps other programming lanuages. Internally, MAE uses XML for moving data between the application components. The application component interface does not leave it to the app to convert to/from XML; the interface communicates with a native language data structure that is automatically encoded/decoded as needed.

MAE communicates with its application components at one of three levels - integrated, semi-integrated, or non-integrated. An integrated app is the most desired.  These levels allow you to have components in the MAE ecosystem that are not fully integrated, but still participating.  If you just need your software components to be monitored and loosely managed, this may be an option. If performance is not critical, MAE command line tools may be used as an intermediate development phase before full integration.

Ask HanoverSoft

Does this solution look like a fit for your organization?  Reach out to HanoverSoft at +1 (919) 270-6712 or info@hanoversoft.net to discuss.

Implementation Guidance

Managing Tasks

MAE starts/stops its managed set of application components.  An application does not need to be fully integrated.  Often, a wrapper script around an existing application will work.  To declare a new app to MAE, you'll need to create a task registration file and pass it to tadd to register it. In the registration file, you tell MAE how to treat the app and what it's allowed to do or not do. For example, if the application dies, should MAE automatically restart it?

Once registered and MAE restarted, you can use tstart and tstop to start and stop it.  You can use tviewlog to view all log messages related to it.

When you create a wrapper script around your program, you can send log messages into MAE about your program using tlog.  When a program launches, there are three critical stages that MAE tracks:  initialization started, normal program started (initialization done), and program exited. These can be communicated to MAE with explanations via tctrl.

Sending Asynchronous Messages

If your non-integrated program needs to send a message into MAE to an application component, it can use tmesg to do so from the command line. Without full integration, it cannot receive messages. A message can be sent to any app channel along with a request keyword and key/value parameters.

Syncrhonous Messages / Function Calls

If your non-integrated program needs to send a synchronous message or run a function inside MAE (via Remote Procedure Call (RPC)), it can use trpc. A call can be sent to any app channel along with a function keyword and key/value parameters. Note that if no running app has registered that keyword for service, the call will immediately fail.

Database Table Manipulation

If your non-integrated program needs access to the database tables setup inside MAE, it can use tdbcmd on the command line. This utility allows you to query records/fields, set field values, review the table schema, and more.

C++ Interface

See Developing a New App for developer's details.

Java Interface

Please inquire about the current state of development for the Java interface to MAE. Reach out to HanoverSoft at +1 (919) 270-6712 or info@hanoversoft.net.

Python Interface

Please inquire about the current state of development for the Python interface to MAE. Reach out to HanoverSoft at +1 (919) 270-6712 or info@hanoversoft.net.

Other Programming Language Interface

Please inquire about the current state of development for the otehr programing language interfaces to MAE. Reach out to HanoverSoft at +1 (919) 270-6712 or info@hanoversoft.net.