EWS API 1.0中的推送和推送订阅优化? [英] Pull and Push Subscription optimisation in EWS API 1.0 ?

查看:113
本文介绍了EWS API 1.0中的推送和推送订阅优化?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在开发一个与用户邮箱中的电子邮件(特别是语音邮件)保持同步的程序。关于使用EWS API 1.0的推拉通知,我有很多问题。

在我读过的许多书籍和文章中,Push订阅中的'StatusFrequency'元素被解释为'以分钟为单位测量的通知消息发送到客户端的频率,即使在那里没有事件'。这是否意味着当事件实际发生时没有发送通知,并且通知延迟到下一次计划推送?例如,如果用户一次删除100封电子邮件,而不是触发100次推送通知,那么在达到频率时间时只会触发一次?

使用Pull订阅,可以使用的推荐间隔是多少?例如,如果我有1000个邮箱,每个邮箱大约有1000封电子邮件,那么每10秒轮询服务器是否可以接受所有1000个用户的所有文件夹?

轮询服务器的最佳方式是什么?是每个用户的Pull订阅(用户的所有文件夹的1000个订阅)还是一个Pull订阅(所有用户文件夹的1个订阅乘以1000个用户)?

这些都是我所知道的顶级例子,但我在这里使用它们更好地了解实际发生的情况以及如何最好地优化我的应用程序,而不会对Exchange服务器造成过度压力。

推荐答案



当您使用推送通知时,您会立即收到每个更改的通知。在您的示例中,您将收到100个通知。仅当指定间隔中未发生任何事件时才会发送状态消息。

您的订阅的轮询间隔取决于Exchange服务器的硬件。你不想对服务器施加真正的压力。而且你不想一次执行太多的请求。默认情况下,.NET为每个服务器执行不超过2个并发请求。我建议您在您的环境中测试您的解决方案。
除此之外:你真的应该研究推送通知。这实际上会减少应用程序和Exchange框之间交换的请求数量。另请参阅CodePlex上的PushNotification( http://exchangenotification.codeplex.com )。它将整个内容封装在一个简单的组件中。

亲切的问候,
Henning Krause
Hi,

when you use push notifications, you'll get a notification for every change immediately. In your example, you would get 100 notifications. The status message is sent only if no event has happened in the specifiy interval.

The polling interval for your pull subscriptions depends on the hardware of the Exchange server. You don't want to put real pressure on the server. And you don't want to execute too many requsts at once. By default, .NET executes not more than 2 concurrent requests per server. I would advise you to simply test your solution in your environment.

Apart from that: You really should look into push notifications. This would really drop the amount of requests exchanged between your application and the Exchange box. Also have a look at my PushNotification on CodePlex (http://exchangenotification.codeplex.com). It encapsulates the whole stuff in a simple component.

Kind regards,
Henning Krause


这篇关于EWS API 1.0中的推送和推送订阅优化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆