Star

Distributed System-Mobile and ubiquitous computing

CMU-95702分布式系统 第19章总结笔记

  • Design issues in distributed mobile applications:
    • Association: • Devices – Appear and disappear from the space. – Do so unpredictably – May be totally new to the space. – Or may be returning to the space. • They need to be: – Perhaps added to the network – Brought into Association with resources and applications • Examples of Association – Come on campus and be able to be associated with the printers that are close to you. – Be alerted if someone you know is walking near you. – Be provided with selling prices in your local area for your goods (not prices in far-away areas).
    • Application-level Association: often by discorvery, broadcasts
  • How a new device become part of the local network?

    • ARP
    • DHCP
  • Sensing and Context Awareness:

    • sensing: camera, time, acceleration, location, speed, temperature
    • context awareness: in terms of sensed data, or associated data
  • Location Sensing:

    • GPS
    • Database of collected Wifi access points – stores the access point's MAC address and the GPS location at which it was observed
    • Cellular – compute using signal strength to multiple cellular tower locations
    • RFID tags – tags are associated with a location
  • Adaptation:

    • Presentation to fit the screen
    • Use of JavaScript to fit the devices capabilities
    • Media quality to fit the screen and device capabilities
    • Language to fit the user
    • Information to fit the physical context. • Give only movie times in the future, and in nearby theaters
  • Device awareness / browser detection: Reply differently depending on what device makes request. 3 HTTP headers provide clues of what the device is:

  1. User-Agent • Identifies the mobile browser and almost always the device manufacturer and model. • BlackBerry8330/4.3.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/105 • Collection of mobile agent strings: – http://www.zytrax.com/tech/web/mobile_ids.html

  2. X-Wap-Profile • Link to an XML profile of the phone’s capabilities •E.g.http://www.blackberry.net/go/mobile/profiles/uaprof/8310/4.2.2.rdf

  3. Accept • Supported MIME(多用途的网际邮件扩充协议)types • E.g. text/html, application/xhtml+xml, etc.

    These 3 headers can provide enough info , but: - header can be missing - have inaccurate values - have invalid urls

  • Feature detection(more flexible and reliable solution): bottom line: using feature detection, not browser detection
    • Two strategies for feature detection:
      • Graceful degradation
        • Design for modern browsers
        • Where features are not available, provide a simpler alternative
          • If not possible, alert the user
        • Don't allow it to invisibly fail
      • Progressive enhancement
      • Design with a baseline of usable functionality
      • Enrich the user experience step-by-step by testing for features before using them.
  • Responsive web design:
    • A strategy of web design for multiple screen sizes
    • Uses:
      • Fluid grids expressing sizes in terms of percents, not pixels
      • Modify size of media using relative units
        • Keep them within their bounding elements
        • Images
        • Media
        • Font size
      • Crossing size thresholds switch to completely different designs
        • Accomplished using media queries
  • Mobile first:

  • A philosophy of web design

  • Design for mobile first, and desktop second

  • Counter to what has been done historically, of mobile 2nd

  • Benefits of Mobile First: - Focus on the platform on which you will reach the most users - Forces designers to focus on the most important content and functionality - Allows for using technologies on mobile: * touch events * geolocation 地理定位 * accelerometer 加速计

  • Mobile deployment strategies:

    • Native
      • E.g. Android, iOS
      • Requires redeveloping for each architecture
      • 2 code bases
    • Native with Development Framework
      • Use a framework that compiles to multiple native applications
      • E.g. Corona (http://www.coronalabs.com)
    • Mobile Web
      • Develop in HTML / CSS /JavaScript
      • Accessed in a browser
      • Can install local icon to launch to site
        • Use local storage to store information when off line
        • Use manifest to cache application to use when off line
        • Sync when Internet is again available.
      • Hybrid
        • Develop in HTML / CSS / JavaScript
        • Wrap in a browser wrapper to create native apps
        • Wrapper provides access to phone hardware not accessible from the browser
        • Apache Cordova (https://cordova.apache.org) is an open source native wrapper