1. Helge Tjelta
  2. Valentina Database ADK
  3. Sonntag, November 12 2017, 07:09 PM
  4.  Abonnieren via E-Mail
Hi, i posted this on the forum of xojo...

"Hi, I have made several web-apps now, all communicating with a db-server (in my case Valentina-db), but do I really need a server ? Since the web-app and the db is on the same machine. The database can run as a db belonging to the web-app (as a file that is), and all connections are from sessions inside that app...

right now I have all sessoins connect to the server using API for that server, and it works very well, but really do I need the server... since if I can have a native macOS as contain a db-file that works the same as server.?

is it possible for an app to have a db, that all sessions can connect with ?"

bur I give it a try here as well.
Kommentar
There are no comments made yet.
Sergey Pashkov Akzeptierte Antwort
Hi Helge,

If each Xojo application uses own database file - yes it should work.
You open a database at the start of the application and all sessions use this database.

But without a server, it is possible to lose some data (for example, data in the cache) in the case if Xojo application was crashed or terminated.
Kommentar
There are no comments made yet.
Scott Akzeptierte Antwort
Hi Helge,

Sorry for the delay.

When you start the Xojo web application, it will make its connection to the DB. Each websession will use its own instance of this connection to interact with the DB. Technically it could work, however, I would highly recommend you don't do this. The potential for data collision or corruption is high because each session will not know about the other unless you specifically code your app to do so - not worth the time/effort IMHO. If you update, say a record in the DB, and then another session does the same thing, you lose all the changes made in the first session.

Personally, I would always use a server based DB in any multi-use environment. Plus, using VServer there are many server related functions you can take advantage of if you go the server based route versus the standalone DB.

Scott
Kommentar
There are no comments made yet.
  • Seite :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Categories

Announcements & News
  1. 0 subcategories
Valentina Studio
  1. 2 subcategories
Valentina Server
  1. 4 subcategories
Valentina Database ADK
  1. 0 subcategories
Valentina Reports ADK
  1. 0 subcategories
Other Discussions
  1. 2 subcategories
BETA Testing
  1. 0 subcategories
Education & Research
  1. 0 subcategories