Windows 工作流程 4.0 持久性
有人可以向我解释一下为什么我需要在数据库中保留工作流程吗?请只是想理解这些概念
Would someone please explain to me why i would need to persist a workflow in a database. Please am just trying to understand the concepts
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
工作流本质上通常是长时间运行的,例如数周或数月。将它们保留在内存中意味着您无法回收应用程序或机器。通过将状态保存到磁盘(即数据库),您可以重新启动进程和机器。当工作流不执行任何操作时将其保留在内存中只会浪费内存资源,从而阻碍可扩展性。最后将状态保存在数据库中意味着我们可以从该状态重新启动工作流程,因此它在错误处理时也很有帮助。
Workflow are often long running in nature, like weeks or months. And keeping them in memory means you can't recycle the application or machine. By saving the state to disk, ie database, you can restart the process and machine. Also keeping worklflows in memory when they aren't doing anything just wasts memory resources and thus hinders scalability. Finally saving state in a database means we can restart the workflow from that state so it also helps when error handling.