WebSockets
What are WebSockets?
WebSockets allow you to control communication between the web server and the browser. This involves updating content that is displayed in the browser. Communication between the web server and the browser typically takes place over a standard HTTP connection. For content to be updated, the browser must send a request to the web server when using a standard HTTP connection. This is not necessary when using WebSockets. In this case, the web server sends messages or updates to the browser without the browser having to take any action. Therefore, no user action is required for a server to send messages to the browser or update content in the browser. Sending messages or updating the browser content is triggered automatically by an event.
Events that trigger the sending of messages or the updating of browser content can occur within Intrexx (internal) or outside of Intrexx (external). External events can include the receipt of status or warning messages from machines or the receipt of emails in an external mailbox. Internal events can be timer events, data group events, or user-defined events—basically, any "occurrences" that can be handled by process event handlers. For more information about events, see the " Use Cases" section.
The messages that the Intrexx Portal Server sends to the browser are generated in Intrexx. There are several ways to do this. For example, you can create static messages that always remain the same. This can be useful when receiving emails in an external mailbox. In this case, it may be sufficient to display the message "You have a new email." is displayed. You can also create dynamic messages that contain, for example, different variables. Here, you have access to all the features of Groovy Script and Velocity Script, among others. Messages can be plain text or in JSON format.
Messages are not sent directly from the server to the browser. Instead, the messages are first passed to a so-called topic, or rather, the topic receives the messages. You must create topics in Intrexx.
Topics can also receive messages resulting from multiple events.
A topic can deliver or send the messages it has received to the browser. First, however, the browser must subscribe to a topic. Subscribing determines whether messages from a topic should be displayed in the browser.
The browser also determines where and how the message should be displayed. This can be displayed, for example, in a pop-up window or in a static text field (the "Static Text" control). It also specifies when the subscription to the topic should begin and, if applicable, when it should end.
that delivers or makes the messages available. A "consumer" can subscribe to a topic. A topic can be compared to a news feed that you can subscribe to.
You can assign permissions to topics. This allows you to ensure that messages are displayed only to users for whom they are intended or relevant.
Intrexx has already supported the automated updating of web pages. This was achieved using a process known as polling. With polling, the browser requests information from the server at a specified interval. As a result, messages from the server are not displayed immediately in the browser, but only at the time the browser makes the request. At the same time, load is generated on the server. When using WebSockets, the server actively sends messages. The browser doesn't have to keep sending requests to the server. This ensures that notifications and updates are sent without delay. At the same time, the server load is lower than with polling.
Safari
If you use WebSockets with integrated authentication or Basic authentication, you cannot use the "Safari" web browser.


