Hi LabWindows Users,
I have a couple of questions regarding the use of the NI datasockets technology to share information between two applications which I have written in LabWindows/CVI. The first question is more of an architecture question and the second is an access issue. Please refer to the attached diagram during the discussion.
The two applications I have called A and B and they are running on different PC's which I have called host 1 and 2. There is an isolated Ethernet network connecting the two hosts. Application A can control application B through one datasocket and application B provides information back to application A on a separate datasocket. The applications launch the datasocket server(s) on their respective hosts on startup and shutdown the datasocket servers on exit. The architecture question is which one of the 3 options is preferred? In option 1 application A writes the control information to localhost and reads the data from the host 2 IP address. In option 2 application A writes/reads control/data from host 2 IP address while application B reads/writes control/data from localhost. This requires using the datasocket server manager on host 2 to allow a write to occur to its datasocket from host 1. In option 3 application A reads/writes data/control from/to localhost while application B reads/writes to host 1 IP address. This requires using the datasocket server manager on host 1 to allow write access to its datasocket from host 2. The option that seems to make the most sense to me is option 2.
Now on to the access issues. In option 1 I have startup issues depending on which application is started first. Since the applications launch the servers the application that starts first does not have a datasocket to connect to on the opposite host. If I start the datasocket server independently of the first application I can make option 1 work. In option 2 I start application B first but then get an error when starting application A. The error is datasocket error code (80070005 hex - access denied) on the control datasocket but the datasocket that provides information works fine. In other words application A can read from the host 2 datasocket server but not write to it. In option 3 I start application A first and then application B and everything works fine. I am wondering why in option 3 I can get application B to write to the datasocket server on host 1 but with option 2 I can't get application A to write to the datasocket server on host 2. I have used the datasocket server manager on each host to enable writing from everyhost. Is there some other network priviledge on host 2 that could be causing the problem with option 2? Both PC's are running windows 2000 and are logged in with administrator priviledge. I have tried to compare the network settings on both PC's but I can't find significant differences.
Thanks in advance for your help,
Jim Vander Werp
GE Aviation
Grand Rapids, MI