Notification

Icon
Error

mf 4.1 DWPS server slow response
Kelly
#1 Posted : Monday, June 25, 2012 11:01:07 PM(UTC)
Rank: Newbie

Joined: 6/25/2012(UTC)
Posts: 0

I'm running the netmf demo dwps server and modified the client to do 10 calls to get an idea of the time it takes to do a simple call. 


   for (int x = 0; x < 10; x++)
   {    
       DateTime start = DateTime.Now;
       string resp = client.HelloWCF("World");
       Console.WriteLine(string.Format("{0}, took {1}ms",resp,DateTime.Now.Subtract(start).Milliseconds));
    }


 Turns out it takes about 450ms per call to hello


Heres the output from the loop running on my laptop talking to a Fez Cobra running the dwps server.


Hello World, took 653ms
Hello World, took 418ms
Hello World, took 404ms
Hello World, took 406ms
Hello World, took 422ms
Hello World, took 404ms
Hello World, took 425ms
Hello World, took 405ms
Hello World, took 425ms
Hello World, took 403ms


Press any key to exit


Just wondering if anyone else is getting slow responses. 


My plans were to interface to the FEZ Cobra via a MS Robotics DSS service to control a bot. but I think I need faster response then 1/2 second/call.



 

Gus Issa
#2 Posted : Tuesday, August 21, 2012 7:58:41 AM(UTC)
Gus Issa

Rank: Tinkerer

Joined: 1/14/2010(UTC)
Posts: 17

Interesting project. Was there any progress on this? Maybe contact GHI directly to learn about other options.

Kelly
#3 Posted : Tuesday, August 21, 2012 8:30:28 AM(UTC)
Rank: Newbie

Joined: 6/25/2012(UTC)
Posts: 0

Yes actually, I explored several routes, I believe the reason that the above method is so slow is that there is alot of text processing needed in using dwps(I believe it's all xml).

I decided to run a tcp client and server model transfering data in a binnary method between them. It's much faster and I think it will work.

Using the "Easy" way sacrifices time, I suspect that is because the libraries are developed in a mannor that makes them more universal so theres alot more code that needs to run to translate the data from/to poco.
Zach Libby
#4 Posted : Tuesday, August 28, 2012 6:03:05 PM(UTC)
Zach Libby

Rank: Tinkerer

Joined: 2/5/2010(UTC)
Posts: 243

Was thanked: 8 time(s) in 8 post(s)
Part of the delay is caused by opening/closing the connection for every message. Since v4.2 you can use a persistent connection to improve communication for multiple calls. When creating your Http transport binding you can use the persistConnection parameter to improve performance.

public HttpTransportBindingConfig( string serviceUrn, int port, bool persistConnection )


Also for events you can use the following property:
DpwsWseSubscriptionMgr.PersistEventConnections

Let me know if you have any questions.

Thanks,
Zach
1 user thanked Zach Libby for this useful post.
on 10/23/2012(UTC)
Rss Feed  Atom Feed
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.052 seconds.