J2ME and the

clumpsmackoverΛογισμικό & κατασκευή λογ/κού

2 Δεκ 2013 (πριν από 3 χρόνια και 8 μήνες)

98 εμφανίσεις


Confidential & Proprietary Information of Digital Focus

J2ME and the
IVY Platform


Confidential & Proprietary Information of Digital Focus

Agenda

Digital Focus

J2ME


Quick overview


What’s in & what’s out


Networking capabilities

IVY & JXTA


Why and what


IVY Architecture and Design


JXTA protocols and components




Confidential & Proprietary Information of Digital Focus

Digital Focus

Founded in 1995

Headquartered in Herndon, Virginia

Long history of excellence with Java technology…



Confidential & Proprietary Information of Digital Focus

Our Clients


Confidential & Proprietary Information of Digital Focus

J2ME

J2ME


Java 2 MicroEdition


Java for small, mobile and embedded devices


Configurations (horizontal)


CLDC, CDC


Profiles (vertical)


MIDP, Foundation, Palm


Confidential & Proprietary Information of Digital Focus

J2ME Architecture

CLDC Configuration


KVM, networking


Lowest common
denominator for
portability


No optional elements

MID profile


GUI


RMS


Timers


Lifecycle



Confidential & Proprietary Information of Digital Focus

What’s missing

Reduced number support


float, double primitives


Double, Float classes

Extendable UI components


Final High
-
level components


New components subclass Canvas

Lacks:


JNI


Sound API


Serialization


Reflection


User defined class loaders



Confidential & Proprietary Information of Digital Focus

Networking

Only HTTP is required with CLDC


Not great for mobile wireless solutions


Stateful


tough with mobile IP


Stream oriented

Generic Connection Framework


Opens protocol support (sockets, serial,
datagram,…)


Runtime binding to protocol

J2ME generally designed as a “client”

However:


Can be a Datagram server


Interfaces exist for socket serving


Confidential & Proprietary Information of Digital Focus

“Designing for small places”

Device resources limit OO design


Use objects judiciously


consider patterns like Flyweight


Use lazy instantiation where feasible

Design tradeoffs:


Classes, methods (encapsulation vs space)


Inheritance (saves space, increases cpu)


Names (maintainability vs space)


Use an obfuscator

Optimizations


Reuse objects; avoid needless re
-
instantiation


StringBuffer vs String


Use String wrappers when hashing


Confidential & Proprietary Information of Digital Focus

Devices

RIM 5180

Nextel

I85s

Nokia 9120

Kyocera

Sprint


Confidential & Proprietary Information of Digital Focus


Confidential & Proprietary Information of Digital Focus

What is it?

Lightweight wireless platform for Mobile to Mobile
(M2M) collaboration


Every Peer is a client, server and router

Enables rapid development


Easy, low cost entry


Provides API for locating, communicating with and sharing
services between groups/peers


Supports Web
-
enabled start
-
up and authentication

Open standards
-
based


Web Services, JXTA


XML

Built for wireless Java


J2ME (MIDP/CLDC)


Personal Java


CVM & Foundation Profile


Confidential & Proprietary Information of Digital Focus

Why IVY

Growing demand for P2P applications


Groove Networks


Games, Instant messaging


Napster, GNUtella


Mesh Networks

Technology is available


Programmable, wireless devices


Nextel’s I85


RIM’s 5820 J2ME/GPRS support


Nokia 9210 (personal java and MIDP)


RIM 8150


Over the air provisioning


Investment in 2.5G infrastructure

Network providers want to increase data usage


Confidential & Proprietary Information of Digital Focus

What & Why not JXTA?

What is JXTA


www.jxta.org


Mainly 6 protocols

Is IVY compliant with JXTA? No,
but almost


Uses JXTA protocols


JXTA requires TCP/IP and/or HTTP;


Datagram/UDP not supported

Why use Datagrams


Optimal for wireless networks.


Network providers use datagrams under WAP, HTTP and
sockets.

Why not use JXME (JXTA’s J2ME project)


Very early stages


Uses TCP/Http and centralized “super server”


Polling architecture. Not really P2P?


Confidential & Proprietary Information of Digital Focus

JXTA

High
-
level abstraction


Hides complexity of physical network


Single uniform addressability for all peers


Simple model for discovery, addressing and service sharing

Based on JXTA


6 protocols


Peer Discovery


Peer Resolver


Peer Information


Peer Membership


Pipe Binding


Endpoint routing

XML messages


Text


Binary

1 Request & 1 Response


Stateless

Peer

Advertisement

Endpoint

Pipe

Peer

Peer

Group

Service


Confidential & Proprietary Information of Digital Focus

Conceptual Architecture

APIs


Peer , groups


Services, Ads


Pipes

Protocols & Formats


JXTA XML & binary


SOAP/WSDL

Messages


Full duplex


Datagrams


HTTP,HTTPS

Cross Platform


J2ME


J2SE

Messages
Protocols and Formats
Pipes
Services
Ads
Peers and Groups
User Interface
Web Svcs
(soap,wsdl)

Confidential & Proprietary Information of Digital Focus

Service
-
oriented Architecture


Confidential & Proprietary Information of Digital Focus

Key Design Drivers

Network connectivity


Asynchronous API with listeners


Datagrams with reliable upper level

Minimize server dependency


Peer Group advertisements


Get credentials

Small footprint


Implement “needed” protocols


30K un
-
obfuscated

JXTA compliant



Confidential & Proprietary Information of Digital Focus

Java Packages

Ivy.api


Just interfaces and factories for
services and abstracts (pipes, messages,
peers, endpoints)

Ivy.impl


Implementations for the ivy.api
package

Ivy.util


constants and static methods

Ivy.net


Differs whether J2ME or J2SE

Ivy.exception


Confidential & Proprietary Information of Digital Focus

Contact Information


Digital Focus, Inc.

13825 Sunrise Valley Drive

Suite 220

Herndon, VA 20171

www.digitalfocus.com


Tom Whitcomb

Chief Technology Officer

tom.whitcomb@digitalfocus.com

703.561.5884

or

Dave Hoffman

Vice President

dave.hoffman@digitalfocus.com

703.561.5963