简体   繁体   English

与应用程序服务器失去互联网连接时维护服务的机制

[英]Mechanism to maintain service when internet connection is lost with application server

We currently have a centralised web app and database (running on glassfish and oracle) which is accessed from multiple stations distributed about the country.我们目前有一个集中的 web 应用程序和数据库(在 glassfish 和 oracle 上运行),可从分布在全国各地的多个站点访问。

At the stations there is data entered into and read from the system (through the browser).在车站,有数据输入系统并从系统中读取(通过浏览器)。

When the (external) connection goes down between the station and the centralized web app we would like for the stations to continue to function - store and present data, then when the connection returns the data is pushed back into the central server maintaining database integrity.当工作站和集中式 web 应用程序之间的(外部)连接断开时,我们希望工作站继续使用 function - 存储和呈现数据,然后当连接返回时,数据会被推回中央服务器以保持数据库完整性。

Given that we would be willing to change our app server or database if it was worth it, how is this best handled, is there any out of the box solution for this?鉴于我们愿意在值得的情况下更改我们的应用服务器或数据库,如何最好地处理这个问题,是否有任何开箱即用的解决方案?

Install the servers at the individual locations, replicate what you want to share across them "routinely", and leave all of the other centralized, but non-vital tasks (like, say, reporting) on the central system.在各个位置安装服务器,“定期”复制您想要在它们之间共享的内容,并将所有其他集中但非重要的任务(例如,报告)留在中央系统上。

There is not "out of the box" solution.没有“开箱即用”的解决方案。 You system is centralized for whatever reason it's centralized.无论出于何种原因,您的系统都是中心化的。 You're asking for it to be decentralized.你要求它去中心化。 By doing so you need to reconsider why it's centralized in the first place, and what dependencies there are because of that centralization (such as each site having instant access to data at all of the other sites).通过这样做,您首先需要重新考虑为什么它是集中式的,以及由于这种集中化而存在哪些依赖关系(例如每个站点都可以即时访问所有其他站点的数据)。

Address those issues of what you can do without, for how long, and how to share it, and then you can set up autonomous sites.解决那些你可以做的事情,多长时间,以及如何分享这些问题,然后你就可以建立自治站点。 The magnitude and complexity of this process is dependent upon you application and the services it supplies to the remote users.此过程的规模和复杂性取决于您的应用程序及其为远程用户提供的服务。

If you can tolerate losing the current sessions I would point you to look for a distributed database (replication).如果您可以容忍丢失当前会话,我会指出您寻找分布式数据库(复制)。 Oracle probably supports it. Oracle 可能支持它。 In each office you would have a glassfish server在每个办公室,你都会有一个 glassfish 服务器

But it is going to cost a lot:但这会花费很多:

  • Licences许可证
  • Hardware (servers)硬件(服务器)
  • Properly securing the server正确保护服务器
  • (Lots of) tuning/rewritting to avoid new bottlenecks (大量)调整/重写以避免新的瓶颈

Maybe it would be easier / cheaper if you chose to just use redundant internet access for all of your offices.如果您选择只为所有办公室使用冗余互联网访问,也许会更容易/更便宜。

If you are willing to go cutting edge, then look into HTML 5 with Local Storage .如果你愿意 go 最前沿,那么看看HTML 5 with Local Storage Note that the local storage specification in HTML 5 is still in transition.请注意,HTML 5 中的本地存储规范仍在过渡中。 The second link I included has a good fallback option for when HTML 5 local storage is unavailable.当 HTML 5 本地存储不可用时,我包含的第二个链接有一个很好的后备选项。 With the fallback option of Store.js, you won't even need to require your clients to use a modern browser, though it definitely helps.使用 Store.js 的后备选项,您甚至不需要要求您的客户使用现代浏览器,尽管它肯定会有所帮助。

Another option, if you are open to moving in that direction, is to use Adobe Flex 3 for your UI, talking through LiveCycle to your application hosted on Glassfish.如果您愿意朝这个方向发展,另一种选择是使用 Adobe Flex 3 作为您的 UI,通过LiveCycle与托管在 Glassfish 上的应用程序进行对话。 There will be more moving parts and a steeper learning curve though.不过,将会有更多的活动部件和更陡峭的学习曲线。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 MQTT上的连接丢失订阅了物联网服务器 - Connection lost on MQTT subscribe to Internet of Things Server 客户端断电或Netty断开Internet连接时如何检测客户端在服务器上的断开连接 - How to detect client's disconnect at server when client power off or lost internet connection in netty 失去互联网连接后,MySQL连接会如何处理? - What happens to MySQL connection when internet connection is lost? 互联网离线时如何维护Channel API连接 - How to maintain Channel API connection when internet is offline 断开互联网连接后,防止在Web视图中打开URL - Prevent opening an URL in a webview when the internet connection is lost 在运行时检查互联网连接是否丢失 - Checking if the internet connection is lost at runtime 更改活动时如何保持与服务器的TCP连接? - How do you maintain TCP connection with a server when changing activity? Android中如何处理没有互联网和丢失的连接? - How to handle with no Internet and lost connection in Android? 使 CXF Web 服务在没有互联网连接时工作 - Make CXF Web Service work when there is no internet connection 断开Internet连接时,请妥善处理NPE并在OnPostExecute / AsyncTask中显示AlertDialog-Android / Java - Handle NPE Gracefully and Display AlertDialog in OnPostExecute / AsyncTask When Internet Connection Is Lost - Android / Java
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM