Skip to main content

After spending all morning trying to set up a Data Stream example in FME I think I’ve got it. It’s a basic geofencing setup:

I have a GPX file of one of my bike commutes and use a WebSocketConnector in a sending workspace to send one location per second to a websocket.

In a second, listening, workspace, that I’m running as a Stream, I’m using a WebSocketConnector to listen to that websocket and compare the locations coming out of that with a polygon. If it falls inside the polygon I then use a HTTPCaller to send me a message via Whatsapp.

This is working fine:

However, some of the documentation / tutorials I found, such as Websockets and FME Server, seem to imply that this should be possible with Automations too (and mention several other websocket transformers that have been deprecated). Has anybody tried that? Is this even a scenario where that would be useful? At one message per second, if I use the Websocket Received trigger and then the lisening workspace I end up with one new job being queued every second, so that’s obviously not ideal.

Hi Hans,

I did not try this, but one new job being queued for every data received on a WebSocket does not seem to make any sense to me. The whole point of WebSockets is to maintain the canal open within the FME process in order to cope with high frequency data reception.

Thank you for investigating this and I’m looking for explanations from our friends at Safe :)

Regards,

Fred


I think the automation-way is just fine if you get infrequent messages, with every single one to be treated as a separate event. In my particular example, a continuous stream of messages, 1 per second, it obviously is not and Data Stream is the way to go.


Reply