Concurrency is the manner in which UltraLite shares resources by allowing multiple connections at the same time. To handle concurrent requests properly, you must understand how UltraLite manages concurrency in the database:
Multiple databases A single UltraLite application can open connections to multiple databases. UltraLite can open up to 8 databases on Palm OS and up to 32 databases for all other platforms.
Multiple applications The UltraLite database can only be opened by one process at a time. If you plan to support concurrency among multiple applications, choose the UltraLite engine as your data management component. See Choosing an UltraLite data management component.
Multiple threads UltraLite supports multi-threaded applications. A single application can be written to use multiple threads, each of which can connect to the same or different databases.
If your are managing your database with the runtime, ensure that you do not exceed the concurrent connection limits supported by UltraLite. These are:
If you are managing your database connections with the UltraLite engine, note that the number of SQLCAs you can typically use is restricted to 128. However, the implementation of UltraLite.NET API effectively reduces this limit to 128 less the number of running UltraLite.NET clients.
Multiple transactions/requests Each connection can have a single transaction in progress at one time. Transactions can consist of a single request or multiple requests. Data modifications made during a transaction are not made permanent in the database until the transaction is committed. Either all data modifications made in a transaction are committed, or all are rolled back. See UltraLite transaction processing.
Synchronization During upload and download, read-write access to the database is permitted. However, if an application changes a row that the download then attempts to change, the download fails and rolls back. You can disable access to data during synchronization by setting the Disable Concurrency synchronization parameter. See Disable Concurrency synchronization parameter.
If synchronization fails, UltraLite supports resumable downloads on all platforms. See Handling failed downloads.
|Send feedback about this page via email or DocCommentXchange||Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0|