3

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.

4

1 回答 1

2

是的,可以使用推送通知(是否通过 Azure 移动服务)来做到这一点,但请记住,没有推送通知系统 - 无论是 Windows 通知服务(WNS,适用于 Windows 8)、Microsoft 推送通知服务(MPNS,适用于 Windows Phone) ) 甚至 Apple 推送通知服务(APNS,适用于 iOS 设备和 MacOS 应用程序) - 保证消息的传递 - 大多数都以“尽力而为”模式行事。此外,根据您要交换的消息和要访问的设备,您可以“推送”的内容可能有大小限制(我不了解 MPNS,但对于 APNS,有效负载不能超过 256 个字节) .

纯推送机制可能还有其他替代方案。正如您所提到的,套接字可能是一个(尽管这可能会受到某些防火墙的限制)。Azure 移动服务空间中的某些东西可以通过将消息存储在某种模拟队列(甚至是真正的队列,例如服务总线提供的队列)的表中,并使用推送通知仅通知应用程序有新的消息可用(这也可以解决离线故事,当推送通知无法到达目的地时,但应用程序可以在它上线时轮询新消息)。

于 2012-10-29T04:59:30.457 回答