37
BrowserPlus™ The BrowserPlus Team Nov 18th, 2008 The Gory Details 1 Thursday, November 20, 2008

BrowserPlus - The Gory Details

Embed Size (px)

DESCRIPTION

A walk through the implementation of BrowserPlus.

Citation preview

Page 1: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

BrowserPlus™

The BrowserPlus TeamNov 18th, 2008

The Gory Details

1Thursday, November 20, 2008

Page 2: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

BrowserPlus™

agenda

1. Architectural Overview

2. End Users

3. Web Developers

4. Service Authors

5. Security Model

16 pix

36 pix50 pix

BrowserPlus™

2Thursday, November 20, 2008

Page 3: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

David GrigsbyNov 18th, 2008

Architectural Overview

3Thursday, November 20, 2008

Page 4: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

BrowserPlus™

big picture

ActiveX NPAPI

daemon

user html/css/js

browserplus jsdist

dist servers

service service service service service

4Thursday, November 20, 2008

Page 5: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

BrowserPlus™

browserplus.js

• Instantiates plugin object

• exposes core API

• 5k minified

5Thursday, November 20, 2008

Page 6: BrowserPlus - The Gory Details

ActiveX NPAPI

Plugin Common Lib

daemon

DnD

SessionMgmt

UserPrompt

UtilsFile

Browse

JS Interop

JS Interop

DnD

DnD

pluginsuser html/css/js

browserplus js

service service service service service

Protocol Lib

6Thursday, November 20, 2008

Page 7: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

BrowserPlus™

daemon

BrowserPlusCore

ServiceUpdate

PlatformUpdate

UsageReporting

service

permissions

config

loggingservice

7Thursday, November 20, 2008

Page 8: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

BrowserPlus™

distribution servers

• platform (installers & updates)

• available services & descriptions

• permissions.smime

• stateless, BCP & redundant

• apache, REST

8Thursday, November 20, 2008

Page 9: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

Gordon DurandNov 18th, 2008

BrowserPlus for End Users

9Thursday, November 20, 2008

Page 10: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

BrowserPlus™

installation

• one time install of platform

• less than 2mb

• no restart, no reload

10Thursday, November 20, 2008

Page 11: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

BrowserPlus™

user prompting

• grant permissions

• install or update services

• tradeoff: transparency vs. usability

11Thursday, November 20, 2008

Page 12: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

BrowserPlus™

updates

• services and platform

• background download

• user-specific updates

12Thursday, November 20, 2008

Page 13: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

BrowserPlus™

control panel

• see / remove site permissions

• see what sites are using what services

• remove services

• disable or uninstall platform

• report bugs

13Thursday, November 20, 2008

Page 14: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

Steve SpencerNov 18th, 2008

BrowserPlus for Web Developers

14Thursday, November 20, 2008

Page 15: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

BrowserPlus™

getting started

• Include JavaScript

• Detect BrowserPlus

• Offer “upsell”

• Require services

• Use services

• The Toolbox

15Thursday, November 20, 2008

Page 16: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

BrowserPlus™

detection<script type="text/javascript" src="http://bp.yahooapis.com/2.1.7/browserplus-min.js"></script>

<script type="text/javascript">BrowserPlus.init(function(result) { if (result.success) { // require services } else if (result.error == "bp.notInstalled") { // render upsell link } else if (result.error == "bp.unsupportedClient") { // not supported on this client } else { // unexpected error }});</script>

16Thursday, November 20, 2008

Page 17: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

BrowserPlus™

upsell(3) in-page(1) redirect

(2) link

Install BrowserPlus

17Thursday, November 20, 2008

Page 18: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

BrowserPlus™

requirevar tts = { service: “TextToSpeech”, version: “1”, miniversion: “1.0.2”};

BrowserPlus.require( { services: [tts] }, requireCB);

18Thursday, November 20, 2008

Page 19: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

BrowserPlus™

service versioning

• major - api breaking change

• minor - add optional parameter

• micro - bug fix

• service - name of service

• version - (“1”, “1.2”, “1.2.3”)

• minversion - minimum allowable version

19Thursday, November 20, 2008

Page 20: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

BrowserPlus™

using services

• invocation

BrowserPlus.Service.method({args}, asyncCB);

• return object

{ success:true, value: “any object” }OR

{ success:false, error: “errorCode”, verboseError: “optional longer message” }

20Thursday, November 20, 2008

Page 21: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

BrowserPlus™

toolbox

• desktop notifications (fallback to html)BPTool.Notify.create().show(“My Title”, “My Message”);

• drop-in uploading widgetBPTool.Uploader.create("uploader", {uploadUrl: "up.php"}).render();

• in-page installation experienceBPTool.Installer.createDialog({}, myInitFunc);

(BrowserPlus in 1 line of code)

21Thursday, November 20, 2008

Page 22: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

BrowserPlus™

where’s the doc

http://browserplus.yahoo.com/developer/

22Thursday, November 20, 2008

Page 23: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

Lloyd HilaielNov 18th, 2008

BrowserPlus for Service Authors

23Thursday, November 20, 2008

Page 24: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

BrowserPlus™

what is a service?

• Implementation

• A binary shared library (.so or .dll)

• OR a ruby script

• Metadata - JSON “manifest” file

• whatever else you want...

24Thursday, November 20, 2008

Page 25: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

BrowserPlus™

how services fit

BrowserPlusCore Daemon

Ruby InterpreterC/C++ Service

C/C++ Service

C/C++ Service

RubyService

C Service API

RubyService

RubyService

25Thursday, November 20, 2008

Page 26: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

BrowserPlus™

Service API

• API definition - structure

26Thursday, November 20, 2008

Page 27: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

BrowserPlus™

Service API - interactionsBrowserPlus to Service Service to BrowserPlus

BPPGetEntryPoints()

BPPInitialize()

BPPShutdown();

BPPAllocate();

BPPDestroy();

BPPInvoke();

(attach/detach)

BPCPostResults()

BPCPostError()

BPCLog();

BPCInvokeCallback();

BPCPromptUser();

27Thursday, November 20, 2008

Page 28: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

BrowserPlus™

• null

• boolean

• integer

• double

• string

• map

• list

• callback

• path

• any

Service API - types

28Thursday, November 20, 2008

Page 29: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

BrowserPlus™

what’s coming

• Service API - C & Ruby

• most of our services - open source

• “SDK”

• full documentation

29Thursday, November 20, 2008

Page 30: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

BrowserPlus™

build your own

• getting started

• getting help

• getting published

30Thursday, November 20, 2008

Page 31: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

Lloyd HilaielNov 18th, 2008

BrowserPlus for Bad Guys

31Thursday, November 20, 2008

Page 32: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

BrowserPlus™

philosophy

• security through transparency (not obscurity)

• leverage existing precedent

• meaningful prompting

• Explicit installation

32Thursday, November 20, 2008

Page 33: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

BrowserPlus™

security measures

• All sensitive content signed

• All components may be blacklisted

• Secure file handles

• Secure user prompting

• User controlled permissions

33Thursday, November 20, 2008

Page 34: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

BrowserPlus™

Secure file handles

• selected via interaction OR returned as output

• Path removed, filename for display purposes

• session scoped

34Thursday, November 20, 2008

Page 35: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

BrowserPlus™

help from our friends

• The “paranoids”

• Y! privacy group

• you.

35Thursday, November 20, 2008

Page 36: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

BrowserPlus™

contact us

• Questions, Support, Ideas: http://developer.yahoo.net/forum/

• Partners: [email protected]

• Follow - twitter #browserplus & RSS

36Thursday, November 20, 2008

Page 37: BrowserPlus - The Gory Details

16 pix

36 pix50 pix

BrowserPlus™

questions?

37Thursday, November 20, 2008