Best way to solution

Best way to solution

Post by Neil Evert » Sat, 15 Dec 2001 20:21:02



Hi,
        First of all this is all based on Linux, with the Java
application running on Windows based PC's

        I'm currently designing a system where (up to) 8 seperate
processes (all same, just attached to different serial lines) need to
send data to a socket for status/diagnostics/etc. information.

        Basically I've got 8 processes which monitor the serial
connections for data. When data appears they then receive the
information (electronic orders), drop the files onto a network share
drive, the main machine then processes the files, they're then dropped
back into another network share drive and the seperate processes send
the files back to their respective senders.

        The need I have is to be able to monitor the traffic/status
remotely. My idea is to use a Java application sitting on the remote
PC(s) which monitor a specific port of the comms. machine to
receive/show the information.

        Now I've never done this before, but what I want to do is have
only 1 socket open, and for all information to go down this socket for
the Java app. to receive and display (each packet will contain an ID
so the information is displayed correctly at the other end).

        So basically I need to know the following;-

        Can several processes all open the same socket on the host PC?

        If yes, then are there any issues I should be aware of ?

        If no, then should I use IPC (inter process control) to send
all information to a control process which then controls the socket ?

        or am I better having seperate sockets for each process ?

Any help/hints/pointers gratefully received
Regards
Neil E.
Remove [removetoreply] from email address to mail me direct

 
 
 

Best way to solution

Post by ross » Sun, 16 Dec 2001 10:40:42



> Hi,
>    First of all this is all based on Linux, with the Java
> application running on Windows based PC's

>    I'm currently designing a system where (up to) 8 seperate
> processes (all same, just attached to different serial lines) need to
> send data to a socket for status/diagnostics/etc. information.

>    Basically I've got 8 processes which monitor the serial
> connections for data. When data appears they then receive the
> information (electronic orders), drop the files onto a network share
> drive, the main machine then processes the files, they're then dropped
> back into another network share drive and the seperate processes send
> the files back to their respective senders.

>    The need I have is to be able to monitor the traffic/status
> remotely. My idea is to use a Java application sitting on the remote
> PC(s) which monitor a specific port of the comms. machine to
> receive/show the information.

>    Now I've never done this before, but what I want to do is have
> only 1 socket open, and for all information to go down this socket for
> the Java app. to receive and display (each packet will contain an ID
> so the information is displayed correctly at the other end).

>    So basically I need to know the following;-

>    Can several processes all open the same socket on the host PC?

>    If yes, then are there any issues I should be aware of ?

>    If no, then should I use IPC (inter process control) to send
> all information to a control process which then controls the socket ?

>    or am I better having seperate sockets for each process ?

> Any help/hints/pointers gratefully received
> Regards
> Neil E.
> Remove [removetoreply] from email address to mail me direct

Hi,

I've been doing something along these lines myself, lately. In your
case I would have a server on the machine whose processes you want to
monitor. Use IPC Message Queues to send it the status info from your
processes.

In my app I used UDP to connect the observers [your java progs] to the
server. The server keeps a list of the host and port of each observer,
and forwards the messages on to each.

Brenton

 
 
 

1. Best ways to increase the security of my linux box

        Can anyone tell me how I should go about securing my linuyx box
from hackers or other potential threats?  What things are out there that
come with the standard slackware bvuild that should be secured?  Programs
that may test weaknesses of my box?  Any and all advice is needed.  Im
trying to keep away from making my box a firewall, but advice in that sort
and recommendations are greatly appreciated.  Thanks in advance.

2. kde20010119 cvs: `x11r5.keytab', needed by `all-am'

3. Best ways to handle function keys?

4. Can a Workstation shar the internet?

5. Q: The Best Ways to Have 4GB Linux Box

6. ALG 2301 under Linux

7. Best ways to optimise Linux

8. RedHat 6.0 Internet Connection Problem

9. Best ways of searching web pages - wais, swish etc

10. The best ways to connect a Win95 box to a Linux box ???????

11. Best Backup Solution

12. Synchronizing Internal and external website? the best solution?

13. Best backup solution...