Plone as message receiver

Hello dear community,

I am relatively new to Plone and need help :slight_smile:

I have a server application (in ASP Net Core with C#) and would like to send individual messages (JSON) to any number of Plone users in my network. But the server application should not know its Plone addresses, but each Plone user should connect to the server and wait for its possible messages.

For ASP Net Core there is something like SingalR to notify users.

Is there also something like that for Plone ?

Or is there a better way ?

What do you think of signalr-client/ on PyPi ?

Has anyone had similar experiences with something like this ?

Please don't be so strict, as I said, I am a beginner in the Plone world.

I would be very happy about your help :slight_smile:

Greetings

It seems to me that you need a client-side (Javascript running in the user's browser) solution. Basically your ASP server should send messages to a pubsub server and have clients subscribed to those messages. And looking at the SignalR solution that you mention, there's already a JS api that you can use. Basically you need to write some JS code that is served by Plone to your visitors and it gets run in the browsers.

If you have a limited number of users you might get away with simply polling the central ASP server... but if you've already integrated SignalR, go that route, it's probably easy enough.

1 Like

Hello, thank you for your answer,

I wanted to make it so that the ASP server communicates directly with Plone and each client gets its own messages from the server based on its id. Around 50 users should be able to access it

But can I communicate with the back-end side (with SignalR) with the JS-API you mentioned in Plone ?

But can I communicate with the back-end side (with SignalR) with the JS-API you mentioned in Plone ?

Plone can serve any Javascript code to the browser. You need:

  • a Plone addon that wraps all the functionality (javascript files, any custom configuration to be done from Plone's control panels)
  • this Plone addon provides one custom JS file, to integrate with the SignalR integrated ASP server and instructions to the browsers on how to load the SignalR JS API file (either from CDN or directly hosted in Plone)

There's no "one click" integration with something similar, as far as I know (but I'm not very knowledgeable about recent developments in the Plone ecosystem), but this sort of integration can be done by any experienced Plone developer.

Plone Foundation Code of Conduct