multithreading - WCF Long Polling in 2013 -
having gone through few reads, including...
- http://anthymecaillard.wordpress.com/2012/06/06/wcf-real-time-web-development-with-long-polling/
- how wcf server inform wcf client changes? (better solution simple polling, e.g. comet or long polling)
...i think i'm ready give long polling shot.
from second link, understanding async pattern allows to:
- receive request on wcf server
- call beginmymethod returns iasyncresult
- hang onto iasyncresult somewhere while thread received request "safely rests" - or released? - without consuming additional resources
- "whip iasyncresult out" when relevant business logic event occurs
- use iasyncresult call endmymethod, during complete response (i.e., write data client)
do assumptions sound correct? assume vastly scalable due above mechanism keeping 0 threads tied waiting events.
is best way implement wcf long polling today , .net 4.5?
i believe initial impressions wrong. when wcf request handler thread receives request , hands off worker thread, i'd thought resources somehow being magically freed. isn't case worker thread becomes 1 doing waiting! which, request volume gets large, doesn't sound more scalable traditional polling.
while frameworks signalr offer long polling, don't think there's way construct natively in wcf in manner doesn't tie threads.
some additional useful links came across. shockingly appear recommend traditional polling scalability point of view.
- http://www.codeproject.com/articles/186723/push-messages-in-restful-wcf-web-application-with
- scaling chat app - short polling vs. long polling (ajax, php)
let me know if guys have other insight.
Comments
Post a Comment