Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Remoting / March 2007

Tip: Looking for answers? Try searching our database.

Help on proper method ????

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
calderara - 25 Feb 2007 11:25 GMT
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

serge
Spam Catcher - 26 Feb 2007 07:15 GMT
>  1 - Client application call a method in my application lib (DLL) when
> requesting data
[quoted text clipped - 3 lines]
> alarms, so just for that the time between the request and the delivery
> of data mUST be really fast.

How fast is fast?

> 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.

Your server should push alarms to the clients?

> 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 ?

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
it specifically :-)
calderara - 26 Feb 2007 08:00 GMT
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

> >  1 - Client application call a method in my application lib (DLL) when
> > requesting data
[quoted text clipped - 26 lines]
> Remoting is OK for this alarms, but there are other protocols which do
> it specifically :-)
Spam Catcher - 26 Feb 2007 14:58 GMT
> Thnaks for your reply..
>
> Fast for my application means at least that data should be return
> within 500ms to the client application.

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.

> 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..
calderara - 26 Feb 2007 15:13 GMT
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

> > Thnaks for your reply..
> >
[quoted text clipped - 13 lines]
> > local to the running system and will be SQL 2005 express Adavnce
> > services version..
msgroup - 26 Feb 2007 15:42 GMT
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,

> Dear all,
>
[quoted text clipped - 13 lines]
> 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.

  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.

> 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.

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

> 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 ?

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.

> thnaks for your help
> regards
>
> serge
calderara - 27 Feb 2007 07:31 GMT
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

> Hi, calderara:
>
[quoted text clipped - 52 lines]
> >
> > serge
Spam Catcher - 27 Feb 2007 16:45 GMT
> What do you mean by publisher methode from my applciation side ? is it
> just the fact that it send data back to my cllient?

He means to push the events from the server --> client.
msgroup - 27 Feb 2007 17:48 GMT
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,

>> What do you mean by publisher methode from my applciation side ? is it
>> just the fact that it send data back to my cllient?
>
> He means to push the events from the server --> client.
calderara - 01 Mar 2007 07:55 GMT
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

> > What do you mean by publisher methode from my applciation side ? is it
> > just the fact that it send data back to my cllient?
>
> He means to push the events from the server --> client.
msgroup - 01 Mar 2007 13:46 GMT
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

> 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 ?.

   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.

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

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

> thnaks for help
> serge
[quoted text clipped - 3 lines]
>>
>> He means to push the events from the server --> client.
calderara - 01 Mar 2007 16:05 GMT
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

> Hi, Serge:
>
[quoted text clipped - 33 lines]
> >>
> >> He means to push the events from the server --> client.
Spam Catcher - 01 Mar 2007 17:28 GMT

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

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
your life even easier!
msgroup - 01 Mar 2007 23:22 GMT
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,

> HI,
>
[quoted text clipped - 57 lines]
>> >>
>> >> He means to push the events from the server --> client.
Spam Catcher - 01 Mar 2007 17:27 GMT
> 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 ?.

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.

> - or do you think I should read them from database each time a request
> is comming
calderara - 01 Mar 2007 21:58 GMT
does thsi notification event is present also in sqlexpress 2005 ?

> > 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
[quoted text clipped - 9 lines]
> > - or do you think I should read them from database each time a request
> > is comming

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.