Ticket #823 (accepted Defect)

Opened 9 years ago

Last modified 8 years ago

dm4-websockets: upgrade to be compatible with DM 4.6.x & 4.7.x

Reported by: Malte Owned by: jri
Priority: Major Milestone: Release 4.8.4
Component: 3rd Party Plugins Version: 4.8.3
Keywords: Cc: JuergeN
Complexity: 3 Area:
Module:

Description

task:

  • upgrade and release plugin for DM 4.6.x
  • advancement: functionality to send notifications message to specific logged in users instead of broadcasting them to all connected clients

dm4-subscriptions depends on this plugin and could be upgraded very soon.

Change History

comment:1 Changed 9 years ago by Malte

  • Summary changed from dm4-websockets: upgrade to be compatible with DM 4.6.x to dm4-websockets: upgrade to be compatible with DM 4.6.x & 4.7.x

Adding request for future compatibility with 4.7.x

comment:2 Changed 9 years ago by jri

  • Milestone Release 4.6 deleted

comment:3 Changed 9 years ago by jri

  • Status changed from new to accepted

comment:4 Changed 9 years ago by jri

  • Cc JuergeN added

comment:6 in reply to: ↑ description Changed 9 years ago by jri

Replying to Malte:

  • advancement: functionality to send notifications message to specific logged in users instead of broadcasting them to all connected clients

Hi Malte!
If you like we could elaborate this feature now.
You want send a websocket message to a specific logged in user.

  • How is that user specified? Would it be sufficient if you can send a message back to the user that is bound to the initial request to your REST API? Or do you actually want that user A can send a message to an arbitrary user B? The former would be more easy to implement.
  • What is the context of sending the message? Where/when would you do it? In one of your REST API methods (as reaction to a request)? In a websocket message handler (as reaction to an incoming websocket message)? Or in a thread spawned on your own (as reaction on some external event)?

comment:7 Changed 8 years ago by jri

Needs to be adapted to DM 4.8

comment:9 Changed 8 years ago by jri

  • Priority changed from Minor to Major
  • Version changed from 4.6.1 to 4.8.3
  • Milestone set to Release 4.8.4

comment:10 Changed 8 years ago by jri

In https://github.com/jri/dm4-websockets/commit/438c3233

WebSockets service: add sendMessage() (#823).

1 new method in WebSocketsService:

void sendMessage(String pluginUri, String message)

The message is send to one particular client whose session corresponds with the session of the current request.
If there is no such correspondence an exception is thrown.

See #823.

Note: See TracTickets for help on using tickets.