开发者

(Simple) Push Notification using REST with Silverlight 4?

开发者 https://www.devze.com 2023-04-11 15:24 出处:网络
What is the best way to implement a push notification service using RESTful WCF services with Silverlight 4 clients?

What is the best way to implement a push notification service using RESTful WCF services with Silverlight 4 clients?

We are currently using a polling technique to call the REST service for updates. I'd prefer to have the server push, or broadcast, th开发者_如何学Ce notifications.


For the sake of closure, I thought I'd share what we ended up doing.

We did create a push notification server running as a Windows Service using standard Sockets communication. We maintain a list of connected clients and push notifications out as needed.

It's not RESTful, but since the client isn't making requests, it didn't make much sense to implement in a RESTful manner.


You could try using Pusher (who I work for) and our Silverlight library. See: http://pusher.com/docs/client_libraries#dotnet

Update: Since you state you can't use a hosted service and you don't want to use WebSockets (although I'd still suggest WebSockets are the best option) you can get HTTP Streaming to work reliably. I'd recommend you use a dedicated realtime server for your push notifications if you need to scale your application. You can find a bunch of realtime self-hosted solutions list here: http://www.leggetter.co.uk/real-time-technologies-guide

Twitter use Jetty for their HTTP Streaming API (Firehose etc.) so it will provide a scalable and reliable solution.

Happy to provide more information if you can elaborate further on your question.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号