30.12.2012 Views

30°C Power On 12 to 36 watts - for fanless sealed system design ...

30°C Power On 12 to 36 watts - for fanless sealed system design ...

30°C Power On 12 to 36 watts - for fanless sealed system design ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ESE Magazine Jan/Feb 06 <br />

16<br />

MP3 players: the music database<br />

gets database software<br />

By Steven T. Graves, McObject <br />

Seen in one light, MP3 players are a walking database with sound attached.<br />

WHILE MANY consumer electronics<br />

devices must s<strong>to</strong>re and retrieve data, it<br />

is the digital media player (or MP3<br />

player) that most resembles a walking<br />

database. Music fans buy the devices so they can<br />

carry around hundreds of hours of audio, instantly<br />

accessing songs according <strong>to</strong> the “metadata” of<br />

artist, album, title, genre, and playlist. Without the<br />

ability <strong>to</strong> extensively index, cross-reference and<br />

search a music collection according <strong>to</strong> the user’s<br />

wishes, the devices would have little appeal.<br />

Less obvious is data management’s role in<br />

extending MP3 players’ battery life and lowering<br />

their manufacturing cost—but Japan’s JVC<br />

Company sees the connection. In late 2005, the<br />

company released what is probably a first: its<br />

new Alneo XA HD500 studio quality digital<br />

media player incorporates a commercial embedded<br />

database management <strong>system</strong> (DBMS). The<br />

new <strong>design</strong> reflects digital audio players’ memory<br />

and CPU constraints, which are extreme<br />

even <strong>for</strong> consumer electronics. JVC found that<br />

the right off-the-shelf database helps use these<br />

resources more efficiently.<br />

Reducing RAM<br />

In an MP3 player, RAM is precious <strong>for</strong> two reasons:<br />

using less memory reduces the device’s<br />

bill-of-materials cost, lending an important manufacturing<br />

cost advantage, and most RAM within<br />

the device is reserved <strong>for</strong> the playback buffer<br />

that caches the MP3 stream. Low-end CPUs are<br />

also deployed <strong>to</strong> minimize cost, and CPU cycles<br />

must be dramatically minimized, <strong>to</strong> af<strong>for</strong>d a long<br />

playback per recharge.<br />

Playlist Album<br />

PlayListSong<br />

Song<br />

?Genre<br />

Figure 1: Data model of an MP3 player.<br />

Artist<br />

Early in the <strong>design</strong> process, the JVC engineers<br />

determined it would be difficult <strong>to</strong> obtain the<br />

desired efficiency, and meet a stringent development<br />

schedule, writing their own data management<br />

code. They began exploring the alternative:<br />

integrating a proven commercial DBMS within<br />

the MP3 player’s embedded software.<br />

The question remained, though, what kind of<br />

database would work. “Enterprise” DBMSs,<br />

<strong>design</strong>ed <strong>to</strong> serve as corporations’ centralized<br />

data s<strong>to</strong>res were an impossible fit due <strong>to</strong> cost<br />

and footprint; “embedded” database sounds<br />

closer, except that only a small subset of embedded<br />

databases are intended <strong>for</strong> real-time<br />

embedded <strong>system</strong>s (most are meant <strong>to</strong> be<br />

embedded in packaged software applications).<br />

In-memory<br />

For resource-constrained embedded devices, a key<br />

distinction within the embedded database category<br />

is on-disk DBMS, versus in-memory DBMS.<br />

Most embedded database <strong>system</strong>s manage data<br />

on-disk, and are <strong>design</strong>ed <strong>to</strong> cache frequently<br />

requested data in memory – <strong>for</strong> faster access –<br />

but <strong>to</strong> write database updates, insertions, and<br />

deletes through the cache <strong>to</strong> be s<strong>to</strong>red <strong>to</strong> disk. A<br />

newer approach is the in-memory database <strong>system</strong><br />

(IMDS), which eliminates disk access and<br />

s<strong>to</strong>res data in main memory, flushing <strong>to</strong> disk only<br />

when commanded <strong>to</strong> do so by the application.<br />

In-memory data management emerged as<br />

the better fit <strong>for</strong> JVC’s MP3 player. A key issue<br />

was on-disk databases’ indexes, which enable<br />

quick access <strong>to</strong> related records. To avoid disk<br />

access—which could potentially lead <strong>to</strong> playback<br />

interference in the MP3 player—the developers<br />

determined they would need <strong>to</strong> cache all<br />

of the on-disk database (data and indexes).<br />

Freeing memory<br />

A great deal of redundant data is s<strong>to</strong>red in on-disk<br />

databases’ indexes that manifest the relationships<br />

between data entities. With such a database this<br />

is desirable because if the required data exists in<br />

the index, the <strong>system</strong> can avoid the disk I/O that<br />

would otherwise be needed <strong>to</strong> access the data<br />

file. Disk I/O is expensive (in per<strong>for</strong>mance terms),<br />

so on-disk databases can justify the extra s<strong>to</strong>rage<br />

space <strong>to</strong> hold redundant copies of data in indexes.<br />

But in-memory databases never go <strong>to</strong> disk. There<br />

Figure 2: Indexes <strong>to</strong> implement relationships.<br />

is no disk I/O <strong>to</strong> avoid, so the redundant index data<br />

can be eliminated, thus freeing memory.<br />

In making their database selection, the JVC<br />

engineers also noted that the software logic <strong>to</strong><br />

accomplish caching and disk I/O—which are<br />

integral <strong>to</strong> on-disk databases but non-existent in<br />

in-memory architectures—posed significant<br />

CPU demands. By eliminating these demands,<br />

the in-memory database delivered better per<strong>for</strong>mance<br />

with a less powerful CPU, and allowed<br />

the CPU <strong>to</strong> be “clocked down” during certain<br />

operations <strong>to</strong> maximize battery life.<br />

Start-up time<br />

Engineers were also concerned about the startup<br />

time <strong>for</strong> provisioning the in-memory database.<br />

<strong>On</strong>-disk databases can be used immediately<br />

after the application opens the database,<br />

whereas an in-memory database is initially<br />

empty and must be populated (“provisioned”)<br />

with data. But in the final analysis, the modest<br />

size of the in-memory MP3 database eliminated<br />

this potential issue. For a database providing<br />

access <strong>to</strong> 5000 songs, the in-memory database<br />

required just 1 MB if the average song title<br />

string length was 20 characters; if all the song<br />

titles were the maximum 5<strong>12</strong> characters, the<br />

database was about 2 MB. With micro drive<br />

transfer rates up <strong>to</strong> 33 MB per second, the inmemory<br />

database could be provisioned in a time<br />

span well within usability thresholds. The competing<br />

on-disk database software created a<br />

database that was 7 MB in size. <br />

www.mcobject.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!