cancel
Showing results for 
Search instead for 
Did you mean: 

Server sent event on CAP

04-11-2023 2:45 PM
mohitrajani Member
929 views 0 comments
SAP Managed Tags
Subscribe

Hello Peers,

I am implementing Server sent events using Node.js as a CAP Application. But there are a few things that I can't seem to figure out. Can someone please help?

1) everything in cap is in terms of Services. and services have functions and actions i.e. (Get and Post) requests respectively. So I try to have a function for my Server in a Server side event. But all functions in CAP return something. Whereas a pure vanilla nodejs application would only require listening constantly to a port and exposing the write function of the response object that we get from express. This can be seen in the below example code. So my question is that what would my server return if I have to implement it as a CAP service function?. How can I implement a Server sent event.

Code in vanila js:

2) CAP Also offers messaging using event emitters and event recievers. Do they also work on the principle of SSE? Are they the state of the art practice for message sharing between different CAP Applications?

Accepted Solutions (0)

Answers (0)