Expand my Community achievements bar.

Connect to a Third party Web Socket

Avatar

Level 1

Hi,
We need to connect to a third-party web socket to have continuous data flow, and that data needs to integrate with one of the Adobe Experience Platform journeys.

The WebSocket works with an initialisation; then, we need to subscribe to it. The WebSocket also needs a ping every 3 seconds to keep the subscription alive. Prior to initialisation, there is an Auth call to get the Token, which is later required for the above processes of WebSocket.

We already developed a middleware that is in continuous integration with the WebSocket. It gets data as it is subscribed and pushes that data to Adobe Experience Platform using HTTPS service (using collectionID and flowID).

However, the requirement has changed, and it requires removing the middleware and getting data directly from Websocket to the Experience Platform collection journey.

We reviewed a couple of documents regarding this requirement but could not find any. So, could you please help us here to integrate the WebSocket, which integration allows us to get data and push that to experience the platform journey?

the WebSocket URL looks like - wss://test.com/subscriptions

3 Replies

Avatar

Administrator

@bjoern__koth@Ankit_Chaudhary@dparraa@arundeepjain@dwright@Van_Tigranyan

Kindly take a moment to review this question and share your valuable insights. Your expertise would be greatly appreciated!



Kautuk Sahni

Avatar

Employee

Hi. I am not an expert, but a couple of thoughts. If the subscription happens in the UI code, then you could simply setup custom events in Adobe Launch and trigger these events with attached data from WS to send these events through Adobe Launch to EXP. It's much simpler and will not require any meddling with plugins/middleware. Though your UI engineers need to do some work in their code for this to work, or you have to setup custom rules in Adobe Launch and write the code yourself.

 

If the the connection and data collection happens in the backend of your app, then you can use EXP Data Collection API to send events from backend to EXP. The flow is basically the same.

Avatar

Level 1

Hi @Van_Tigranyan , Thank you for the solution here.
Unfortunately, we do not have a UI for the solution we are trying. It is mostly server-to-server; no client is getting involved here.
The server from where we are expecting data only has 2 ways to access it: Websocket and Polling. We did not go for polling as it does not have real-time data. For WebSocket, there are processes involved (initialisation, subscribe, ping, and complete). Also, it does involve connection authentication before the processes to get the Auth token.
We checked through a couple of source connectors but could not find much on them to tackle the WS connection as we required.

But as you suggested, we will mostly make the connection in the backend now, which will fetch the WS data and push it down to the EXP Data Collection API.

Thank you,
Akash Patnaik