Distributed Observer Pattern use CSLA ???

Distributed Observer Pattern use CSLA ???

Old forum URL: forums.lhotka.net/forums/t/10876.aspx


st3fanus posted on Monday, November 14, 2011

Hi all,

I don't know is it correct to post this questions here, because i still in the learning of CSLA.NET 4

I have scenarios :

1. Distributed application , said 4 physical client.

2. What is the best architecture or design for this goal ??

    I want client A can does a certain transaction and the result of this transaction is needed to be refresh on client B screen immediately as soon as client A submit their jobs into app.

3. And what about is the situation is complicated with different location on internet for example. Is there any good solution for this scenarion

 

My imagination currently that it's look like observer pattern on the same machine / active screen which is an action will be notify another active screen for the result. But i don't have an idea if they separated on several machine ??

 

Note : I'll develop on CSLA.NET

thanks a lot

stefanus

RockfordLhotka replied on Tuesday, November 15, 2011

This topic comes up a couple times a year.

This is very difficult to solve, and there is no pre-existing solution that I'm aware of.

You need a publish/subscribe mechanism by which every client can subscribe to a server so that server can pass messages to the client(s). This requires the client to implement some type of polling, or use raw TCP sockets (almost all solutions use polling - or one of the dual http WCF bindings, and they use polling).

st3fanus replied on Tuesday, November 15, 2011

Hi all thanks for quick response,

I'm sorry for my less experience before, but I still can't understand about

RockfordLhotka

This is very difficult to solve, and there is no pre-existing solution

although I haven't known how to solve this problem.

here http://forums.lhotka.net/forums/t/10875.aspx  jonny give me a suggestion about using WCF ( WSDualBinding ).

I haven't create SOA or WCF before ( I'll try it soon ) but i have a mind that :

If I can create a server with WCF interface like Roc said on http://forums.lhotka.net/forums/t/10875.aspx which communicate with client use Message contract based.

For example :

I have A, B, C distributed app, said A as a server , B as Head Office, C as Branch Office.

and then user on B do an action to change some data, and immediatelly send a message ( include changed data ) into A ( server app ).

and then A can notify C that some thing changed so C can refresh it self without user intervention ( screen on C app refresh automatically ).

 

Above is scenario that i can imagine currently, Could you ( all  ) tell to me that Is my plan here is possible or not ?

Or if it very difficult could you tell me where are the difficult points ? so I can know before I pass a long with this flow ??

 

Thanks a lot

StefanCop replied on Wednesday, November 16, 2011

Solving a "Distributed Observer Pattern" in general is very difficult.

However, if you can state requirements, which hold for your system, then a solution of the general problem might become easier.
It then just fits your needs. This is not bad at all. It's a tailored solution.

The mentioned products / frameworks can help. From your requirements you're able to tell, how well they fit.

I found ATAM a very useful approach not only to verify if a choosen architecture is adequate, but also to write (mostly non-functional) requirements for an architecture or part of it. The key elements to me of the approach is a) define "empty words" (i.e. scalable, distributed) through concrete scenarios, and to priorize the statements (include also what is not needed).

 

StefanCop replied on Tuesday, November 15, 2011

I totally agree with Rocky

RockfordLhotka
This is very difficult to solve, and there is no pre-existing solution that I'm aware of.

Back in the 90s, we wanted to build this, too. And we thought being lucky, because our DB engine supports that kind of notification as a feature. However, when using it, it turned out to be too slow (only 5 user in a LAN, ok in the 90s).  Therefore, we changed to the lousy behaviour of windows file explorer (go with possible outdated data until you got an exception, the refresh).

Lesson learned: make life not too hard; the easy solution often is sufficient.

xAvailx replied on Tuesday, November 15, 2011

NServiceBus

http://www.nservicebus.com/

and/or

SignalR

https://github.com/SignalR/SignalR

May be worth looking into...

Copyright (c) Marimer LLC