|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Shared EventsI have a DLL that handles connectivity with my SQL database. There will be
several applications creating an instance of this DLL for their data needs, all operating on the same common table(s). The DLL has a method that Raises an Event when it deletes a record (the intent is that applications that have an instance of the DLL will be able to refresh their views of the data). I was under the assumption that desinating the Event as a Shared Event would allow ALL instances to receive the event. This is not what is happening. Currently, only the application that is requesting the Deletion is receiving the Event. Any thoughts about what I'm doing wrong? Are my assumptions correct? Thank you in advance, Sam =?Utf-8?B?U2Ft?= <S**@discussions.microsoft.com> wrote in
Show quoteHide quote news:C9A67E5E-51B7-43C7-9FDF-6FEFCB411DEE@microsoft.com: Shared Events are only valid in the current AppDomain, events are not > I have a DLL that handles connectivity with my SQL database. There > will be several applications creating an instance of this DLL for > their data needs, all operating on the same common table(s). The DLL > has a method that Raises an Event when it deletes a record (the intent > is that applications that have an instance of the DLL will be able to > refresh their views of the data). I was under the assumption that > desinating the Event as a Shared Event would allow ALL instances to > receive the event. This is not what is happening. Currently, only > the application that is requesting the Deletion is receiving the > Event. > > Any thoughts about what I'm doing wrong? Are my assumptions correct? propogated to other instances (imagine if the events did propogate... that could be a major security issue!). What you need is a N-Tier design - your clients need to connect to a middle tier which acts as a broker between the backend (data tier) and the display tier (GUI/client). When the client (GUI) submits a delete record to the middle tier, the middle tier submits the request to the data tier. When the data tier successfully deletes the record, the middle tier informs the clients to update their view. Some technologies you look at include: Web Services (requires polling to do what you require) Remoting / WCF Personally I'll recommend remoting since you can do bi-directional communications with a little persistence. If you go the remoting route, take a look at Geninue Channels which will speed your development greatly. SQL Server notification services can also be used to notify the clients - but for what you want to do, you're probably better off building your own custom tier. So what you like to do is not trival - you'll need to do some planning and reading up on multi-tier application architecture. Since you're clients are working with disconnected data... you'll also have to handle concurrency (Client A deletes a record while Client B is working on it. Client B then saves the record...). Also take a look at LLBLGen Pro - it's a data layer generator. It can provide you with a good foundation to layer your tiers on top of. Feel free to post a reply if you need more clarification. First, let me thank you for taking the time to so thoroughly answer my
question. It was an excellent answer. I guess I was hoping to get something "for free" but your point about security is spot on. Thanks again, Sam Show quoteHide quote "Spam Catcher" wrote: > =?Utf-8?B?U2Ft?= <S**@discussions.microsoft.com> wrote in > news:C9A67E5E-51B7-43C7-9FDF-6FEFCB411DEE@microsoft.com: > > > I have a DLL that handles connectivity with my SQL database. There > > will be several applications creating an instance of this DLL for > > their data needs, all operating on the same common table(s). The DLL > > has a method that Raises an Event when it deletes a record (the intent > > is that applications that have an instance of the DLL will be able to > > refresh their views of the data). I was under the assumption that > > desinating the Event as a Shared Event would allow ALL instances to > > receive the event. This is not what is happening. Currently, only > > the application that is requesting the Deletion is receiving the > > Event. > > > > Any thoughts about what I'm doing wrong? Are my assumptions correct? > > Shared Events are only valid in the current AppDomain, events are not > propogated to other instances (imagine if the events did propogate... > that could be a major security issue!). > > What you need is a N-Tier design - your clients need to connect to a > middle tier which acts as a broker between the backend (data tier) and > the display tier (GUI/client). When the client (GUI) submits a delete > record to the middle tier, the middle tier submits the request to the > data tier. When the data tier successfully deletes the record, the > middle tier informs the clients to update their view. > > Some technologies you look at include: > > Web Services (requires polling to do what you require) > Remoting / WCF > > Personally I'll recommend remoting since you can do bi-directional > communications with a little persistence. If you go the remoting route, > take a look at Geninue Channels which will speed your development > greatly. > > SQL Server notification services can also be used to notify the clients > - but for what you want to do, you're probably better off building your > own custom tier. > > So what you like to do is not trival - you'll need to do some planning > and reading up on multi-tier application architecture. > > Since you're clients are working with disconnected data... you'll also > have to handle concurrency (Client A deletes a record while Client B is > working on it. Client B then saves the record...). > > Also take a look at LLBLGen Pro - it's a data layer generator. It can > provide you with a good foundation to layer your tiers on top of. > > Feel free to post a reply if you need more clarification. >
Herfried K. Wagner - HELP!
Return ByRef How to create ForeignKeyConstraint? How-To Parse this data.. Writing to a MS access db from visual studio .net Retrieving Values from Dynamically Created Controls Changing file name The breakpoint will not currently be hit converting minutes into hrs mins Utility to remove comments in vb.net files |
|||||||||||||||||||||||