Shared Database With No Server

You cannot open a sqlite database read-only. So, no, accessing the database directly isn’t an option. How real-time does the data need to be? Can you make a copy of the data every hour? That would protect the main database file.

Do you have internal firewalls? If you do then how will they access the database file?

It sounds more to me what they meant was no internet facing servers. If the database only needs to be accessed behind the firewall and the server is behind the same firewall as well then there is no need to worry about firewall changes. Then you can easily do this with sockets while meeting the spirit of their requirements.

In that case, you could also do away with some of the requirements and set up a proper SQL server. PostgreSQL is free and very, very good.

Data doesn’t have to be real time. Updating every hour would work. But, I would assume, using this approach would require a separate copy of the database for each client.

[quote=184933:@Bob Coleman]Do you have internal firewalls? If you do then how will they access the database file?

It sounds more to me what they meant was no internet facing servers. If the database only needs to be accessed behind the firewall and the server is behind the same firewall as well then there is no need to worry about firewall changes. Then you can easily do this with sockets while meeting the spirit of their requirements.[/quote]

Yes. There are internal firewalls. I write a quick and dirty test app with nothing more than a window with a ServerSocket. In the Open event, I just put a ServerSocket1.Listen command. That application set off the firewall.

They allow the shared folder through the firewall.

Except that they won’t allow a separate package. All has to be internal to the app. And, firewall will block a server.

At any rate, I talked with my boss today. He’s going to try to get IT to allow an internal server app, but isn’t hopeful. At this rate, I’m probably just going to let this go unless something changes. My boss is okay with that.

I forgot to say “Thank you” for the ideas and discussion! This community is great!

Coming late to the game, but it sounds like what you need is C-Tree, Raima, or Berkeley DB, or CISAM. All of them are indexed file managers that allow multi-user access, record locking, etc., and can run as part of the application.

How to define and use them in Xojo? That’s a bit beyond my scope at the moment, but I am working on it. :wink:

CISAM is available from IBM and $149. C-Tree is also very inexpensive. Berkeley DB is essentially free. No idea on the cost for Raima, but it used to be called db_Vista, and there might still be a free version of it hanging about.

-Paul

Hmmm with only 5 clients speed is probably not an issue. How big will the DB get? How often is it likely to get updated?

On startup clients should create a local copy of the DB file IF the data has been updated since the client last downloaded it and accessed that. The Master App creates a datestamp text file everytime it updates the DB updates so Clients know if they need to download by just looking at that file. Also provide an Update Menu option to get a fresh copy without restarting.

I do exactly that except that the DB File resides on Dropbox. Is it a kludge? For sure… but I had to do it that way because we do not have an intranet, never mind a server of any kind!!!

For my usage it seems it works fine (about 10 clients each used once or twice a day) …

So this can likely be made to work for light usage situations.

  • Karen