企业服务总线这是正确的解决方案吗?
C# 2008
我开发了一个需要连接到 Web 服务器才能工作的应用程序。 如果网络服务器离线。 必须通知应用程序,以便使用该应用程序的用户知道发生了什么。
该应用程序将从我们的客户网站上下载。 所以成百上千的用户可以拥有它。
我正在考虑也许每 5 秒 ping 一次网络服务器。 但是,如果有 100 个或 1000 个应用程序,网络服务器就会超载。
有人告诉我 ESB 适合解决这个问题。 我正在考虑使用它的方式,但我并不完全确定。 就是让每个应用程序都订阅ESB。 如果网络服务器离线,它会向所有应用程序发送一条消息。
然而,我知道 ESB 非常庞大和复杂,也许这对我的问题来说有点过分了。
我理解正确吗?
如果 ESB 不是正确的选择,是否还有其他我可以使用的设计模式?
非常感谢
C# 2008
I have developed an application that need to connect to a web server in order to work. If the web server goes offline. The the app will have to be notified so that the user using the app can know what happened.
This application will be downloaded from the internet from our clients web site. So hundreds or thousands of users could have it.
I was thinking about pinging the web server maybe every 5 seconds. However, with 100's or 1000's apps would overload the web server.
Someone has told me about ESB would be right for this problem. The way I am thinking to use this, and I am not totally sure. Is to have every app to subscribe to the ESB. If the web server goes offline it will send a message to all the apps.
However, I understand that ESB is very big and complex and maybe this is overkill for my problem.
Am I understanding correctly.
If ESB is not the correct choice is there another design pattern I could use?
Many thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为了这个简单的目的而指定 ESB 听起来不合时宜。 为什么不让客户端计算机在定期需要访问网站时弄清楚这一点呢? 在正常活动过程中,他们不需要一遍又一遍地 ping Web 服务器,而是需要出于任何正常原因访问 Web 服务器,如果收到错误响应,他们可以沿着“Web 服务器已关闭”代码路径分支。
It sounds inappropriately out of scope to spec an ESB for this simple purpose. Why not just have the client machines figure it out as they periodically need to access the website? Instead of pinging the web server over and over, in the course of their normal activities they will need to access the web server for any normal reason, if they get an error response they can branch down the "web server is down" code path.
ESB 听起来像是错误的解决方案。
我想到了两种可能性:
(1) 如果用户不需要知道他们实时离线,那么当您尝试访问服务器时,将检测推迟到通常的错误处理。
(2) 如果您必须了解实时情况,请在每个客户端站点使用小型代理,以便只有代理需要 ping 您的服务器,而不是每个桌面。
An ESB sounds like the wrong solution.
Two possibilities come to mind:
(1) If the user doesn't need to know they're offline in real-time, defer detection to usual error handling when you try and access the server.
(2) If you must know real time, use a small proxy at each client site so that only the proxies need to ping your server, not every desktop.