all groups > dotnet remoting > february 2007 >
You're in the

dotnet remoting

group:

Help on proper method ????


Help on proper method ???? calderara
2/25/2007 3:25:05 AM
dotnet remoting:
Dear all,

I am building an application which is used to send to an other apllication a
set of information from a databased source when the request is issue from the
client application. IN other words it works as follow :

1 - Client application call a method in my application lib (DLL) when
requesting data
2- When client application receive the data, it displays it for user.

The problem is that data that need to be show for user are machine alarms,
so just for that the time between the request and the delivery of data mUST
be really fast. As data a re ciming from a databased, we all know that it
could takes more time to read data than the time machine alarms arrive.

I was thinking of some asynchronous method becasue during the time my
application is collecting data from database the lient applciation should
continmue to pool new incoming alarms from machine.

So in on side I am a pooling process of alarms and in the other side I have
my application which should return as fast as possible data to client.

How can I implement that in my application ? what is the best method ?

thnaks for your help
regards

Re: Help on proper method ???? Spam Catcher
2/26/2007 12:00:00 AM
=?Utf-8?B?Y2FsZGVyYXJh?= <calderara@discussions.microsoft.com> wrote in
news:C4003C56-6CB0-4725-8A98-2F3081DC5F16@microsoft.com:

[quoted text, click to view]

How fast is fast?

[quoted text, click to view]

Your server should push alarms to the clients?

[quoted text, click to view]

You should take a look at:

SNMP
Syslog
Raw Sockets (or a Socket Remoting Framework)

Remoting is OK for this alarms, but there are other protocols which do
Re: Help on proper method ???? calderara
2/26/2007 12:00:03 AM
Thnaks for your reply..

Fast for my application means at least that data should be return within
500ms to the client application.

Note also that the database for which data are coming from is only local to
the running system and will be SQL 2005 express Adavnce services version..

Regards
serge

[quoted text, click to view]
Re: Help on proper method ???? calderara
2/26/2007 7:13:48 AM
We do not want the client applciation to connect directly to database simply
becasue the client application is an OEM external system and we do not want
this external company to know our database information and structure.

For that we just provide an interface for them

regard
serge

[quoted text, click to view]
Re: Help on proper method ???? msgroup
2/26/2007 10:42:18 AM
Hi, calderara:

It seems to me that you need to build an internet enabled system with
publisher and scubscriber pattern. This is something like real-time
notification at the site
http://www.udaparts.com/document/articles/chatservice.htm

Also, see my inline comments.

Regards,


[quoted text, click to view]

Your client application for machine alarms must be subscriber. Your data
source is a publisher. When there is an interesting event to your data
source, all you need to do is to sent a proper message to your client
application. Once your client application gets the message, it can take a
proper procedure for the next step after analyzing the message.

[quoted text, click to view]

Yes. You are right! You need some asynchronous methods for fast and
real-time notification, as shown in our SocketPro at www.udaparts.com.

[quoted text, click to view]

Don't write it yourself. Our SocketPro is a high speed remoting system. Its
latency is your network latency. It can take less than 0.2 ms (or 200 us) to
deliver a message from a server to a client.

[quoted text, click to view]

Re: Help on proper method ???? Spam Catcher
2/26/2007 2:58:56 PM
=?Utf-8?B?Y2FsZGVyYXJh?= <calderara@discussions.microsoft.com> wrote in
news:C6234BFA-3344-4A2D-97FF-9CBE8AEBBCA2@microsoft.com:

[quoted text, click to view]

If you need such speed, why not directly connect to the database and
retrieve alarm information?

But if you do want the potential for network access in the future, I would
probably use sockets.

While remoting is fast enough for most situations... it might not be fast
enough for 500ms.

[quoted text, click to view]
Re: Help on proper method ???? calderara
2/26/2007 11:31:11 PM
Thnaks for your comments..

What do you mean by publisher methode from my applciation side ? is it just
the fact that it send data back to my cllient?

On more information, my application is collecting data from a local SQL
express with advance services edition...

The client application willl request data from that database only throught
our library interface. This for security and company knowledge as the client
application is an OEM application that I have no control...

regards
serge

[quoted text, click to view]
Re: Help on proper method ???? msgroup
2/27/2007 12:48:09 PM
Hi, Spam Catcher and serge:

Thanks a lot. You are right.

It seems to me that Serge really needs real-time notification system if
I understand his question correctly, which reduces the amout of data
transferred between third party application (Serge's application dll) and
Serge's server. You may need to turn on our SocketPro online compression for
large throughput.

I wish the articles at
http://www.udaparts.com/document/articles/chatservice.htm and
http://www.udaparts.com/document/Tutorial/TutorialThree.htm

1. Make sure that you send the data just needed, no more and no less
with a good architecture.
2. Turn on online compression for large throughput as shown in
attached samples inside our SocketPro.
3. 100% network usage at
http://www.udaparts.com/document/Tutorial/TutorialThree.htm.
4. Reduce latency for better third-party client window user interface
response.

Regards,


[quoted text, click to view]

Re: Help on proper method ???? Spam Catcher
2/27/2007 4:45:32 PM
=?Utf-8?B?Y2FsZGVyYXJh?= <calderara@discussions.microsoft.com> wrote in
news:CCF3D645-CBEA-40D1-BC0F-CDE259F374AC@microsoft.com:

[quoted text, click to view]

Re: Help on proper method ???? calderara
2/28/2007 11:55:00 PM

OK fine..

Doing this in that way do you think it is better ?
- to read all data from database and store them in memory ready to be push
when request ?.

- or do you think I should read them from database each time a request is
comming

thnaks for help
serge
[quoted text, click to view]
Re: Help on proper method ???? calderara
3/1/2007 8:05:42 AM
HI,

I do not need to keep syncronistaion of memeory with back end database
becasue data which are pushed are configuration data that never change. There
are not live data but more a predifine message structure base on a
configuration.

Whnen a request is coming, I should be abvle to send back message 1, message
2, or message 3 depending on the request...

SO storing in memory mind be ok, but what do you thing culd be the limit
size for this time solution ?

regards

[quoted text, click to view]
Re: Help on proper method ???? msgroup
3/1/2007 8:46:19 AM
Hi, Serge:

See my inline comments. Analyzing your business requirements, select a
proper way!

Regards,

Do you know batching, asynchrony and parallel computation with online
compression? See the sample project SocketPro at www.udaparts.com


[quoted text, click to view]

This is faster, but you may need to write code for synchronizing memory
cache and backend database. Also, you may need to lock the memory cache if
you need to access it from different threads. If your memory cache is too
large, maybe this method is not a proper way.

In short, if you can surely synchronize memory cache and backend
database and memory cache is not too large, this way may be preferred.

[quoted text, click to view]

This way is simpler, but it is slightly slower because a request has to
be sent to a backend database.


[quoted text, click to view]

Re: Help on proper method ???? calderara
3/1/2007 1:58:10 PM
does thsi notification event is present also in sqlexpress 2005 ?

[quoted text, click to view]
Re: Help on proper method ???? Spam Catcher
3/1/2007 5:27:03 PM
=?Utf-8?B?Y2FsZGVyYXJh?= <calderara@discussions.microsoft.com> wrote in
news:55586CB6-DA81-47CA-AC2F-DD97E6F51B8C@microsoft.com:

[quoted text, click to view]

I would store in memory and mirror the data to the database.

Of course it depends on how many alerts your expecting.

BTW, SQL Server 2005 has an notification service which can push database
table changes as events. Might be worth to take a look.



[quoted text, click to view]
Re: Help on proper method ???? Spam Catcher
3/1/2007 5:28:48 PM
=?Utf-8?B?Y2FsZGVyYXJh?= <calderara@discussions.microsoft.com> wrote in
news:90F13031-EE74-4746-962B-EBC03899C91F@microsoft.com:

[quoted text, click to view]

Memory (RAM) is cheap these days. So you could theoretically store GBs of
data in RAM ;-)

Since you don't need to sync stuff from memory to the database, that makes
Re: Help on proper method ???? msgroup
3/1/2007 6:22:11 PM
Hi, calderara:

For time solution, it mainly depends on your Network latency. To find
the best resultion, you can ping your client from your server. The ping time
is your best resolution you can get.

The max time resultion is your network latency. For LAN (local area
network), it should be less than 0.5 ms (or 500 us). For WAN, it should be
less than 30 ms, which is dependent on ping time from your server to your
client machine.

If you can batch and broadcasting multiple messages in one call like we
do at the site http://www.udaparts.com/document/articles/chatservice.htm,
the time resolution can be improved further. If your message is large, you
turn on online compression so that message size is reduced and transferred
at the fastest speed.

Wish the above hint is useful to you.

Regards,

[quoted text, click to view]

AddThis Social Bookmark Button