MongoDB Connector

From Tera-WURFL

Revision as of 06:16, 23 January 2011 by Kamermans (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The MongoDB Database Connector for Tera-WURFL is an extremely high-performance backend system for WURFL storage and caching. In our testing, the MongoDB connector performed about 20% faster than the existing MySQL5 connector. Unlike the other connectors, the MongoDB connector does not use tables for each of the User Agent Matchers, it uses one large collection for device storage, and the capabilities are not serialized, they are stored in the native MongoDB BSON format. Due to this improvement, you can directly search and index the individual capabilities like this:

db.TeraWurflMerge.find({"capabilities.product_info.is_wireless_device":false},{deviceID:1})
 
{ "_id" : ObjectId("4c81afc6077db9ca1a550500"), "deviceID" : "libwww_perl_ver1" }
{ "_id" : ObjectId("4c81afc6077db9ca1a7f0500"), "deviceID" : "generic_web_browser" }
{ "_id" : ObjectId("4c81afc6077db9ca1aa10600"), "deviceID" : "tranxcode_mercury_proxy" }
{ "_id" : ObjectId("4c81afc6077db9ca1a273100"), "deviceID" : "nintendo_wii_browser" }
{ "_id" : ObjectId("4c81afc6077db9ca1a8c3300"), "deviceID" : "google_wireless_transcoder_ver1" }
{ "_id" : ObjectId("4c81afc6077db9ca1a8d3300"), "deviceID" : "stupid_novarra_proxy" }
{ "_id" : ObjectId("4c81afc6077db9ca1a973300"), "deviceID" : "stupid_openweb_proxy" }

This connector implements DB server-side RIS (Reduction in String) and Fallback generation, giving it an additional performance boost.

Installation and Configuration

To use Tera-WURFL with MongoDB, you must edit TeraWurflConfig.php and change the DB_CONNECTOR to "MongoDB".

Personal tools
Namespaces
Variants
Actions
WURFL DBAPI
Toolbox