Flex AMF 离线模式?

发布于 2024-11-29 16:59:51 字数 329 浏览 2 评论 0原文

我目前正在使用 Flex (Flash Builder 4) 并与 Apache PHP Zend AMF 服务器建立 Web 服务连接以检索数据。

这很好用,但我想知道有哪些选项可用于容错。

我知道我可以设置第二台服务器,应用程序在无法到达第一台服务器时将切换到该服务器。对此有任何想法都很好,但我也在考虑尝试给予每台机器一定的宽容度。

例如,如果他们至少能够向应用程序输入数据,那将是一个开始。因此,如果他们单击“保存”并且无法到达服务器,则会将其缓存或存储到本地文件,直到服务器备份。尽管缺乏数据查找能力可能是一个大问题。

也许已经有一些库或者我可以查看的东西来做到这一点?

I am currently using Flex (Flash Builder 4) and making web service connections to a Apache PHP Zend AMF server to retrieve data.

This works great, but I am wondering what options are available for fault tolerance.

I know I can probably set up a second server that the application would switch to in the event it is unable to reach the first server. Any thoughts on that would be nice, but I am also thinking about trying to give each individual machine some tolerance.

For example, if they at least had the ability to input data to the application, that would be a start. So if they click 'save' and it can not reach the server, it caches it or stores it to a local file until the server is back up. Though lack of being able to do data look-ups might be a big problem.

Maybe there are already some libraries or something I can look at to do this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

无妨# 2024-12-06 16:59:51

到目前为止,听起来我要么选择:

故障转移解决方案(不确定具体是什么类型) - 正如 SuperSaiyen 建议的那样,我认为我需要一个特定的路由器或 dns 解决方案来处理该问题。这个想法是,设备要么将通常用于 server1 的流量路由到 server2,要么在 dns 解决方案的情况下,当 server1 关闭时,它将返回 server2 的地址以进行查找。

我相信另一个解决方案是尝试在 Flex 代码中连接几次到服务器 1。如果服务器关闭,则它会尝试 server2。正如 Flextras 指出的那样,只要应用程序已经加载到用户屏幕上,这就可以解决问题。对我来说,情况通常如此。事实上,我什至可以考虑将其设为 AIR 应用程序,这样如果 server1 上的 Web 服务器不可用,我就不必处理初始应用程序负载。否则,我仍然需要进行某种 dns 故障转移,或者为它们提供通往两台服务器的快捷方式,并训练它们在第一个服务器出现故障时尝试第二个服务器(我认为这不是一个好的选择)。

还有其他想法吗?

So far it sounds like I would either go with:

A Failover solution (not sure specifically what kind) - As SuperSaiyen suggested, I assume I would need a specific router or dns solution to handle that. The idea being that the device would either route the traffic normally intended for server1 over to server2, OR in the case of a dns solution, when server1 is down it would be returning server2's address for lookups.

I believe another solution would be to try to connect a few times to server 1 in the flex code. If the server is down, then it tries server2. As Flextras pointed out, this solves the problem as long as the application is already loaded on the users screen. For me, this is usually the case. In fact, I might even consider making this an AIR application so I do not have to deal with the initial application load if the web server on server1 is not available. Otherwise, I would still have to has some kind of dns fail-over or give them short-cuts to the two servers and train them to try the second one if the first is down (which I think is NOT a good option).

Any other ideas?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文