WebSocket Server

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

Note  "> NoteUsing the WebSocket server for messaging is optional. The WebSocket server is otherwise used only forTopic Monitoring.

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

Notification Mode

WebSocket support is provided throughAutomations(首选)Notification Servicepublishers and subscribers. Use Notification Mode for WebSocket communication that is low-volume, or when your application requires added flexibility.

In the following example, aWebSocket trigger再保险ceives a named WebSocket stream, and sends it to aRunWorkspaceaction, which runs an FME工作空间equipped with a WebSocketReceiver transformer.

In this example, an FME工作空间equipped with a WebSocketSender transformer sends a named WebSocket stream to aFME Flow话题触发. AWebSocket external action再保险ceives the message stream from the topic and sends it to a WebSocket-supported client.

Message Streaming Mode

In message streaming mode, an FME工作空间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工作空间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 aWebSocket triggerto receive WebSocket message streams and send them to aRunWorkspaceaction, while your FME工作空间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