WebSocket Server

The FME Server WebSocket Server allows fast, real-time communication with client web applications that execute on WebSocket-supported browsers.

You can communicate with the WebSocket Server in the following ways:

Notification Mode

The FME Server Notification Service provides WebSocket support through the WebSocket Publisher and WebSocket Subscriber. Use the notification service for WebSocket communication that is low-volume, or when your application requires added flexibility.

In the following example, a WebSocket Publisher receives a named WebSocket stream, and publishes it to a Notification Service topic. A Workspace Subscriber receives the message stream from the topic, and uses it to run an FME workspace equipped with a WebSocketReceiver transformer.

In this example, an FME workspace equipped with a WebSocketSender transformer sends a named WebSocket stream to a Notification Service topic. A WebSocket Subscriber receives the message stream from the topic and sends it to a WebSocket-supported client.

Message Streaming Mode

In message streaming mode, an FME workspace equipped with both WebSocketReceiver and WebSocketSender transformers receives messages via the WebSocket Server, processes a job, and sends the resulting WebSocket message stream to a client, via the WebSocket Server. This mode works well when you can dedicate an FME Engine to running a workspace continuously, receiving and sending messages, until you explicitly cancel it.

Hybrid Mode

You can combine elements of Notification Mode and Message Streaming Mode, depending on your requirements. For example, you may want to use a WebSocket Publisher to receive WebSocket message streams and send them to a topic on which a Workspace Subscriber is configured, while your FME workspace sends WebSocket message streams directly through the WebSocket Server. This design is useful when there are few requests, but you still want the server to respond without the overhead of polling from the client, or you do not want to dedicate a continuously running FME Engine to the job.

See Also