Jump to content

Comunication between app and instances


dionel1969

Recommended Posts

I want a help from all you. I have an entire app divided into small pieces. For example I need to update the system from a Server. I have the module who has the task of update entire system including db. (updater.exe). But, if the system is working I want to send a warning message to all modules about update process and they will close soon. And the modules has to inform about to instances. Like we have not now "push technology" my questions are:

 

1- How to make communication between modules??? As they are windows app, normally I use to send message (windows traditional SendMessage). For this I override CreateParams of MainForm setting then the Name of MainForm. Later I use this to call all modules from a Central Module for updating processing and others. I saw CreateParams is not calling in Forms derived from uniForm. Of course I could make it getting the Handle from Process, or I could make it using a File and checking this time at time, or using DB, but the DB that I use does not trigger events back to its clients.

 

2- How to make communication between server modules and its instances to let final user know about updating process??? I could make it using a timer, but it will overload network with a lot of requesting.

 

Notice: All the modules, in this case, are running in the same server (physically), just using different ports to work.

Link to comment
Share on other sites

  • Administrators

I want a help from all you. I have an entire app divided into small pieces. For example I need to update the system from a Server. I have the module who has the task of update entire system including db. (updater.exe). But, if the system is working I want to send a warning message to all modules about update process and they will close soon. And the modules has to inform about to instances. Like we have not now "push technology" my questions are:

 

1- How to make communication between modules??? As they are windows app, normally I use to send message (windows traditional SendMessage). For this I override CreateParams of MainForm setting then the Name of MainForm. Later I use this to call all modules from a Central Module for updating processing and others. I saw CreateParams is not calling in Forms derived from uniForm. Of course I could make it getting the Handle from Process, or I could make it using a File and checking this time at time, or using DB, but the DB that I use does not trigger events back to its clients.

 

SendMessage may not work in all case especially it won't work with ISAPI modules. ISAPI module doesn't implement a massage loop.

 

It is better to use a TCP or Pipe channels for inter-process communications.

 

2- How to make communication between server modules and its instances to let final user know about updating process??? I could make it using a timer, but it will overload network with a lot of requesting.

 

Notice: All the modules, in this case, are running in the same server (physically), just using different ports to work.

 

 

Currently the only way is using a slow polling Timer.

Link to comment
Share on other sites

First I never used named pipes directly. I heard, but I did not use it directly. Then, I was reading that the process is similar to Poll Technology, or I make a mistake???? You have to create a Server NamedPipe Process and wait for Client NamedPipe processes.

Link to comment
Share on other sites

  • 10 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...