如何为所有平台提供网站状态[关闭](How to make website status available to all platforms [closed])

编程入门 行业动态 更新时间:2024-10-27 17:10:15
何为所有平台提供网站状态[关闭](How to make website status available to all platforms [closed])

最近,一个项目出现了我的需求...... 1.构建一个持续检查网站可用性的C#控制台应用程序。 2.在某处保存网站状态,以便不同的平台可以访问该状态。

控制台应用程序已完成,但我正在努力保存状态。 我在想一个SQL记录。

您将如何处理保存状态的位置,以便它可扩展,灵活并可用于x个框架或平台?

更新:看起来我使用RESTful服务使用数据库存储。 我还将状态保存为xml文件,作为服务停机的后备。

Recently, a project came my way with requirements to ... 1. Build a C# console app that continuously checks website availability. 2. Save website status somewhere so that different platforms can access the status.

The console app is completed but I'm wrestling with where I should save the status. I'm thinking a SQL record.

How would you handle where you save the status so that it's extensible, flexible and available for x number of frameworks or platforms?

UPDATE: Looks like I go with DB storage with a RESTful service. I also save the status to an xml file as a fallback to service being down.

最满意答案

可以将网站的可用性发布到第二个Web 服务 ,该服务返回关于所述网站的可用性的JSON / Xml结果。 这几乎意味着任何能够进行Web服务调用的平台/语言都可以检查网站的可用性。

不可否认,这确实给出了单点故障(状态Web服务),但不可避免地,除非您想要开始具有故障转移Web服务等,否则您最终将会遇到这种情况。

The availability of the web-sites could be POSTed to a second web service which returned a JSON/Xml result on the availability of said website(s). This pretty much means any platform/language that is capable of making a web-service call can check the availability of the web site(s).

Admittedly, this does give a single point of failure (the status web service), but inevitably you'll end up with that kind of thing anyway unless you want to start having fail-over web services, etc.

更多推荐

本文发布于:2023-07-26 05:14:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1271380.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:何为   状态   平台   网站   closed

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!