SSE Client

SSE Client (ODC)

Stable version 0.1.0 (Compatible with ODC)
Uploaded on 26 June 2023 by valantic LCS
SSE Client

SSE Client (ODC)

Documentation
0.1.0

Notes

  • SSE are not web-sockets (they are a one way channel from server to client), nor polling mechanisms (it is an HTTP protocol implementation). 
  • This is a work in progress, any help/suggestions are welcomed. 

Current Issues

  • IOS native apps are currently not supported. I am working on understanding how to make this work
  • Background Notifications on both Mobile and PWA are not supported. If this is a deal breaker, please use Apple's APN/ Google's FCM approaches (Firebase, OneSignal, etc...) There is now the possibility to address this in PWA apps using Microsoft's Fetch Event Source but it has not been tested/worked on.

Hello World

At your Client Application open the module dependencies (ctrl+q), search for the SSE Client and add the EventSource WebBlock to your Screen. 

Fill in the SSE URL and create the mandatory Event Handler to start receiving messages.

That's it!

SSE_Lib - Event Listener

EventSource / MSFTFetchEventSource
- This block listens to a specific HUB Channel
- It is possible to further filter the Channel by its events
- A Token GUID is issued every time a new connection is established and it uniquely identifies the connection
- The block is initiated when the SSESubscribeURL is populated. Please refer to further examples @ the examples app
- Authentication can be implemented by passing a token together with the URL as a parameter, and validating it either on the onRequest hook or with the custom onAuthentication hook, using SSL if using native EventSource.
You can also use Microsoft's FetchEventSource block that allows custom headers to be passed instead of the native approach.
Please refer to further examples @ the examples app
- The SSE EventStream interface ensures resilience through an auto-connect on disconnect, so everything is handled in case of disconnection. Have in mind though, that the same URL will be used.