WebSocket server implementation in cuba platform with access to Entities

How can i implement a WebSocket Server in cuba-platform which can access Entities? The clients will be javascript clients, i tried with javax.websocket, but can’t figure out how to start the Server Class. Is there any inhouse implementation for WebSocket communication in cuba where clients will be javascript WebSocket?

Hi,

There is no built-in implementation of WebSocket for REST API / web services. You can add any third party library to implement them, for instance Atmosphere or use Spring MVC WebSocket support: 25. WebSocket Support Please note, that web client already uses Atmosphere with built-in Vaadin implementation, if you want to use the same library - you should configure it manually for your servlets / Spring controllers.

There is a feature in our bug tracker that addresses this topic https://youtrack.cuba-platform.com/issue/PL-8921 The issue is not scheduled for any release yet, at the moment we are collecting requirements and common use cases.

1 Like