Data Sharing Between Apps
Glue42 Enterprise provides a wide variety of Interop services – Request/Response, Streaming, Shared Contexts, Channels, Activities and Pub/Sub. The rich Interop functionality of Glue42 Enterprise offers you a wide choice of solution options when developing your apps. Each Interop service is best applied in certain scenarios:
If you have an app with existing functionalities which you want to offer to other applications within Glue42 Enterprise, you can use the Request/Response Interop API. Your application can register an Interop method which invokes the respective functionality of your app. Other Glue42 enabled applications can discover this Interop method and invoke it in order to use the said functionality.
If you need to stream or capture real-time data, you can use special Interop methods for publishing or subscribing to data streams – just like with Request/Response, an app can register a method for publishing a stream and another app can invoke that method to subscribe for the stream and receive the published data.
If you need to synchronize data across multiple applications (e.g., the user clicks on a client name in a client list and you want all other connected applications to automatically show the relevant data for that client), you can achieve this by using Shared Contexts. A Shared Context is an object holding information in the form of key/value pairs. An application can create, set or update a context object and can also subscribe for changes to that context object in order to react accordingly to context changes and update its information.
You can use the Channels API when you need to offer the user an UI for choosing which apps should be grouped together to synchronize data between each other. Channels are based on Shared Contexts and are UI driven. The user can select from any number of defined color Channels and assign any number and combination of applications to a certain Channel. This way, when the user changes a selection, or updates information in one app, all other apps will synchronize their data according to the user action.
An activity application enables you to have a collection of windows that are organized in a layout and share a private context. Activities, like Channels, are also based on Shared Contexts. An activity has an owner window and helper windows. The owner window determines the lifetime of the activity. An activity application can be defined via a configuration file and started as an application from the toolbar, or it can be created programmatically on demand.
The Pub/Sub API offers only limited Interop functionality – publishing and subscribing on topics, basic targeting and no streaming. The Pub/Sub support was added to Glue42 Enterprise only for porting apps already using a pub/sub technology. We recommend using all other higher level Interop services offered by Glue42 Enterprise instead of Pub/Sub.