Record Management System (I)
22 April 2008RMS is a database (flat file) which MIDlets can use to persist data. In this post, I will introduce the audience with RMS.
The device platform maintains the integrity of the MIDlet’s record stores throughout the normal use. The reboots, battery changes, etc. won’t affect the RMS. An interesting question developers ask is, where is this Record Store created? It is created at platfdependent location, like nonvolatile device memory, and is not directly exposed to the MIDlets.
an important thing to note is that that record store implementations ensure that all record store operations are atomic, synchronous, and serialized, so no corruption of data will occur during multiple accesses.
The record store maintains the following information:
- timestamp to indicate when it was modified.
- version information (integer) which is incremented for each operation that modifies the contents of the record store.
The version and timestamp info is of great use when you want to start the synchronization process. An interesting info for you is that each record in a Record Store has an array of bytes with a unique integer identifier.
There arises an interesting question: What if a MIDlet uses multiple threads to access a record store? You as a developer should not address this. Its MIDlet’s responsibility to coordinate this access; and if it fails to do so, unintended consequences may result. Also note that if a platform performs a synchronization of a record store with multiple threads trying to access the record store simultaneously, the platform will manage everything.
Related Posts:
- Record Management System (II)
- RecordStore with examples - II
- Record Management System (III)
- RecordStore with examples - I
- RecordStore with examples - III
- ANT’s best practices - IV
- in.use file
- SVN (Trunk/Branch/Tag) - II
- Java performance Issues (III) - Garbage collection
- Deploying MIDlets onto Mobile Devices (III)
Top Of Page | Trackback
If you found this page useful, consider linking to it. Simply copy and paste the code below into your web site.
It will look like this: Record Management System (I)