Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Web Sockets

Avatar

Level 1

Hi,

We have a situation where we need to call a third party api.

Browser -> AEM -> thirdparty.

The call to the thirdparty has an SLA of upto 5 seconds.

What is the recommended approach for this scenario ?

Browser posts request to AEM, AEM acknowledges request and immediately replies to browser to say it is handling the request.

Browser then polls AEM for a response

meanwhile AEM calls third party and waits for response , once response is received it stores it in some sort of distributed cache shared between publishers (e.g. elasticache or REDIS)

or

Can the browser use websockets with AEM  and maintain a connection (with a timeout of 5 seconds) ?

I can see a few references to socket.io support for AEM screens but not much else.

What would the scalability of such an approach ?

AC

1 Accepted Solution

Avatar

Correct answer by
Level 10

Actually - here is an older thread that talks about this -- WebSockets and CQ 5

View solution in original post

2 Replies

Avatar

Level 10

We have examples of AEM -> thirdparty - but using SOAP or RESTFul WS.  There is no docs on using web sockets with AEM.

I will investigate this.

Avatar

Correct answer by
Level 10

Actually - here is an older thread that talks about this -- WebSockets and CQ 5