Re: Real time notification

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Sachil,

I have worked on an application that did exactly that. That was a financial
system too, so let me share what I learnt out of that first .. maybe you'll
find it helpful.

In my scenario atleast, I had so much data to worry about, so my first
reaction was that I will use a database. Beacuse a database inherently goes
to the file system, and it does involve a lot of transactional locks, a
database really didn't give me the right architecture. I instead then ended
up creating a huge in-memory cache of data in unmanaged C++. The data I was
managing was a huge 12 GB in-memory cache of symbols and their historical
prices. Various algorithms would run on that data, to analyze the historical
data - a database would just not have cut it.

Thought I'd share my experience on the implementation difficulties I faced
:), but irrespective of if you choose a database or an in-memory cache, this
is more a remoting problem than an ADO.NET problem. Generally for eventing
there are two approaches.

a) Logical - The central server informs the clients of a change. Generally
not scaleable, but better response time. This can be implemented in Sql2k as
an extended stored proc that touches a file, a FileDependency object that
fires up some code to send off a notification. SQL2k5 has much better
alternatives.

b) Better approach - The remote clients keep checking for a change (I know
this sounds crazy in a millisecond environment but keep reading). Usually
the change check is implemented as "IsUpdateAvailable". If one is available,
a second method call is made to the central server farm, which returns the
actual data. This can live within the millisecond delay range, on a LAN
environment but what is notable about this approach is that the server is
stateless, so you can network load balance it as your needs grow. Might I
point that IM services, such as MSN messenger rely on this kind of
approach - and that is quite instantaneous huh? :)

Now, you can choose either a) or b), but if you are writing this application
for hundereds of users, you may want to go with approach b instead.
Specifically in approach a), the client is *listening* for a notification,
and in approach b) the server is listening. So this means once you have such
a notification setup, you can simply setup a CAO remoting service to fulfill
the necessary communication. In approach a) the service would have to exist
on both the client and the server, but in approach b) the service would
exist only on the server :).

Hope this helped. Sorry for the longdrawn answer, I'm a bit high on coffee
;-)

- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.malik/archive/2005/05/13/63199.aspx
----------------------------------------------------------------------------





"Sachil Sawhney" <sachilsawhney@xxxxxxxxx> wrote in message
news:eET1cnfzFHA.460@xxxxxxxxxxxxxxxxxxxxxxx
> Thanks Sahil for quick reply.
>
> To give some more details, the application is used by traders in a
> investment bank and is being used for making buy/sell decisions for high
> dollar value trades. Delay of few milli seconds is acceptable, but lower
> the delay is better it is. Data being updated are booked trades, and
> market conditions/indexes at that point of time and some other data from
> service like bloomberg. so, faster we are better/safe we are.
>
> Network connection i believe is 1 GB ethernet and is pretty reliable and
> fast enough as we are on same network as that of other core trading
> apps.
>
> regards
> Sachil
>
> *** Sent via Developersdex http://www.developersdex.com ***


.



Relevant Pages

  • RE: Printing from Win9x clients stops
    ... > and make sure this software does not interfere with SBS Server. ... > clients, please disable it and try again. ... Create a local printer and redirect the port to the network server. ...
    (microsoft.public.windows.server.sbs)
  • Re: Remote data entry solution needed for Access 2007
    ... Users open the database remotely and use its forms to enter data. ... Why it doesn't work: network lag time. ... our network admin says our Citrix server is 2000 and ... HTML-based form working with an ASP file to send data to the database. ...
    (microsoft.public.access.externaldata)
  • Re: ISA Server & a WiFi Hotspot (some DHCP for good measure too)
    ... ISA2k4 is currently not supported on SBS ... To review - you have LAN clients that you want to have ... card for your server. ... > network with 5 client computers. ...
    (microsoft.public.windows.server.sbs)
  • RE: Users Cant Access Documents on Server
    ... Thanks for using the SBS newsgroup. ... As well as we know, if a workstation would not access network shares, then ... Leave the Default Gateway of the internal NIC blank of the server box. ... Clients That Require SMB Signing ...
    (microsoft.public.windows.server.sbs)
  • Re: Audio CODEC choices
    ... You specify that a dedicated network should be used. ... A proper TCP/IP stack on the clients will require ... buffering on the server side with a few megabyte ... 48 kHz band limited stream. ...
    (comp.arch.embedded)