Jump to content
Ian Branch

Message Broker??

Recommended Posts

Hi Team,

D11.3.

I have an App that populates the captions of two labels.  It all works fine.

What I would like to do is make this captions availabe to other Apps rather than regerating them in the other Apps.

All the Apps are on a Windows 2012 Server.   Multi-User.  Some of the Apps may be running via RDP, the same and other Apps may be running via LAN, i.e. called from the Server and running physically on the User's PC.  Users are using Win 7 & Win 10 workstations.

The generating App may be being used at any time by many Users.

The term Message Broker came to my mind and IIRC there was something by one of the inhabitants of this Forum that might be my solution.

Can somebody refresh my memory and point me in the correct direction please?

Or, alternatives.  The simpler the better.  🙂

 

Regards & TIA,

Ian

  • Like 1

Share this post


Link to post

Seems you need some centralized storage of data where all other apps could connect. It could be some 3rd party server or your generator app. Server could be message broker (MQTT etc) or Redis or a light database or simple custom HTTP/REST server. What option you prefer depends on your setup:

- is generator app constantly running so it could be server

- is adding config of server address to all clients acceptable

- what components are allowable

 

Some message brokers include 0-conf server autodiscovery (I can't name exact implementations however)

  • Like 1

Share this post


Link to post

If you own D11.3 Enterprise or Architect and all your apps are Delphi then you can create your own solution with DataSnap.  You can use the TDSClientCallbackChannelManager to register client applications with a DataSnap server.  Your client applications make function/procedure calls to the DataSnap server using regular types and classes to do what you want, DataSnap will do all the marshalling for you both ways.  We use such processes to track concurrent usage with a 'user' object we pass that contains user name, machine name, IP, database they are connected to, etc.  We have created our own 'message' structure that allows us to send notifications to individual clients or all registered clients via the callback or issue 'commands' to the clients to close the application gracefully if the user forget to logout at the end of the day.  The callback from the server sends a TJSONValue so you can build a simple or very complex message architecture.  (Interacting with the client GUI requires some TThead.Queue calls but this will be true of any solution)

 

If your apps use multiple languages then something like ActiveMQ, ZeroMQ, RabbitMQ, etc. would be a better solution, but if your apps are all Delphi you may already have the tools/tech you need.  That said, if you have more than 5,000 active clients I would not use DataSnap, but look for something that scales better than DataSnap.  We are small and only have 20-30 active clients at most so DataSnap is a simple and flexible solution for us.

 

 

Share this post


Link to post

Hi Team,

Thank you for your inputs/suggestions?

It seems App Tethering might be an option also.

Is there  working demo with source of App Tethering?

 

Regards & TIA,

Ian

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×