事件驱动与轮询/调度
目前,我们的 IT 团队正在讨论处理大部分流程的最佳实践是什么。我们的 IT 总监正在推动一切都由事件驱动。他的理由是,这将节省资源,并且是发送船舶通知、订单验证、订单处理等的“最佳方法”。
另一位开发人员和我并不反对节省资源,但认为我们不再拥有控制权的过程。如果出现问题,我们可以轻松地重新标记/队列或计划的进程,以拾取错误的事务或处理通信故障等问题。
在完美的环境中,使用事件驱动的流程会很棒,因为您无需检查任何内容。但对于我们来说,我们知道我们会遇到数据问题等,并且需要能够快速纠正问题或在修复问题时关闭进程。当一堆事件失败时,其他人如何处理?重新触发/触发事件并不那么容易......看起来如此,但我可能完全忽略其他解决方案。
我不会去追求对/错,只是想看看其他人对不同流程的看法以及他们遇到的问题/问题。
始终感谢反馈。
We currently are in a debate within our IT group over what the best practice is for handling the majority of all of our processes. Our IT director is pushing for everything to be event driven. His reasoning is that is will save on resources and it is the "best method" for sending ship notifications, order validations, order processing, etc.
Another developer and I don't disagree on saving resources but argue that we are no longer in control of the process. If something breaks we can easily re-flag/queue or scheduled processes to pick up the errored transactions or handle things like communication failures.
In a perfect enivronment uses event driven processes all over would be great because you wouldn't ever have to check for anything. But for us we know we will encounter data issues, etc and need to be able to quickly correct the problem or shut off the process while we fix it. How do others handle when a bunch of events fail? It is not that easy to re-trigger/fire the events....so it appears, but I could be completely overlooking other solutions.
I am not going for a right/wrong more just trying to see what others think about the different processes and what issues/problems they have encountered.
Always appreciate the feedback.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如您提到的,事件驱动系统可以非常灵活。我工作的地方有一个事件驱动框架,其中一个事件实际上是异常事件。我们的运行状况监视器是事件驱动的,如果出现问题、运行状况问题或数据问题,我们会通过电子邮件收到通知,并将所有内容记录到数据库、事件日志或文件中。事件允许进程自行驱动,而无需用户的直接交互。
与任何自动过程一样,需要进行某种性质的审核和控制。应该有一定的时间间隔来检查一组随机结果的有效性。我们每晚打印大约 80,000 份法律文档,这些文档是根据另一台机器上的软件生成的事件自动分发/索引/验证的。然而,我们有一名人类质量控制机构负责每天早上测试它们的样本,然后将它们释放到野外。
事件确实可以节省您大量的管理时间,并且非常容易实施。我强烈推荐它。
An event driven system can be very flexible like you mention. We have an event driven framework where I work, and one of the events is actually an exception event. Our health monitor is event driven, and if there is a problem, health problem, or data issue, we're notified by email and everything is logged to a database, event log, or file. Events allow the processes to drive themselves without direct interaction from a user.
As with any automatic process there needs to be auditing and control of some nature. There should be some interval by which a random set of results is checked for validity. We print approximately 80,000 legal documents nightly that are distributed/indexed/verified automatically based on an event produced by a software on another machine. However, we have a human QC authority responsible each morning for testing a sampling of them and then releasing them into the wild.
Events really can save you a lot of administrative time and can be very easy to implement. I would highly recommend it.