Adobe AIR - SQLite - 多个客户端
我有一个在 Adobe AIR 上编写的商业销售点产品,目前在大约 100 个零售点运行。我的大多数顾客在商店里大约有 5 台电脑。我的一些大客户拥有 10-20 台计算机。
该应用程序当前使用嵌入式 SQLite 数据库来保存数据。我早期犯了一个巨大的技术错误,我的一些大客户也遇到了问题。我想知道是否有人可以提供一些关于如何解决该问题的想法。在这里...
应用程序在主模式和工作站模式下运行。 Master模式下,数据库驻留在物理机上。在工作站模式下,应用程序通过网络访问数据库。 SQLite 不适合以这种方式使用,它会导致各种问题(文件锁定、数据消失、文件损坏等)。
我一直在绞尽脑汁地思考如何在不完全重写应用程序的情况下解决这个问题。我在应用程序中很好地分离了关注点,因此我确实有能力重写数据层。
以下是一些要求: 1)应用程序必须离线运行 2)解决方案必须能够处理交易 3) 解决方案必须支持同步连接
我的一些想法是:
1) 编写一个位于数据库前面的“数据库服务器”,并且一次只允许运行 1 个语句。 2)将数据库更改为MySQL并使用assql库。我不认为这支持同步语句。
你有什么想法?
谢谢你!
I have a commercial Point Of Sale product that's written on Adobe AIR and runs in about 100 retail locations right now. Most of my customers have about 5 computers in the store. Some of my larger customers have 10-20 computers.
The application currently uses the embedded SQLite database to persist data. I made a huge technical mistake early on and some of my larger clients are having problems. I'm wondering if anyone can provide some ideas on how to get around the problem. Here it is...
The application runs in Master and Workstation modes. In the Master mode, the database resides on the physical machine. In Workstation mode, the application accesses the database over the network. SQLite is not intended to be used in this fashion and it's causing all kinds of issues (file locking, data disappearing, files being corrupted, etc).
I've been racking my brain on how to resolve this issue without completely rewriting the application. I have nice separation of concerns in the application so I do have the ability to re-write the data layer.
Here are some of the requirements:
1) The application must run offline
2) The solution must be able to handle transactions
3) The solution must support synchronous connections
Some of the ideas I've had are:
1) Write a "database server" that sits in front of the DB and allows only 1 statement to run at a time.
2) Change out the database to MySQL and utilize the assql library. I do not believe that this supports synchronous statements.
What ideas do you have?
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论