barry atkins heather kreger steve graham
Post on 18-Jan-2016
38 Views
Preview:
DESCRIPTION
TRANSCRIPT
Barry AtkinsHeather KregerSteve Graham
Micro Managing – Implementing WSDM in the Small
Tiny WSDM Demo
© 2004 IBM CorporationPage 2 WS-Resource framework
Agenda
The Demo
Motivation
Tiny WSRF - Resource Properties
Tiny WS-Notifications – Base Notifications
Tiny WSDM
• WSDM Management Event
• Identity
How Hard was That?
© 2004 IBM CorporationPage 3 WS-Resource framework
Motivation
Show that WSDM and its requisite specifications can be implemented in resource constrained devices
WSDM composes for minimal
WSDM, WS-Addressing, WSRF, WS-N were designed to be composable to allow for minimal implementation requirements in simple or constrained implementations
WDSM composes for the enterprise
WSDM, WS-Addressing, WSRF, WS-N also provide composable functionality required to support complex, large scale systems.
© 2004 IBM CorporationPage 4 WS-Resource framework
Topology
BESServer
WAS 5.1(Wireless GW)
1
2
3
4(1) Blackberry connects to Wireless GW via BES tunneling
(2) Client “discovers” Blackberry via Wireless GW(3) WSRF, WSN message exchanges to Wireless GW
(proxy)(4) WSRF, WSN message exchanges to Blackberry WSRF
and WSN Endpoint
WSRFand WSN Endpoint
© 2004 IBM CorporationPage 5 WS-Resource framework
Functionality
“port” of ETTK WSRF-ResourceProperties
• GetResourceProperties- Retrieve value from Blackberry
Date, Time, Serial#, BatteryLevel, BatteryStatus, AllocatedStorage, FreeStorage, total code module size (0(n) calc)
• GetMultipleResourceProperties• GetResourcePropertiesDocument
- Equivalent to WS-Transfer Get
• SetResourceProperties (update)- Modify value of Blackberry
Date, Time, Color (this faults)
• WSRF-BaseFaults• Blackberry GUI
“port” of ETTK WSN
• NotificationProducer- Just subscribe request/response- ShowSubscriptions
• Detect situation and format message for- Date change and time change (from WSRF Set)
• Drive notification message to consumer via EPR
JVM
KSoap (40k)
WSRF (19k)
WSN (32k)
WSDM (12k)
102K
© 2004 IBM CorporationPage 6 WS-Resource framework
Cost
1 developer 25 days
• Developer had good knowledge of Blackberry programming
• Good knowledge of ETTK
• No background with WSRF, WS-N, or WSDM
© 2004 IBM CorporationPage 7 WS-Resource framework
Implementation
The demo consists of:
Running on the Server device.
• Web interface• Web services running on WAS 6.0
Running on the Blackberry device.
• Client code consisting of a tiny soap engine • Soap server
WirelessDeviceGateway web service EndpointReference for the TinyWSRF implementation
• Forwards the requests to the various devices via a variety of device-specific transports
• The device is specified by a device property contained in the soap header. (wsa reference property)
© 2004 IBM CorporationPage 8 WS-Resource framework
Tiny WSRF
© 2004 IBM CorporationPage 9 WS-Resource framework
Tiny WSRF GetResourceProperty
© 2004 IBM CorporationPage 10 WS-Resource framework
Tiny WSRF – GetMultipleResourceProperties
© 2004 IBM CorporationPage 11 WS-Resource framework
Tiny WSRF - SetResourceProperty
© 2004 IBM CorporationPage 12 WS-Resource framework
Tiny WSRF GetResourcePropertiesDocument
© 2004 IBM CorporationPage 13 WS-Resource framework
Tiny Notifications - Subscriptions
Subscriptions may be created for the following topics :
Date_Change
- notification is performed when the device's date is changed
Inbox_Change
- notification is performed when the device's email inbox is changed (email added or deleted)
Outbox_Change
- notification is performed when the device's email inbox is changed (email added or deleted)
CodeModuleSize_Change
- notification is performed when the code size for all installed modules changes.
© 2004 IBM CorporationPage 14 WS-Resource framework
Tiny Notifications - Subscribe
© 2004 IBM CorporationPage 15 WS-Resource framework
Tiny Notifications - Unsubscribe
© 2004 IBM CorporationPage 16 WS-Resource framework
Tiny Notifications - Unsubscribe
© 2004 IBM CorporationPage 17 WS-Resource framework
Tiny Notifications - Unsubscribe
© 2004 IBM CorporationPage 18 WS-Resource framework
Tiny Notifications – ShowSubscriptions
© 2004 IBM CorporationPage 19 WS-Resource framework
Tiny Notifications – Seeing Notifications
© 2004 IBM CorporationPage 20 WS-Resource framework
Tiny Notifications – Notification received
© 2004 IBM CorporationPage 21 WS-Resource framework
It’s a WSDM Management Event!
<ManagementEvent>
<sourceComponentId>
<wsa:componentAddress xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">
<wsa:Address> http://9.27.80.182:4400/WSRF4PDA_V6/services/WSRFWirelessDeviceGateway
</wsa:Address>
<wsa:ReferenceProperties>
<ResourceId xmlns="http://resource.wsrfimpl.ettk.ibm.com">
4:2100000a
</ResourceId>
<device xmlns="http://rim.pda">
RIM2100000a
</device>
</wsa:ReferenceProperties>
</wsa:componentAddress>
<Caption>
BlackBerry Device 2100000a
</Caption>
</sourceComponentId>
<situation>
<situationType>
ReportSituation
</situationType>
<msg>
Date change occurred
</msg>
</situation>
<eventId>
http://rimpda/RIM2100000a/20041225175424660
</eventId>
<reportTime>
2004-12-25T17:54:24.660Z
</reportTime>
</ManagementEvent>
© 2004 IBM CorporationPage 22 WS-Resource framework
Tiny WSDM
The WSDM demo consists of the following scenario :
1. A subscription is created for the topic "CodeModuleSize" on the Blackberry.
2. An application is installed on the device, triggering a notification.
3. The NotificationConsumer receives the notification, and asks the device for a list of installed applications.
4. The list is compared to a known list of legal applications (via policy).
5. A request to remove the offending application(s) is sent to the device, which uninstalls the requested application(s).
© 2004 IBM CorporationPage 23 WS-Resource framework
Tiny WSDM – Subscribe to CodeModuleSizeChange
© 2004 IBM CorporationPage 24 WS-Resource framework
TinyWSDM – Load a New Application - HelloWorld
At: http://barryxplaptop:4400/WSRF4PDA_V6/jad.html
© 2004 IBM CorporationPage 25 WS-Resource framework
Tiny WSDM – Get Link to New Application
© 2004 IBM CorporationPage 26 WS-Resource framework
TinyWSDM – Download New Application
© 2004 IBM CorporationPage 27 WS-Resource framework
TinyWSDM – Application Installed!
© 2004 IBM CorporationPage 28 WS-Resource framework
TinyWSDM –Notification Received & Application Removed
© 2004 IBM CorporationPage 29 WS-Resource framework
TinyWSDM – Application Removed
Device limitation: Icons on the Blackberry are only removed when the device is rebooted
• The HelloWorld application appears to remain installed becausethe icon appears on the device
• The HelloWorld application is not listed in the list of installed applications
© 2004 IBM CorporationPage 30 WS-Resource framework
How hard was that?
The device code consists of 2 components : A server component, and a UI component.
The server component runs automatically in the background. It connects to the WirelessDeviceGateway, and identifies itself using the device’s PIN.
The UI component provides simple feedback and configuration of the server component. It displays messages as they are received from the WirelessDeviceGateway, as a result of GetResourceProperty, etc requests. (not necessary)
© 2004 IBM CorporationPage 31 WS-Resource framework
How much code?
Code size written : 4000 lines
Total compiled code size is 102Kb
Blackbarry: 4 main packages,
• ksoap2.cod 62,620 (library) (the soap engine/xml parser)• TinyWSRF.cod 19,724 (library) (code WSRF implementation)• WSRFController.cod 8,772 (application)• WSRFServer.cod 12,880 (application)
Server Code
• Module which handles the device-specific transport of the SOAP Envelope for the data transport for several different devices (WiFi, SMS, cellular, etc) that is transparent to the caller.
• Various JSPs & servlets for running the demo.
© 2004 IBM CorporationPage 32 WS-Resource framework
Nitty Gritty Details
package com.ibm.tinywsrf – 1448 lines
1,296 DocServer.java
2,659 EndpointReference.java
1,827 Notification.java
1,365 NotificationManager.java
10,089 NotificationMessage.java
2,765 NotificationProducer.java
951 ResourceProperties.java
9,284 Resources.java
3,232 Subscription.java
7,124 SubscriptionManager.java
5,067 Utils.java
4,610 WSConstants.java
2,294 WSRFConstants.java
package com.ibm.wsrpcontroller- - 760 lines
962 Controller.java
6,146 mainApp.java
3,568 SubscriptionsScreen.java
2,558 WDGSetupScreen.java
2,677 WSRPControllerScreen.java
package com.ibm.tinywsrfserver - 1019 lines
2,005 AppWatcher.java
19,584 CommandProcessor.java
1,931 DateWatcher.java
3,801 MailWatcher.java
5,404 mainApp.java
2,270 SOAPProcessor.java
107 UIListener.java
469 Watcher.java
package com.ibm.wireless.rim - 828 lines
2,257 Marshaller.java
717 MarshallObject.java
682 Persistant.java
472 SOAPListener.java
11,395 SOAPServer.java
1,504 WDGSetup.java
2,417 WebService.java
4,136 WebServiceProxy.java
© 2004 IBM CorporationPage 33 WS-Resource framework
Questions
top related