Welcome!

Java IoT Authors: Yeshim Deniz, Carmen Gonzalez, Zakia Bouachraoui, Pat Romanski, Liz McMillan

Related Topics: Java IoT, Mobile IoT

Java IoT: Article

Off-the-shelf Mobile Phone Hosts Java Embedded Database Benchmark

SQLite and McObject's Perst square off on Android smartphone

In what is likely the first-ever database benchmark conducted on an off-the-shelf mobile phone, McObject® has successfully deployed its TestIndex application on T-Mobile’s Android-based G1smartphone, to measure performance of the SQLite embedded database alongside McObject’s open source Perst™ embedded database on typical data management functions.

The comparison showed that gaps in database performance can be measured as easily in this pocket-sized test bed as in more traditional benchmark environments with rack-mounted hardware. On three of the four TestIndex metrics, Perst performed database tasks significantly faster—more than 16 times faster, in the case of database inserts.

McObject has gathered benchmark results and analysis into a report, available for free download from McObject’s Web site. McObject also offers the TestIndex application, with complete source code, to run in the Android emulator as well as on the T-Mobile G1 and any future phones based on Google’s Android platform.

Mobile Devices’ Database Challenge
To support sophisticated features, applications running on mobile devices manage increasing volumes of complex data. Examples include location-based services (LBS) that rely on GIS data, MP3 players that index songs and playlists, and field sales and service applications that store enterprise data.

Incorporating an off-the-shelf embedded database for these tasks reduces coding and QA, and improves reliability and performance. Given mobile phones’ typically limited processing resources, though, the chosen database must be highly efficient.

Two quite different embedded database systems that have emerged for use on Google’s Android are SQLite, a relational embedded database that supports the SQL application programming interface (API), and Perst, an object-oriented embedded database that works directly with Java objects.

To compare Android databases in an “applets to applets” test, McObject developed the TestIndex benchmark application, which measures performance along the following parameters:

  • Insert – loading 10,000 simple records into the database (with string and integer keys, using two B-tree indexes)
  • Search – seeking these records via the indexes (there are 10,000 searches for random values in each index, so searching is performed 20,000 times)
  • Scan – performing two traverses (sequential scans) through all records using both indexes, so that records are sorted by integer key and string key
  • Delete – locate and remove all 10,000 records

SQLite vs. Perst: Benchmark Results

For the first TestIndex benchmark test in a real Android phone, McObject obtained T-Mobile’s G1 phone, equipped with all standard features.

The TestIndex application with both embedded databases was downloaded via USB from a PC to the G1 phone, where it received its own “Benchmark” icon. Clicking this launched TestIndex, which returned the following results (in milliseconds):

Operation

SQLite

Perst

Performance Disparity

Insert

299,166

18,214

Perst is 16.43 times faster

Search

104,796

15,743

Perst is 6.65 times faster

Scan

6,457

9,747

SQLite is 1.51 times faster

Delete

203,253

37,811

Perst is 5.38 times faster

Examining the Results
According to McObject CEO Steve Graves, the performance disparity in insert and delete operations likely results, at least partially, from the lack of explicit transaction support in the SQLite Android API. Each update must be performed as a separate transaction, in autocommit mode, resulting in significant transaction processing overhead.

Perst’s edge in searching for records probably stems from latency in SQLite caused by using Android’s Java interface to access the native C language database, and SQLite’s overhead of parsing, optimizing and executing the interpreted SQL, Graves said. In contrast, Perst is all Java, and its interface works directly with database objects – no interpretation of an intermediate language is needed.

SQLite’s advantage in scan operations probably stems from the test’s simple tabular data layout, Graves said. As a relational database, SQLite organizes data in rows, and these rows are physically close to one another in storage, like rows of a spreadsheet. This proximity lends an edge in sequentially fetching the rows. In contrast, in Perst, everything is an object, including index pages, and objects are interleaved in the storage.

More details, including database definitions used in the test and an expanded performance analysis, are included in McObject’s freely downloadable benchmark report.

Perst is part of McObject’s family of powerful small footprint, high performance embedded database software products. The eXtremeDB™ in-memory embedded database from McObject is used widely in devices including MP3 players, WiMAX base stations, digital TVs, telecom/network communications equipment and military/aerospace technology. Perst is available for Java and .NET, including Java ME and .NET Compact Framework. CA’s Wily Technology credits Perst with delivering a shortened development cycle and a ten-fold performance improvement within its real-time Java application.

About McObject
Founded by embedded database and real-time systems experts, McObject offers proven data management technology that makes applications and devices smarter, more reliable and more cost-effective to develop and maintain. McObject counts among its customers industry leaders such as Chrysler, Maximizer Software, Siemens, Phillips, EADS, JVC, Tyco Thermal Controls, F5 Networks, DIRECTV, CA, Motorola and Boeing. McObject, based in Issaquah, WA, is committed to providing innovative technology and first-rate services to customers and partners. The company can be reached at +1-425-888-8505, or visit www.mcobject.com.

McObject and eXtremeDB are trademarks or registered trademarks of McObject LLC. All other company or product names mentioned herein are trademarks or registered trademarks of their respective owners.

More Stories By Ted Kenney

Ted Kenney writes for McObject, developer of proven embedded database software that makes applications and devices smarter, more reliable and more cost-effective to develop and maintain.

McObject's Products include the Perst open source, object-oriented embedded database for Java and .NET, and eXtremeDB, a in-memory and on-disk embedded database system used widely in telecommunications, industrial control, aerospace and other application categories that require real-time responsiveness.

IoT & Smart Cities Stories
The term "digital transformation" (DX) is being used by everyone for just about any company initiative that involves technology, the web, ecommerce, software, or even customer experience. While the term has certainly turned into a buzzword with a lot of hype, the transition to a more connected, digital world is real and comes with real challenges. In his opening keynote, Four Essentials To Become DX Hero Status Now, Jonathan Hoppe, Co-Founder and CTO of Total Uptime Technologies, shared that ...
Every organization is facing their own Digital Transformation as they attempt to stay ahead of the competition, or worse, just keep up. Each new opportunity, whether embracing machine learning, IoT, or a cloud migration, seems to bring new development, deployment, and management models. The results are more diverse and federated computing models than any time in our history.
At CloudEXPO Silicon Valley, June 24-26, 2019, Digital Transformation (DX) is a major focus with expanded DevOpsSUMMIT and FinTechEXPO programs within the DXWorldEXPO agenda. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive over the long term. A total of 88% of Fortune 500 companies from a generation ago are now out of business. Only 12% still survive. Similar percentages are found throug...
At CloudEXPO Silicon Valley, June 24-26, 2019, Digital Transformation (DX) is a major focus with expanded DevOpsSUMMIT and FinTechEXPO programs within the DXWorldEXPO agenda. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive over the long term. A total of 88% of Fortune 500 companies from a generation ago are now out of business. Only 12% still survive. Similar percentages are found throug...
Dion Hinchcliffe is an internationally recognized digital expert, bestselling book author, frequent keynote speaker, analyst, futurist, and transformation expert based in Washington, DC. He is currently Chief Strategy Officer at the industry-leading digital strategy and online community solutions firm, 7Summits.
Digital Transformation is much more than a buzzword. The radical shift to digital mechanisms for almost every process is evident across all industries and verticals. This is often especially true in financial services, where the legacy environment is many times unable to keep up with the rapidly shifting demands of the consumer. The constant pressure to provide complete, omnichannel delivery of customer-facing solutions to meet both regulatory and customer demands is putting enormous pressure on...
IoT is rapidly becoming mainstream as more and more investments are made into the platforms and technology. As this movement continues to expand and gain momentum it creates a massive wall of noise that can be difficult to sift through. Unfortunately, this inevitably makes IoT less approachable for people to get started with and can hamper efforts to integrate this key technology into your own portfolio. There are so many connected products already in place today with many hundreds more on the h...
The standardization of container runtimes and images has sparked the creation of an almost overwhelming number of new open source projects that build on and otherwise work with these specifications. Of course, there's Kubernetes, which orchestrates and manages collections of containers. It was one of the first and best-known examples of projects that make containers truly useful for production use. However, more recently, the container ecosystem has truly exploded. A service mesh like Istio addr...
Digital Transformation: Preparing Cloud & IoT Security for the Age of Artificial Intelligence. As automation and artificial intelligence (AI) power solution development and delivery, many businesses need to build backend cloud capabilities. Well-poised organizations, marketing smart devices with AI and BlockChain capabilities prepare to refine compliance and regulatory capabilities in 2018. Volumes of health, financial, technical and privacy data, along with tightening compliance requirements by...
Charles Araujo is an industry analyst, internationally recognized authority on the Digital Enterprise and author of The Quantum Age of IT: Why Everything You Know About IT is About to Change. As Principal Analyst with Intellyx, he writes, speaks and advises organizations on how to navigate through this time of disruption. He is also the founder of The Institute for Digital Transformation and a sought after keynote speaker. He has been a regular contributor to both InformationWeek and CIO Insight...