![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I'm new to .NET remoting (and don't have DCOM experience either!), so please bear with me... I have created a windows service application that reads data from an RFID reader (via serial port) and writes parts of that data to a database (MS SQL server). So far, so good. Now I need to create a GUI for that application which will basically be a windows form with two grids on it, showing the data from the database. This GUI application should be mainly running on the same workstation that the service runs on, but it would be nice if it could be run on other workstations as well (at the same time). Now (finally!) here is where remoting comes in (I think): whenever new data is written to the database, the service application should notify all "watching" workstations about the newly arrived data so they can refresh their display. I wouldn't want have the GUI "pull" the database for new data every XXX seconds as I need almost immediate response time (not real-time, though). From my understanding, I should be able to solve this using .NET remoting. I have just created a small "hello world" application and was going to dive in deeper, when I noticed that there are way too many options to get it right. Maybe anyone has done a similar application and is willing to share some thoughts? Or maybe even a professional remoting guy can jump in here and put me in the right direction... Thanks! Jens |
#3
| |||
| |||
|
|
Hi Jens, Remoting would indeed be a good solution to your problem. The model you describe would work well - You would write a remotable object, that would act as a server for communications with the workstations. This remotable object would have one or more events, indicating the status of new data updated (DataUpdate or such named event). The service that imports the data would host this remotable object, as a remoting server. In turn, all the workstation clients would marshal the remotable object from the importing service, and subscribe to the DataUpdate event. When the importing service gained new data, it would write to the db, as well as informing the remotable object what the new data was. The remotable object would process this, and trigger the DataUpdate event. Usign a custom-written delegate, the event would contain the sufficient information required by the workstation to display what had just been updated / received. Hope that helps. Regards, Alvaro "Jens Weiermann" <spamgoeshere (AT) wexman (DOT) com> wrote in message news:1109g366ua2oq.dlg (AT) prog02 (DOT) wexman.com... Hi, I'm new to .NET remoting (and don't have DCOM experience either!), so please bear with me... I have created a windows service application that reads data from an RFID reader (via serial port) and writes parts of that data to a database (MS SQL server). So far, so good. Now I need to create a GUI for that application which will basically be a windows form with two grids on it, showing the data from the database. This GUI application should be mainly running on the same workstation that the service runs on, but it would be nice if it could be run on other workstations as well (at the same time). Now (finally!) here is where remoting comes in (I think): whenever new data is written to the database, the service application should notify all "watching" workstations about the newly arrived data so they can refresh their display. I wouldn't want have the GUI "pull" the database for new data every XXX seconds as I need almost immediate response time (not real-time, though). From my understanding, I should be able to solve this using .NET remoting. I have just created a small "hello world" application and was going to dive in deeper, when I noticed that there are way too many options to get it right. Maybe anyone has done a similar application and is willing to share some thoughts? Or maybe even a professional remoting guy can jump in here and put me in the right direction... Thanks! Jens |
#4
| |||
| |||
|
|
Hi Jens, Remoting would indeed be a good solution to your problem. The model you describe would work well - You would write a remotable object, that would act as a server for communications with the workstations. This remotable object would have one or more events, indicating the status of new data updated (DataUpdate or such named event). The service that imports the data would host this remotable object, as a remoting server. In turn, all the workstation clients would marshal the remotable object from the importing service, and subscribe to the DataUpdate event. When the importing service gained new data, it would write to the db, as well as informing the remotable object what the new data was. The remotable object would process this, and trigger the DataUpdate event. Usign a custom-written delegate, the event would contain the sufficient information required by the workstation to display what had just been updated / received. Hope that helps. Regards, Alvaro "Jens Weiermann" <spamgoeshere (AT) wexman (DOT) com> wrote in message news:1109g366ua2oq.dlg (AT) prog02 (DOT) wexman.com... Hi, I'm new to .NET remoting (and don't have DCOM experience either!), so please bear with me... I have created a windows service application that reads data from an RFID reader (via serial port) and writes parts of that data to a database (MS SQL server). So far, so good. Now I need to create a GUI for that application which will basically be a windows form with two grids on it, showing the data from the database. This GUI application should be mainly running on the same workstation that the service runs on, but it would be nice if it could be run on other workstations as well (at the same time). Now (finally!) here is where remoting comes in (I think): whenever new data is written to the database, the service application should notify all "watching" workstations about the newly arrived data so they can refresh their display. I wouldn't want have the GUI "pull" the database for new data every XXX seconds as I need almost immediate response time (not real-time, though). From my understanding, I should be able to solve this using .NET remoting. I have just created a small "hello world" application and was going to dive in deeper, when I noticed that there are way too many options to get it right. Maybe anyone has done a similar application and is willing to share some thoughts? Or maybe even a professional remoting guy can jump in here and put me in the right direction... Thanks! Jens |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |