markpcasey
markpcasey

Reputation: 559

Observer Pattern ASP.NET Pages

I am working on a project whereby I am trying to push updates to the master page in the website.

I have implemented the observer pattern and initialised the relevant class in the global asax under application.

I run 2 copies of the site say page copy A & page copy B I am trying to fire an event whereby when I click on A the event fires and all my page instances are updated at the moment only A is updated.

Is it possible where I can cause multiple instances to update? such as in a chatroom?

Should I use a mediator pattern?

Thanks in advance.

Upvotes: 1

Views: 379

Answers (1)

Ryan Gross
Ryan Gross

Reputation: 6515

It looks like you are looking for the Comet Pattern. This allows your client pages to open long-running HTTP Queries to your website. However, I don't recommend using this pattern as it is not very scalable.

HTML 5 allows you to open a socket connection from the browser with Web Sockets that is pretty well supported by modern browsers. This allows you to open a socket connection to your server to allow you to inform clients when updates are available.

You could also use Flash or Silverlight to accomplish this.

Upvotes: 1

Related Questions