Reputation: 4092
I have a WCF service (not RIA) that I access from Silverlight. The application has fast incoming data, twitter data of course ;) which is written to a SQL Server database. The WCF service is in a separate web project and I poll the server every 10 seconds from Silverlight.
I've noticed it slowing down recently, probably due to volumes, although I limit it to 100 objects per request (adding a Take(100) statement to all the queries).
I put a debug.writeline statement in the constructor for my WCF service and the output window showed it constructing for each request, I think this is bad as I stupidly put my construction of different repositories etc in there so each request must be making several new objectcontexts.
Is there anyway for Silverlight other than polling the service and how best is it to setup a WCF service for my scenario of clients wanting small amounts (<=100 objects) of data frequently?
Upvotes: 1
Views: 282
Reputation: 7110
You could take a look at the HttpPollingDuplex binding or something like http://laharsub.codeplex.com/
Upvotes: 2