[英]Best practices for service broker conversations: how many can I leave open and for how long?
I'm designing a system that will issue commands (via service broker) that a user may wish to undo. 我正在设计一个系统,该系统将发出用户可能希望撤消的命令(通过服务代理)。 My thinking was that I could use a pattern like this: 我的想法是我可以使用这样的模式:
This keeps messages in order (the undo command cannot appear before the initial command it must "undo"), I recognize that this may keep many conversations open indefinitely as users for the most part will not wish to perform an undo. 这样可以使消息保持顺序(撤消命令不能在必须“撤消”的初始命令之前出现),我认识到这可能会无限期地打开许多对话,因为用户大部分都不希望执行撤消。 Would this be a performance problem? 这是性能问题吗? Is there an alternative using service broker? 是否有使用服务代理的替代方法?
You can hold them open for as long as you like, but you probably don't want them to live forever on the system. 您可以根据需要一直将它们保持打开状态,但是您可能不希望它们在系统上永远存在。 Is there a period of time after which you can reasonably infer that you are not going to get an undo? 是否有一段时间可以合理地推断出您不会撤消操作? An hour perhaps or by the end of the business day? 一个小时或在工作日结束之前?
You can give conversations a maximum lifetime so you can clear them down once you're satisfied that they are logically committed. 您可以赋予对话最长的生命周期,以便在对逻辑上的承诺感到满意后就可以将其清除。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.