It supports vertical & horizontal scaling and multi-threading. Scalability: MySQL is highly scalable and can handle large data sets.Cross-platform: MySQL is compatible with the most popular platforms, such as Windows, macOS, Linux, and Unix-like systems.Open-source: MySQL is free, open-source and available under the GNU General Public License.The main key features of MySQL are as follows: MySQL is known for its high performance, flexibility, ease of use, security, and speed. It allows you to store, retrieve, modify, and delete data. It uses Structured Query Language (SQL), a declarative language that enables you to communicate with a relational database and manipulate data. If this is it, this is serious.MySQL is a widely used, open-source relational database management system (RDBMS). But if multiple threads of the same process (a single xojo app) tries to communicate with SQLITE, this poses a problem in some cases, including when the sqlite engine is busy during the timeout. As all instances communicating with the same SQLITE database, I wonder if there is not a problem in the xojo-sqlite bridge, or in the Xojo SQLITE compilation settings.Ĭurrently, it seems that multiple processes (ie multiple xojo apps) can communicate with SQLITE, without SQLITE timeout blocks other processes. The SQLITE timeout does not block webApps/sessions/threads. Note that this problem does not arise if each session is initiated with a new instance of the web app. But why the entire application, all sessions, all threads are blocked for the timeout (10 seconds by default)? Of course, this write request is to be refused, that’s normal, SQLITE handling only one writing simultaneously. Everything works.īut if a session request to write to the database (in a new thread/new db connection), All sessions (and thus all clients/browsers pages) will be hanging for the timeout. During the write operation, I can also navigate through the webPages, open multiple sessions, etc. Ok, no errors, everything works.Īll sessions are reactive. Meanwhile, another session starts a db reading in a new thread/new db connection. I also did tests by changing the value of db.threadYieldInterval (the “sqlite3_progress_handler” indicated by Norman) and thread.priority. During this writing loop, the thread is sleeping regularly. This thread opens a new SQLITE connection, and then starts a long write for several minutes (long enough for testing). So no UI but all other threads / sessions are blocked (thus also sessions that display web pages).Ī session launches a tread. I did a test in a web application with SQLITE (WAL mode). I’m not sure the Xojo SQLITE engine yield time to other threads in some cases, in particular for the sqlite timeout. REAL SQL Database did this for some time and SQLite Database does as well. The details naturally vary from db to db. Most, if not all, of the plugins now use some mechanism to yield time back to the UI so it can be run in a thread & keep the UI responsive. ![]() Use a thread - all the db plugin yield if you run them in a thread 25 seconds THEN runs the search so as you type it does not immediately delay thingsĪnd it does it in a thread so when the user types another keystroke it can kill the thread & wait again The plugin would run the query in a pre-emptive thread. In fact, I think a plugin would be useful for this. ![]() But I could not find such callbacks in the sqlite libs. This could only work if the sqlite would perform regular callbacks during its search from which I could then let Xojo’s threading do some yielding. I wonder if there are other ways to do this? I could use declares to access the sqlite3 lib directly, but that would still be blocking since it would be running in Xojo’s (rather non-)cooperative thread model. One way would be to do the query using a Shell in asynchronous mode, issuing the sqlite3 command that way. Hence I like to see if I can perform the search in the background so that the main process doesn’t get blocked. If I perform a search after every keystroke, and wait for the result, the typing gets sluggish, so even if the user wants to type a long search word, he has trouble typing it in quickly. Now, these lookups can take a second, as it does full text search with the “LIKE” operator in a large sqlite3 database (so, I can’t simply index the data to make the search faster), where it often finds 100s of records out of many 1000s. I like to provide a search filter in my app so that when the user types a search word, I look up the results in the background and show them as soon as I have them.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |