Upgrade to Pro — share decks privately, control downloads, hide ads and more …

OpenDDR - Let's enable optimized contents Together

Avatar for Werner Keil Werner Keil
November 12, 2011

OpenDDR - Let's enable optimized contents Together

Everyone knows it. There is nothing worse than untailored content. Just think how frustrating is surfing a complex website on the small screen of your cellular phone. You probably waste your time zooming and scrolling the pages, but, anyway, it’s clear: if you want a comfortable user experience you need dinamically adaptable contents according to hardware and browser specifications of your device.
That’s why Device Description Repositories (DDR) exist. These are databases that store a huge amount of information concerning mobile phones, tablets, Interactive TVs, set top boxes and any device having a Web browser, in order to allow developers to realize applications extremely enjoyable on each client.

Avatar for Werner Keil

Werner Keil

November 12, 2011
Tweet

More Decks by Werner Keil

Other Decks in Technology

Transcript

  1. Click to edit Master subtitle style Titolo presentazione - data

    2 • Introduction • Project Brief • Google Code and Group • Implementation and Sample • Test Results • Benefits • Conclusions AGENDA
  2. Click to edit Master subtitle style Titolo presentazione - data

    3 OpenDDR INTRODUCTION OpenDDR: let's enable optimized contents. Together Day after day we all experience an incredible growth of devices available on the market and accurately tracking their specs has became a very hard work. But this complexity can be reduced if managed by a community daily involved in improving the Device Description Repository (DDR). This is the essence of OpenDDR project OpenDDR project, the best open and completely free repository of device description available worldwide.
  3. Click to edit Master subtitle style Titolo presentazione - data

    7 What is a DDR Project Brief If you want a comfortable user experience, you need dynamically adaptable content according to hardware and browser specifications of your device Device Description Repositories (DDR) are databases that store a huge amount of information concerning mobile phones, tablets, Interactive TVs, set top boxes and any device having a Web browser. DDR allow developers to realize applications providing appropriate user experience on each client There are several DDR projects across the web but: • demand you a fee to access to their databases and APIs OR • Let you access this information for free only for developing non-commercial applications Need different Approach: OpenDDR Project
  4. Click to edit Master subtitle style Titolo presentazione - data

    8 Why open standards? Project Brief OpenDDR stakes on open standards: • Repository is fully compliant with W3C DDR • Access library implements the W3C DDR Simple APIs From a developer point of view: • You can start developing your application with confidence that your product will work with any W3C DDR Simple APIs implementation, no binding to OpenDDR implementation • Adopting a W3C standard, the Copyright of the interfaces you need is owned and protected by W3C against any intellectual property and patent claim OpenDDR is released under Open Database License (ODbL), and OpenDDR Simple APIs are released under Lesser General Public License (LGPL). This means that you are completely free to use both OpenDDR repository and/or APIs in open source or proprietary software
  5. Click to edit Master subtitle style Titolo presentazione - data

    9 DDR Projects Comparison Project Brief PROJECT STRENGHTS WEAKNESSES LICENSE MaDDR Project The interface is a W3C standard • Device repository only with commercial mobileAware DDR (tha APIs are bundled with a small sample DDR) • The maDDR Project cannot offer an adaptation technology that uses repository knowledge to guide its processes • Repository license: commercial license only • API license: commercial license OR Simple DDR API implementation licensed as LGPL DeviceAtlas Data is multi- sourced from industry-leading partners Only commercial licenses • Repository license: commercial license • API license: commercial license Volantis Wide device coverage Only commercial licenses • Repository license: commercial license • API license: commercial license WURFL Community project • the license does not allow to use the DDR without accessing through the WURFL API • the API does not allow use in projects with a proprietary license • Repository license: use not allowed if accessed without WURFL APIs • API license: dual licensing AGPL and commercial (Changed since August 2011)
  6. Click to edit Master subtitle style Titolo presentazione - data

    10 What's different in OpenDDR? Project Brief Users can update the operating systems of their devices (also with custom builds) and/or install new web browsers. The identification of a device through the original User Agent exposed by the manufactures is no more sufficient. OpenDDR considers the device as a set of three important aspects: Physical Device, Operating System, Web Browser • OpenDDR can identify custom builds of the operating system and third parties web browsers. If a particular version of a browser or an operating system is not recognized, OpenDDR returns information about the closest version rather than not returning any information at all. • OpenDDR identifies a device, a web browser or an operating system with a certain Confidence. You can specify the threshold as a target to achieve in the identification process. More high is the confidence more slow is the process; more low is the confidence more fast is the process, even if you can have less accurate results. • OpenDDR supports Patching of the data source
  7. Click to edit Master subtitle style Titolo presentazione - data

    11 The repository Google Code and Group We have uploaded OpenDDR source code and resources at: http://code.google.com/p/openddr/ We have also created a discussion group related to OpenDDR project: http://groups.google.com/group/openddr We adopt a subversion repository. In the trunk directory you find the source java code of the OpenDDR API in the src folder. In the directory resources you can find the DDRs, the vocabularies, and the BuilderDatasource: a document used in the process of device identification
  8. Click to edit Master subtitle style Titolo presentazione - data

    12 Implementation Implementation and Sample OpenDDR implements the W3C Simple API interface. It supports the core vocabulary as specified in the DDR W3C recommendation document. To use the OpenDDR Simple API you need to configure a property file as the follow: oddr.ua.device.builder.path=PATH_TO_FILE/BuidlerDataSource.xml oddr.ua.device.datasource.path=PATH_TO_FILE/DeviceDataSource.xml oddr.ua.device.builder.patch.paths=PATH_TO_FILE/BuilderDataSourcePatch.xml oddr.ua.device.datasource.patch.paths=PATH_TO_FILE/DeviceDataSourcePatch.xml oddr.ua.browser.datasource.path=PATH_TO_FILE/BrowserDataSource.xml ddr.vocabulary.core.path=PATH_TO_FILE/coreVocabulary.xml oddr.vocabulary.path=PATH_TO_FILE/oddrVocabulary.xml oddr.limited.vocabulary.path=PATH_TO_FILE/oddrLimitedVocabulary.xml oddr.vocabulary.device=http://www.openddr.org/oddr-vocabulary oddr.threshold=70 The oddr.threshold property allows the developer to specify what is the desired confidence to achieve the identification. In this case we want a confidence of, at least, 70%.
  9. Click to edit Master subtitle style Titolo presentazione - data

    13 Implementation Implementation and Sample To create the identification service we use the ServiceFactory in the W3C DDR-Simple-API.jar Service identificationService = ServiceFactory.newService("org.openddr.simpleapi.oddr.ODDRService", ODDR_VOCABULARY_IRI, initializationProperties); The first argument is the class of the DDRService; the second argument is the default vocabulary used in the identification if the vocabulary is not specified; the third argument is the Open DDR properties file. The following is an example of the code to get “displayWidth”, “model” and “vendor” properties of the default vocabulary and the default aspect (as specified in vocabulary). PropertyRef displayWidthRef; PropertyRef vendorRef; PropertyRef modelRef; Try { displayWidthRef = identificationService.newPropertyRef("displayWidth"); vendorRef = identificationService.newPropertyRef("vendor"); modelRef = identificationService.newPropertyRef("model"); } catch (NameException ex) { throw new RuntimeException(ex); } PropertyRef[] propertyRefs = new PropertyRef[] {displayWidth, vendorRef, modelRef}; Evidence e = new ODDRHTTPEvidence(); e.put("User-Agent", request.getHeader("User-Agent")); try { PropertyValues propertyValues = identificationService.getPropertyValues(e, propertyRefs); PropertyValue displayWidth = propertyValues.getValue(displayWidthRef); PropertyValue vendor = propertyValues.getValue(vendorRef); PropertyValue model = propertyValues.getValue(modelRef); if (displayWidth.exist() && vendor.exists() && model.exists()) { ... } } catch (Exception ex) { throw new RuntimeException(ex); }
  10. Click to edit Master subtitle style Titolo presentazione - data

    14 Introduction to test result Test Result (1) In OpenDDR we can specify a reduced vocabulary in order to limit the memory load. • It can be specified in the oddr.limited.vocabulary.path property of the oddr properties file. • It allows developers to choose which properties need to be loaded in memory at the startup from the datasource. In most case developers need only a subset of properties from the datasource. We compared OpenDDR with WURFL API (1.3.1) in terms of memory load in two situations: • Without a limited vocabulary • With a limited vocabulary We used jMeter as workload generator, configuring it in order to generate 100 requests per seconds from 10 worker with a different user agent. The user agents set contained ten of the most used user agent observed in a real environment. Both OpenDDR and WURFL API was tested in a simple web app.
  11. Click to edit Master subtitle style Titolo presentazione - data

    15 WURFL Memory load Test Result (2) Results for WURFL
  12. Click to edit Master subtitle style Titolo presentazione - data

    16 no reduced OpenDDR Memory load Test Result (3) Results for not reduced OpenDDR
  13. Click to edit Master subtitle style Titolo presentazione - data

    17 Reduced OpenDDR Memory load Test Result (4) Results for reduced OpenDDR
  14. Click to edit Master subtitle style Titolo presentazione - data

    18 Result Test Result (5) • We chose as limited vocabulary the W3C core vocabulary • The memory load of OpenDDR with limited vocabulary is only of 50MB and, after the initialization, OpenDDR doesn't have memory spike. • Both APIs identified correctly all the user agents in the HTTP request
  15. Click to edit Master subtitle style Titolo presentazione - data

    19 Why OpenDDR? Benefits • Open, free and based on a W3C standard. Update to DDR comes from the community and from device manufacturers. The identification is not only for the device as a single entity but is extended to the web browser and to the operating system. OpenDDR can identify third parties web browsers and custom builds of operating systems. A developer can specify the vocabulary and the aspects of the property he wants to know. • Based on identification threshold. When a particular version of a browser is not recognized, OpenDDR returns properties of the nearest version, if this supposition satisfies the threshold decided by the developer. • The developer can choose which properties must be loaded in memory, specifying a limited vocabulary: no memory waste. • Patch support: if you want to change or update your repository you can do that. It is simple to add new properties updating your DDR and your vocabulary.