Overview

Notifications communicate specified events, or actions, to the user application. Notifications ensure that concurrent access to data does not affect system integrity, and provide formalized communication within an application where control has been dispersed and data is constantly changing.

A notification serves as an automatic notice board, where a method can post details of an event so that any interested party can be informed automatically. The informing method does not need to know who is to be informed, and those who are informed do not need to know who caused the event.

Notifications containing binary and string (Binary, String, StringUtf8) data of up to 48K bytes can be sent across the network. For applications running within the server node, the limit for notifications containing binary or string data is 2G bytes. Note, however, that this applies only to single user and server applications. In multiuser applications, persistent notifications are sent via the database server, even if the receiving process is on the same node as the sender. In notification cause events, exception 1267 (Notification info object too big) is raised if the binary or string userInfo data exceeds the applicable value.

JADE notifications may have a differing execution order when intermixed with window events in JADE thin client mode. This difference arises because the notifications occur on the application server rather than the presentation client. Notifications are usually interlaced with any window events that may occur.

In JADE thin client mode, the notification occurs when the application server thread processing the presentation client operations becomes idle. However, the presentation client may also be idle and send event notifications such as form activations, focus changes, and so on, at the same time. This asynchronous operation may result in a slightly different execution order for these events from that experienced in JADE when it is not running in thin client mode.

If the application will be run in JADE thin client mode, subscribe to notifications and timers with care. When an event occurs, each registered subscriber is notified on the application server. In thin client mode, the first notification or timer that is sent causes a further message to be sent to the presentation client to post a message into the Windows message queue of the client. (This is necessary so that the subsequent execution of the notification logic is synchronized with what is taking place on the presentation client.)

When that Windows message is processed by the presentation client, another message is sent to the application server to initiate the processing of the first 10 queued notifications or timers for that client. If there are more than 10 notifications, these actions are repeated until all queued events are processed.

Notifications and timers could therefore have a considerable impact on network traffic.

Ensure that the data being passed on a notification is less than the recommended size limit. In addition, avoid sending large amounts of data using the notification. It is better to pass an object reference, rather than a large primitive type value.

For a discussion about class notifications, object notifications, and registering notifications, see the Erewhon.pdf file that is included in the erewhon subdirectory of the examples directory on the JADE release medium.