Hi, The MVStore should work well with Android. The main differences to SQLite are:
* SQLite overwrites / writes blocks of the size 4 KB. With flash or solid state disks this is not that great, as internally (by the firmware or OS) those writes are translated to much larger writes, for example 128 KB (this is called "write amplification" I think). H2 MVStore overwrites / writes chunks of size 1 MB. This is good for flash / solid state disks. * SQLite first writes to the transaction log, then calls fsync, then writes to the main data area. H2 MVStore only writes to one file (one write per change). * SQLite reclaims disk space much earlier; almost immediately. The H2 MVStore leaves old data for at least 45 seconds, which will result in higher (visible) disk space usage. On a lower, invisible level, for solid state disks and flash memory, the space usage is very similar. * In a crash, for SQLite, the last committed transaction is typically stored. For MVStore, the last second of transactions is typically lost. * The code of the MVStore is simpler, but SQLite is much older and more mature. The risk of bugs in SQLite is therefore smaller. Regards, Thomas On Saturday, May 2, 2015, <[email protected]> wrote: > Hello, I would like to use mvstore in my Android application. > > In Android, it is very common that your app (process) will get killed by > the OS (no longer needed, *even if it has a Service is running*) or by > the user (when swiped away from Recents). > > The bundled sqlite is extremely robust. In fact, if you look at most > Android apps that use sqlite - it is opened / initialized in a Singleton or > ContentProvider and *is never closed.* > > This is because the app usually doesn't have a chance to shut things down > cleanly, the process is simply killed. > > So I would like to know, how well would mvstore do in this scenario? I > would open the store, and leave it open for the app to use, but never > really find a good moment to close() it. > > If data from in-flight transactions is lost, that is fine of course - but > will the integrity of the file be OK? > > Thanks > -Alex > > -- > You received this message because you are subscribed to the Google Groups > "H2 Database" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <javascript:_e(%7B%7D,'cvml','h2-database%[email protected]');> > . > To post to this group, send email to [email protected] > <javascript:_e(%7B%7D,'cvml','[email protected]');>. > Visit this group at http://groups.google.com/group/h2-database. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
