101
Views
9
Comments
Solved
[SSE Push Event Hub] How to test SSE ?
sse-server-event-hub-and-client
Service icon
Forge asset by Nuno Damaso
Application Type
Reactive

Hi sorry for a dumb question, how will I test the SSE? Do I need to create another client application with the same implementations that I did in the first client ? So that they both received the event ? Thanks!

2024-09-08 11-13-40
Nuno Damaso
 
MVP
Solution

Hi, no worries!

Just open a new private browser session, and login a different user on that app.

You can F12 for browser tools as well, where you can check the event stream messages being received - network tab, click the url, event stream tab will appear.


2023-07-13 03-30-10
Ronaldd

Hi @Nuno Damaso, appreciate that the creator of this component is helping me with this. I tried checking it on the network tab and I think it's working right? 

2023-07-13 03-30-10
Ronaldd

One thing @Nuno Damaso, I have a requirement, and it goes like this. When there's an update on the server that is connected on the API that I'm using (since our backend and data is not Outsystems), they want a real-time notification for those updates. Can I use this component too for that requirement? They advise me to explore use SSE and WebSocket that's why I'm studying your component.


I hope you can give some insights about it; it will help a lot. Appreciate the help! Thank you!

2024-09-08 11-13-40
Nuno Damaso
 
MVP

Yes, that's it!

I would also test a new private browser session with a different User (different than LSG_Dev) and see if the messages are being received on both sessions - the LSG_Dev session and the new one in the private session.

2024-09-08 11-13-40
Nuno Damaso
 
MVP

I'm not sure I understood where the update is happening. 

- If the update happens at the 3rd party server, then it heavily depends on what they can provide as a signal (SSE, web sockets, callback apis, etc?) - you will then implement according to what they can provide.

- If the update is happening on your OutSystems server, then this component works perfectly, you just broadcast that something happened to a channel, and all clients connected to that channel will be informed.

2023-07-13 03-30-10
Ronaldd

In my case, it’s the first scenario @Nuno Damaso. The updates are happening from an external system and that update will be handle with our API team and the API team need to notify us the Outsystem team that there’s an update on the records in the database of the external system and if yes, there should a notification (feedback message or etc.) in the front-end (Outsystems) informing that. I’m wondering how can I do that without an API call to check if there’s an update.

We are exploring to use websocket and SSE, that’s why I came accross your component.

So is this component is not applicable on that case ? Am I correct? 

2024-09-08 11-13-40
Nuno Damaso
 
MVP

Re: "...the API team need to notify us the Outsystem team that there’s an update on the records.." - how will this happen? 

There's a simple scenario where you just expose a rest API that your API team will call whenever there's an update - you would then use SSE on that exposed rest to simply broadcast. 

Again, it heavily depends on how your API team can notify you. If they have a SSE Hub themselves you can even just listen directly on your app, if web sockets then another solution is needed, if a web call then the above solution, if a third party server pub/sub then yet another.

This component will deal with the second part, notifying the connected frontend clients after your API team signals your OutSystems server.

2023-07-13 03-30-10
Ronaldd

I just confirmed it, the API team will expose an SSE Callback API that will send notification/updates for this particular matter. I'm just wondering if I can use your component to just listen to that expose API to receive and handle those notification/updates from SSE Callback API or do I need to consume it on Outsystems side. Apologies @Nuno Damaso for this, but I will really appreciate your inputs. 

2024-09-08 11-13-40
Nuno Damaso
 
MVP

Yes you can, you can use the url they provide at your reactive app SSE web block listener, the SSE Hub won't be needed in this case - mind to test it thoroughly :)

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.