开发者

Shared HTML5 offline cache within a local network?

Ok, so I know that HTML in itself isn't done yet, and I've done my fair share of reading for HTML5's offline modes.

Here's the question:

Can I set up an offline app in such a way that the entire system works offline, and SHARES a cache (or an XML repository, or a SQL-Lite DB or something) with other clients in the SAME network?

For example, my system runs on clients that need to share information with each other within a local network, but its fully web based. In case the local network's router dies, how can these clients continue to communicate with one another?

=== END ===

NOTE: If you're still not clear, I'd recommend you read on. The information below is to further clarify what I want.

In case you're still reading, here's a detailed example:

4 people in a restaurant are using a web based ordering system. They each have an iPod Touch (lol) which is connected to the internet via Wifi. Each member logs in to the system under a shared account, which allows them to share in开发者_如何学Cformation. The cook is also connected, but uses a mounted iPad (lolz) in the kitchen.

When a waiter records an order, the data is stored in a DB, and AJAX is used to constantly refresh the Cook's screen, so he is notified instantly.

Assume, Zeus struck down the electricity in the restaurant.

Now, there's no internet connection, but all devices in question still function thanks to their inherent battery-oriented nature.

The web app switches to offline mode, and utilizes cached menus and screens.

BUT!

How does the offline system share information between client devices? How does the iPod Touch #3 tell the Cook's iPad - "Hey there, this is order #5352"?

The most obvious thought is a shared cache or something...

Ideas?


That is not possible. WebPages cannot communicate without a server. The only thing you could do is setting up a local server for the case that the server on the internet is offline or not reachable.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜