First I would like to thank everyone for there responses and suggestions. This may have taken a while for me to digest but I think it was worth it.
This may appear to be a long piece. The intention is to provide those participating in this thread the ability to see the solution and comment on it in an effort to make it a better solution. In this community more than once I have received someones solution to certain pieces that opened a door for me and this is my attempt to bring something back in the hopes it will be useful to others.
Background:
For some time I have been looking at various methods to ensure network activities did not over burden the CPU and db data would not be corrupted. There were multiple console applications constantly working in the back ground and at anytime db corruption could occur as well as needed network activity could become sluggish.
I have been looking for a way to ensure data in multiple MySQL db(s) (for that matter it could be any db) was correct at time of need for these autonomous applications that utilized the same shared db tables and that the data was updated properly so when other applications needed it that data could be used to correctly do what was required.
Before solving this I could get full capabilities needed at the price of loading down the CPU with anywhere from 40% to 90% CPU activity per application while those applications were idle. Having 6 applications needing so much CPU time created a sluggish response. A solution such as Apple MAC Pro 2013 with a minimum of 12Gb worked but if I could find a way to resolve the CPU loading and maintain functionality that would be more desirable for most needs and for the bigger ones I could always grab a MAC Pro.
The time is now:
So I finally came to the place where I needed to focus on this need. Having multiple IPC Sockets working simultaneously seemed to be a solution. These applications perform significant network (TCP, UDP) and db access all the time. Most times these console applications are not doing anything but looking. This is what I refer to as idle. When looking and the need to perform work occurred active CPU activity increases with respect to the ask. This ask comes from other external network applications and devices and could literally occur at anytime.
Need:
So how to reduce CPU loading, improve network activity and ensure db data integrity was the need. The testing I have just completed using IPCSockets has enabled all of that to become true. For sub apps CPU usage is reduced when idle which used to require on average 40% to less than 1%. For the Server app CPU usage went from over 90% to less than 6%.
When performing active work CPU loading for SubApps has been reduced from over 90% continuous to less than 40% peak on average to less than 6% continuous. For the Server app CPU usage went from over 90% continuous to less than 50% peak and less than 7% continuous.
Due to the nature of controlling external console applications using IPCSockets I also know for certain db activities are not being read or written with old data preserving data integrity. No table locking or unlocking etc is required. To me this was a huge benefit of going after an IPCSocket solution.
Lastly since CPU loading is significantly reduced network activity has improved and overall performance as at a minimum shall I say is very snappy. Testing has shown this to be a comparison of a Volkswagen Beetle to a Porsche 911 with the load carrying capacity of a tractor trailer.
Solution:
Do not use something to this affect IPCSocket(x) Append. For a while I had been trying to get this to work. Not until I stepped through a debugger session did I realize this was never going to work. Even though this looks like a way to have discrete IPCSockets ALL paths get set to the one you want to Listen-Connect. As soon as you do this the Connecting application that is not on that path throws a 102, 103, 105 or even 22.
These errors just cascaded themselves until you were completely out of the ball park. In the end for me the key to this was understanding how to create, maintain and perform the needed dance to have Multiple IPC Sockets concurrently working and have the ability to recover when either the Server-Listener went down or anyone of the SubApps-Connector went away maintaining functionality and recovering gracefully.
The key was the Server as this is the most important piece since it collaborates with all the other SubApps.
Oh by the way it did help to read a piece on Unix IPCsockets in Wiki.
In the Server app:
Discrete IPCSockets with specific paths are created
All IPCSockets are set to Listen to the correct path
A Timer works inside the idle loop to check and reset needed IPCSocket Listen needs
In the Error Event Handler the correct action is taken when a disconnect occurs
In the SubApps:
Discrete IPCSockets with specific paths are created
All IPCSockets are set to Listen to the correct path
A Timer works inside the idle loop to check and rest needed IPCSocket Listen needs
In the Error Event Handler the correct action is taken when a disconnect occurs
This is what I refer to as the dance and when you get it right good stuff happens. Sometimes wisdom creeps in slowly.
I include a link to my DropBox where 6 XOJO Console apps exist. One Server and 5 SubApps. The solutions write to their respective Console folder as follows:
[quote]Server - /Users/UserName/Library/Logs/IPCSocket_TEST/Server
SubApp1 - /Users/UserName/Library/Logs/IPCSocket_TEST/ipcs1
SubApp2 - /Users/UserName/Library/Logs/IPCSocket_TEST/ipcs2
SubApp3 - /Users/UserName/Library/Logs/IPCSocket_TEST/ipcs3
SubApp4 - /Users/UserName/Library/Logs/IPCSocket_TEST/ipcs4
SubApp5 - /Users/UserName/Library/Logs/IPCSocket_TEST/ipcs5[/quote]
This is how you can observe connectivity between each other. DO NOT leave these console apps running for too long as I did not implement control for file size. The log files will simply continue to grow if you leave them running. Once I came upon this solution I did not spend time resolving the data passing in these test apps. I did that in my realtime apps but you can see the beginning of how It was implemented.
This link Console Folder will take you to my Dropbox. Inside the Console Folder you will find the 6 apps needed to use and test
I hope this will be beneficial for someone who finds and joins this thread
Comments and suggestions welcomed