سؤال

I am creating (in the formative, smoke-coming-out-of-ears stage) a pair of apps, one Windows 8, its companion WP8. Communication needs to take place between the pair, but only between those invited to participate in the conversation (invitation sent by the Windows 8 app) and those who have agreed (using the WP8 app).

IOW, it may look like this:

Windows8 app, User = Billy-Bob
    WP8 app users who were invited by Billy-Bob and accepted = Miley, Wiley, Kiley, and Riley

Windows8 app, User = Rory
    WP8 app, users who were invited by Rory and accepted = Gerry, Lou, Rod, Ted

Billy-Bob is the only person who receives messages from Miley, Wiley, Kiley, and Riley. Rory is the only person who receives messages from Lou, Rod, Gerry, and Ted.

I'm thinking Windows Azure Mobile Services might be the best way to implement this, using raw WNS push notifications. But I don't know if this is feasible with WAMS, or if I'd be trying to force an octogonal object into a trapezoidal receptacle.

Would this be practical? If not, why? If so, how do I proceed?

My other option is to use ssl sockets, but I'd prefer to avoid that if possible.

هل كانت مفيدة؟

المحلول

Yes, it's possible to do that using push notifications (via Azure Mobile Services or not), but remember that no push notification system - whether it's Windows Notification Service (WNS, for Windows 8), Microsoft Push Notification Service (MPNS, for Windows Phone) or even Apple Push Notification Service (APNS, for iOS devices and MacOS apps) - guarantees the delivery of the messages - most act on a "best effort" mode. Also, depending on which messages you want to exchange and the devices you want to reach, there may be a size limit on what you can "push" (I don't know about MPNS, but for APNS the payload cannot exceed 256 bytes).

There may be other alternatives to a pure-push mechanism. Sockets, as you mentioned, may be one (although that may be limited by some firewalls). Something in the Azure Mobile Services space could work by storing the messages in some sort of table simulating a queue (or even a real Queue, such as the one provided by Service Bus), and using the push notifications only to notify the application that new messages are available (that could also solve the offline story, when push notifications cannot reach the destination, but the application could poll for new messages whenever it comes online).

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top