2. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.2
Graphic Section Divider
3. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.3
Java Micro Edition (ME) 8
Introduction
Terrence Barr
Senior Technologist & Product Manager
Oracle
Sep, 2013
4. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.4
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended
for information purposes only, and may not be incorporated into any contract.
It is not a commitment to deliver any material, code, or functionality, and should
not be relied upon in making purchasing decisions. The development, release,
and timing of any features or functionality described for Oracle s products
remains at the sole discretion of Oracle.
5. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.5
Java ME 8:
The Platform for the
Internet of Things
6. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.6
Agenda
§ď§âŻ The Rise of the Internet of Things: Drivers behind Java ME 8
§ď§âŻ Java ME 8: Background and Overview
§ď§âŻ Java ME Connected Limited Device Configuration (CLDC) 8
§ď§âŻ Java ME Embedded Profile (MEEP) 8
§ď§âŻ Device I/O API (DIO)
§ď§âŻ Conclusion and Call to Action
Note:
Java ME 8 is still under development and information presented here is subject to change.
7. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.7
The Rise of the
Internet of Things:
Drivers behind Java ME 8
8. x86 Architecture/
Windows OS
Standards Based
Hardware & Software
Proprietary Hardware
& Software
1960 - 1985
Host Era
2006 - 2025
Internet of Things
1985-2006
PC Era
The 3rd IT Revolution
9. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.9
Challenges the Embedded Industry is facing
â˘âŻ Multitude and variety of
devices
â˘âŻ Security, privacy, reliablity
â˘âŻ Remoteness, no human
control
â˘âŻ Provisioning, management
and monitoring
â˘âŻ Data flow and analytics
â˘âŻ Interoperability and
standards
Explosion of Devices: Whatâs keeping You awake at night?
â˘âŻ Long device lifecycle
â˘âŻ Connectivity, cost,
infrastructure, bandwidth
â˘âŻ Device cost, power
requirements
â˘âŻ Developer productivity
â˘âŻ Development cost, skill
sets, re-use
â˘âŻ Time-to-market
10. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.10
Drivers behind Java ME 8
Requirement Description
Modern embedded
software platform
â˘âŻ Robust, secure, cross-platform software execution environment
â˘âŻ Modular software system and remote operation extends product
value and reduced cost/risk
â˘âŻ Leverage feature-rich platform and focus on your value-add
Efficient software
development and
deployment model
â˘âŻ Address the challenges of traditional embedded development
â˘âŻ Accelerate time-to-market
â˘âŻ Enable software portability and economies of scale
â˘âŻ Leverage large ecosystem of expertise and partners
Increased market reach â˘âŻ Platform âright-sizingâ allows to address wide range of use cases
and target markets with a single software model, from low-
footprint devices to more powerful systems
Open, based on
standards, interoperable
â˘âŻ Avoid vendor lock-in
â˘âŻ Participate in and benefit from technology innovation
â˘âŻ Integratable with many industry standards
Meeting the Challenges of the Internet of Things
11. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.11
Java ME 8:
Background and Overview
12. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.12
Unifying the Java Ecosystem for Embedded
â˘âŻ Java ME 8 is the âlittle siblingâ of Java SE 8
â˘âŻ Portability of applications and libraries across the Java Platform
â˘âŻ Java ME vs. Java SE is a footprint/functionality tradeoff
â˘âŻ Java ME & Java SE release cycles are in sync
Key
Principles
â˘âŻ Modern and flexible platform for delivering embedded software
â˘âŻ Unified development experience & community across Java
â˘âŻ Aligned Java language, core APIs, development, and tools
â˘âŻ Enable 9+ Million Java developers to develop for Java Embedded
Benefits
Enabling Java Developers to be Embedded Developers
13. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.13
Java ME 8: Key Themes and Features
â˘âŻ Major step in Java ME Java SE alignment
â˘âŻ Dedicated and optimized embedded application platform
â˘âŻ Enable increased range of use cases and markets
Themes
Key
Features
â˘âŻ Java ME CLDC 8: Updated VM + alignment with Java SE 8
â˘âŻ Java ME Embedded Profile 8: Embedded Application Platform
â˘âŻ Value-add new and enhanced APIs and features for embedded
â˘âŻ Improved configurability and optimized footprint
â˘âŻ Target devices as low as at 128 KB RAM, 1 MB Flash/ROM
Target
Markets
â˘âŻ Small to mid-embedded covering wide range of use cases/markets
â˘âŻ Intelligent edge devices, communication nodes, healthcare
devices, smart sensors, smart meters, other IoT/M2M solutions
14. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.14
Java ME 8 Focus
Platform
Footprint
Device
CPU/
GPU/I-OARM 7 Cortex M ARM9/11 MIPS32 - ARM Cortex A â PPC - Intel Atom
50KB-1MB
1MB-10MB
10MB-100MB Java ME
Java SE
Java
Card
15. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.15
Java ME 8 Platform Overview
Java VM
Additional
APIs
(Examples)
Java ME Connected Limited Device Configuration (CLDC) 8 (JSR 360)
Additional
Optional APIs
On-Device I/O
Access
Vertical Specific
APIs
Location
Messaging
Wireless
Communication
Web Services
Protocols and
Data Conversion
Sensors
Additional
Optional JSRs
Security and
Management
Applications Applications Applications Applications
Application Platform
Java ME Embedded Profile
(MEEP) 8 (JSR 361)
On-Device I/O
Access
Device I/O
API
SATSA
Security and Trust
Services
Generic Connection
Framework
GCF 8
16. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.16
Java ME 8: A Service-Enabled Platform
Extend lifetime, flexibility, and value
â⯠Create cross-platform, modular software applications
â⯠In-field s/w upgrades while maintaining system integrity
â⯠Reduce device certification and testing overhead
Hardware Platform
OS + Core Services
Java ME 8 Platform
Traditional Platform Java System
Component
Cloud
(Network/
Enterprise)
OS + Core Services
Hardware Platform
Native Application
Loadable Applications
and Services
Limited flexibility, high cost
â⯠H/W-S/W interdependencies
â⯠Upgrade complexity
â⯠Impact on security/integrity
Bringing software modularity to resource-constrained systems
17. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.17
Embedded Application(s)
Embedded Application(s)
Virtual Machine
Optional JSR
System
Controller
Communication
Management
Device
Management
Tooling
Agent
Software
Provisioning
Identity
Management
Messaging
Monitoring &
Logging
Data Store &
Sync
Web Server
Other Services/
Protocols
Graphics/UI
Optional JSR
Embedded Application(s)
Java ME 8: Oracle Product Strategy
An extensible, customizable application platform
Oracle Java ME
Embedded
Product
Building Blocks (Oracle or
partners): Services and/or
Libraries
Oracle or
3rd Party JSRs
3rd Party
Enhancement
3rd Party
Enhancement
3rd Party
Enhancements
â˘âŻLocal Peripherals
â˘âŻIoT Network
â˘âŻEnterprise
Note:
Preliminary - Not all components
shown are currently available
Local or
Network
Interfaces
18. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.18
General IoT and Machine-to-Machine (M2M) solutions
Smart Meters & Smart Sensors
Medical: eHealth & TeleHealth
Wireless Modules, Gateways
Industrial Control, Telemetry
Java ME 8 Example Use Cases
Enabling products and services across different market segments
19. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.19
Tools â Developing Efficiently
NetBeans +
device emulation
â˘âŻ Java ME SDK
â⯠Tools and emulation for rapid development
of embedded Java ME applications
â˘âŻ NetBeans & Eclipse Plug-ins
â⯠Integration with Java ME SDK
â⯠Full-featured, integrated development
environment for embedded
â˘âŻ Unified Development Experience
â⯠Same development model across Java
ME, Java SE, and Java EE
Java ME SDK and IDEs
Free
Tools
20. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.20
Java ME
Connected Limited Device
Configuration (CLDC) 8
And
Generic Connection
Framework (GCF) 8
21. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.21
Java SE 8
â˘âŻ Description
-⯠CLDC 8 is an long-anticipated, evolutionary update for CLDC 1.1.1 to bring
the VM, Java language and core API libraries in alignment with Java SE 8
â˘âŻ Key Features
-⯠Synchronize Java SE 8 language features into Java ME
-⯠CLDC 8 is an extended strict subset of Java SE 8
-⯠Introduce developer-friendly Java SE APIs
-⯠Includes updated Generic Connection Framework (GCF) 8
-⯠Virtual Machine update to align with Java SE developer tools
-⯠Remain small and enable footprint optimizations
-⯠Backward binary compatible
CLDC 8 High-Level Overview
CLDC 8
Bringing The World of Java SE to Java ME
22. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.22
CLDC 8 architecture
CLDC 8
NIO files
NIO channels
Logging
Compact Configuration
NIO buffers java.lang java.io java.security java.util
GCF 8
Multicast
Secure
Datagram
Modem
Connection HTTP HTTPS Socket
Server
Socket
Datagram
Java VM
23. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.23
Configurations
The âCLDC
Configurationâ is the
complete set of
CLDC APIs
Provides
maximum
functionality for
applications
Typical CLDC
platform footprint
is 1-2 MB ROM
The CLDC Compact
Configuration
defines a subset for
very small target
platforms
Omits Logging,
NIO Files, and
NIO Channels
Tailored for very
constrained
devices (512 K
ROM)
CLDC is scalable to small and very small devices
24. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.24
Optimizing Footprint Even Further
§ď§âŻâStripping On Deploymentâ
â⯠For fixed-function, minimal footprint deployments
â⯠Allows bundling application with CLDC 8 runtime and then stripping
away unnecessary components
â⯠Result: Minimal, non-modifiable binary containing application and
runtime
25. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.25
New Java Language Features
â˘âŻprivate void setInterval(int interval) {
assert interval > 0 && interval <= 1000 :
"Invalid value?â;
}
Assertions
â˘âŻ Added support for AbstractCollection, AbstractList, AbstractSet,
Collection, Collections, Enumeration, Iterator, List, ListIteratorGenerics
â˘âŻvoid processList(Vector<String> list) {
for (String item : list) {
...
}
Enhanced for
Loop
â˘âŻHashtable<Integer, String> data = new Hashtable<>();
void add(int id, String value) {
data.put(id, value);
}
Autoboxing
26. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.26
New Java Language Features
â˘âŻenum Season {WINTER, SPRING, SUMMER, FALL};
private Season season;
void setSeason(Season newSeason) {
season = newSeason;
Enumerations
â˘âŻvoid warning(String format, String... parameters) {
for(String p : parameters) {
process(p);
}
}
Varargs
â˘âŻimport static data.Constants.RATIO;
...
double r = Math.cos(RATIO * theta);
Static imports
â˘âŻSuppressWarnings, Deprecated, Override
Â
@Deprecated
public void clear();
â˘âŻ(JLS 7 section 9.6.3.2 @Retention - SOURCE retentions policy only.)
Â
Annotations
27. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.27
New Java Language Features
â˘âŻswitch (arg) {
case "-data": ...
case "-out": ...
Strings in switches
â˘âŻlong mask = 0xfff0_ff08_4fff_0fffl;
byte flags = 0b01001111;
Binary integral literals and
underscores in numeric literals
â˘âŻcatch (IOException | InterruptedException ex) {
logger.log(ex);
throw ex;
Multi-catch and more precise
rethrow
â˘âŻHashtable<String, String> map =
new Hashtable<>();
Improved Type Inference for Gen.
Instance Creation (diamond)
â˘âŻtry (DataInputStream is = new DataInputStream(...)){
return is.readDouble();
}
Try-with-resources statement
28. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.28
Library Updates
§ď§âŻ CLDC Library
â⯠Platform extensibility via Service Providers (ServiceLoader)
â⯠EventObject and EventListener
â⯠Subset of NIO Buffers
â⯠NIO Files and NIO Channels
â⯠Logging
â⯠StringBuilder and String Formatter
â⯠Comparable interface
â⯠Try with resources â Closeable and AutoCloseable
29. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.29
Library Updates
§ď§âŻ New Collections
â⯠List â ArrayList, LinkedList
â⯠Map â HashMap, LinkedHashMap, WeakHashMap
â⯠Set â HashSet, LinkedHashSet
â⯠Queue â Deque, ArrayDeque
â⯠Iterable and Iterator, ListIterator
30. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.30
Focus on: Service Providers
§ď§âŻ A service is a well-known set of interfaces and abstract classes
that is implemented by a (service) provider.
§ď§âŻ Providers can be installed to extend the Java platform.
§ď§âŻ Providers are located and instantiated on demand.
§ď§âŻ Providers are identified via a provider-configuration file in the
META-INF/services resource directory.
An extension mechanism for the Java platform
31. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.31
Service Providers - Example
import
 com.XYZ.ServiceA;
Â
ServiceLoader<ServiceA>
 sl1=
Â
 ServiceLoader.load(ServiceA.class);
Â
Â
An extension mechanism for the Java platform
ServiceB
ServiceB
Provider1
ServiceB
Provider2
com.XYZ.ServiceA
ServiceA
Provider1
ServiceA
Provider3
ServiceA
Provider3
Resources:
META-INF/services/com.XYZ.ServiceA:
META-INF/services/ServiceB:
ServiceAProvider1
ServiceAProvider2
ServiceAProvider3
ServiceBProvider1
ServiceBProvider2
32. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.32
Updates to CLDC Virtual Machine
â˘âŻ Target devices are not able to support InvokeDynamic
â˘âŻ No support for reflection or retention of runtime annotations
CLDC 8 supports the Java VM Specification for SE 7 with some
limitations
â˘âŻ For classfile versions 51 and 52
â˘âŻ without a preverifier
Verification by Type Checking
â˘âŻ For classfile versions 48 and older
Legacy Verification (Preverifier)
33. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.33
Unsupported Java SE 8 Features
§ď§âŻ No reflection
§ď§âŻ No serialization
§ď§âŻ No InvokeDynamic/Lambda expressions
§ď§âŻ No JNI and application native code
§ď§âŻ No User-defined class loaders
§ď§âŻ No runtime annotations
§ď§âŻ No thread groups and daemon threads
§ď§âŻ No concurrency utilities
§ď§âŻ Limited Math APIs (No BigDecimals)
§ď§âŻ Limited security APIs
§ď§âŻ Limited collection APIs (No sorted collection classes)
34. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.34
CLDC Summary
Language Alignment with SE 8
VM Alignment with SE 8
Library Alignment with SE 8
Compact Configuration for very small devices
GCF 8 to provides flexible networking
Developer leverage to tools, APIs and knowledge
35. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.35
Generic Connection Framework (GCF)
â˘âŻ Consistent IPv6 support
â˘âŻ Generic ConnectionOption mechanism to parameterize connections
â˘âŻ Permissions apply per protocol
â˘âŻ Extended failure information via exceptions from java.net
Consolidates GCF specification from CLDC, MIDP, CDC, and JSR 197
â˘âŻ File support via StreamConnection
â˘âŻ IP Multicast
â˘âŻ Latest version of security protocols via TLS 1.2
â˘âŻ Secure datagram connection via DTLS 1.2
â˘âŻ Modem connection enhances CommConnection with control of hardware handshake
New and enhanced protocols
37. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.37
New GCF Features
â˘âŻ GCF consistently supports IPv6 addresses
â˘âŻ The value of the host field on Connector.open must be
a symbolic hostname, an IPv4 address or an IPv6
address surrounded by square brackets ('[', ']â).
â˘âŻ datagram://[2001:db8::7]:4567
â˘âŻ multicast://[FF0X::101]:4444
IPv6
38. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.38
New GCF Features
â˘âŻ GCF includes support for UDP Multicast
â˘âŻ 1 to n communication of UDP datagrams
â˘âŻ Multicast is important for distributed services:
Used for service announcement and discovery, media streaming
â˘âŻ Dynamic Discovery for configuration and rendezvous (mDNS,
Bonjour)
â˘âŻ The new protocol class UDPMulticastConnection enables
â˘âŻ Client and server scenarios
â˘âŻ Joining multicast groups
â˘âŻ Creating a multicast server socket
UDP Multicast
39. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.39
New GCF Features
â˘âŻ SecureConnection and SecureServerConnection
support TLS 1.2
â˘âŻ SecureServerConnection provides the server-side of a TLS
connection
â˘âŻ Both can be parameterized to:
â˘âŻ Select a set of cipher suites
â˘âŻ Select a minimum protocol version
â˘âŻ Request client authentication
TLS protocol enhancements
40. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.40
New GCF Features
â˘âŻ SecureDatagramConnection provides client-side support
for DTLS
â˘âŻ It can be parameterized to:
â˘âŻ Select a set of cipher suites
â˘âŻ Select a minimum protocol version
â˘âŻ Request client authentication
DTLS protocol support for TLS over UDP
41. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.41
New GCF Features
â˘âŻ Utility functions for name lookup, reverse name lookup
and for testing the reachability of a host (ping):
â˘âŻgetCanonicalHostName(String host)
â˘âŻisReachable(String host, int ttl, int timeout)
â˘âŻgetByName(String host)
NetworkUtilities
42. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.42
New GCF Features
â˘âŻ Purpose: monitor and control the signal lines of a serial
interface
â˘âŻ Getter and setter for the line mode (input/output)
â˘âŻ Getter and setter for the line state
â˘âŻ Listener for changes to the state of an input line
Modem Connection
43. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.43
New GCF Features
â˘âŻ Type-safe mechanism for protocol-specific additional parameters
â˘âŻ Useful for selecting access points, proxy settings, proprietary protocol
extensions
â˘âŻ Multiple connection options can be used with varargs
ConnectionOptions
â˘âŻConnectionOption <String> keep = new ConnectionOption<>
("KeepAlive", "KEEP_ALIVE");
ConnectionOption <Integer> port = new
ConnectionOption<>("ProxyPort", 80);
Connection c = Connector.open(âmy.server.comâ, keep, port)
Example
Additional protocol parameters
44. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.44
New GCF Features: Access Point
§ď§âŻ The AccessPoint API enables:
â⯠Obtaining a list of available network access points
â⯠Querying the access technology (e.g. 3GPP, CDMA, Wi-Fi, Wired)
â⯠Getting Access-point technology-specific properties (e.g. 3GPP country
code, network code)
â⯠Selection of an access point for a connection
â⯠Detection of connect/disconnect situations
Selecting a Network Access Point
45. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.45
New GCF Features: Access Point
AccessPoint
 aps[]
 =
 AccessPoint.getAccessPoints(true);
Â
AccessPoint
 ap
 =
 aps[0];
Â
//
 attach
 an
 event
 listener
 to
 the
 first
 access
 point
Â
ap.addListener(new
 AccessPointListener()
 {
Â
public
 void
 notifyEvent(AccessPoint
 accessPoint,
 int
 eventType)
 {
Â
Â
 if
 ((eventType
 ==
 AccessPointListener.EVENT_TYPE_AVAILABLE))
Â
Â
Â
Â
Â
Â
 System.out.println(âsignalstrength
 =
 â+
 ap.getProperty(âsignalstrength"));
Â
Â
 }
Â
});
Â
Â
//
 select
 the
 first
 access
 point
 for
 communication
Â
ConnectionOption<String>
 id
 =
 new
 ConnectionOption<>("AccessPointâ,
 ap.getId());
Â
Connection
 c
 =
 Connector.open("http://www.oracle.com/index.html",
 id);
Â
Example
46. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.46
Development Tools for CLDC 8
§ď§âŻ Standard JDK 7 or 8 tools can be used for application development
§ď§âŻ Embedded-specific hints & warning messages
â⯠Provides developer with additional information to optimize code
§ď§âŻ Debug structures are optional
â⯠Debug features can be ignored/filtered out to save footprint
§ď§âŻ Future tools under consideration may include
â⯠Optimizing converter/compiler plugin for optimizing CLDC 8 applications
§ď§âŻ Integrated with Java ME SDK and IDEs
47. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.47
Java ME Embedded Profile
(MEEP) 8
48. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.48
MEEP 8 High-Level Overview
§ď§âŻDescription
â⯠MEEP is an evolution of JSR 228 (IMP-NG), defining a modernized Java
application platform with features and enhancements targeted at the
small- and mid-range embedded market
§ď§âŻKey Features
â⯠Builds on CLDC 8
â⯠Robust and flexible multi-tasking application model
â⯠âServices-enabledâ application platform supports modular software
design, deployment, and management
â⯠Enhanced and flexible security model
â⯠Improved configurability and optimized footprint for deployment
The Evolution of Java ME for Embedded
49. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.49
MEEP 8 Key Features and Benefits
A Modern Services-Enabled Software Platform for Embedded
Feature Benefit
Built on CLDC 8 Leverages CLDC 8 language features, APIs, and
permissions model to align with Java SE 8
API Optionality and
âProfile Setsâ
Enables âright-sizingâ of platform to optimize footprint and
reduce hardware requirements for specific target device
Software Provisioning and
Management
Supports remote deployment, management, and monitoring
of software components
Support for Software
Modularization
Enables modular software development and deployment,
reducing development effort, complexity, and footprint
Support for advanced
connectivity
Supports a wide range of connectivity options, both wired
and wireless, including advanced support for cellular
Enhanced security model Enables implementation of use case-specific security
policies for authentication and authorization
50. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.50
MEEP 8 Target Devices and Footprint
§ď§âŻMEEP 8 is designed for âRight-Sizingâ
â⯠Well-defined optionality and modularity allows matching software features
to deployment target footprint
â⯠âStripping on Deploymentâ allows further reduction for very small fixed-
function targets
â⯠Greatly expands the range of addressable use cases and devices
§ď§âŻTarget Device Categories
â⯠Minimal Single-Function Device: Smallest possible footprint
â⯠Standard Multi-Function Device: Expands with functional requirements
â⯠Full Multi-Function Device: Full functionality, footprint not a concern
Adressing New Market Opportunities
51. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.51
MEEP 8: Right-Sizing The Platform
MEEP 8 Full
Profile Set
MEEP 8 Minimal Profile Set
â˘âŻ Mandatory core APIs, application model,
application packaging
Target Devices/Use Cases
â˘âŻ Very small devices (low cost/power/size)
â˘âŻ Single-function use cases (e.g. smart
sensor)
Minimum:
â˘âŻ 128 kB RAM
â˘âŻ 1 MB Flash
Recommended:
â˘âŻ 256 kB RAM
â˘âŻ 2 MB Flash
MEEP 8 Standard Profile Set
â˘âŻ Adds support for software services platform
(multi-tasking, application mgmt, shared libs,
events, enhanced security model, etc)
â˘âŻ Optional Packages as per use case
Target Devices/Use Cases
â˘âŻ Mid-range MCU/low-end embedded systems
â˘âŻ Wide range of use cases (e.g. wireless
module, industrial control system, remote
monitoring device, smart network note, etc)
Minimum:
â˘âŻ 512 kB RAM
â˘âŻ 2 MB Flash
Recommended:
â˘âŻ 1 MB RAM
â˘âŻ 3 MB Flash
MEEP 8 Full Profile Set
â˘âŻ All ME 8 functionality and Optional Packages
Target Devices/Use Cases
â˘âŻ High-end MCU or mid-range embedded
systems
â˘âŻ Use cases requiring full software functionality,
footprint not a concern
Minimum:
â˘âŻ 2 MB RAM
â˘âŻ 4 MB Flash
CLDC 8
Optional
Package
Optional
Package
Optional
Package
Application(s)
MEEP 8 Standard
Profile Set
MEEP 8 Minimal
Profile Set
Note:
IMP-NG
Compatible
Profile Set Not
Shown.
Recommended:
1 MB RAM,
2 MB Flash
Optional
JRSs
Optional
APIs
Note:
All footprint
numbers
approximate
and subject
to change
52. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.52
Application or Service
MEEP 8
MEEP 8 Architecture
CLDC
 8
Â
javax.
microedition.
midlet
New in MEEP 8
Updated in MEEP 8
javax.
microedition.
io
(optional)
javax.
microedition.
event
(optional)
javax.
microedition.
key
(optional)
javax.
microedition.
lui
(optional)
javax.
microedition.
media
(optional)
javax.
microedition.
power
(optional)
javax.
microedition.
rms
(optional)
javax.
microedition.
swm
(optional)
javax.
microedition.
cellular
(optional)
Application or Service
Application or Service
53. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.53
Package Description
javax.microedition.midlet The Application and the environment in which the application runs.
javax.microedition.swm [OPTIONAL] Provides extended software management features to MEEP.
javax.microedition.cellular [OPTIONAL] Provides classes to obtain information about cellular networks the
device is registered on.
javax.microedition.event [OPTIONAL] Events for system state changes and application to application
communication.
javax.microedition.power [OPTIONAL] Power management.
javax.microedition.io [OPTIONAL] Networking support based on the Generic Connection Framework
Specification.
javax.microedition.lui [OPTIONAL] Set of features to implement Line-oriented User Interface.
javax.microedition.key [OPTIONAL] Support of embedded device key input.
javax.microedition.media [OPTIONAL] Features for Audio support on embedded Devices.
javax.microedition.rms [OPTIONAL] Mechanism for applications to persistently store data and later retrieve it
MEEP 8 API Packages
54. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.54
MEEP 8 Application Platform
A modern platform to build flexible, modular, and managable software
Component/concept Description
Software provisioning Provision of applications and libraries, and
management of dependencies
Software management Control lifecycle of software components
Application concurrency (MVM) Concurrent execution of multiple apps, in isolation
Inter-application communication (IMC) Exchange data between applications (synchronous)
Events Send/receive events across system (asynchronous)
Service Provider/Consumer pattern Enable shared services and service consumers
Shared Libraries (LIBlets) Share common code across applications
55. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.55
MEEP 8 Application Provisioning & Management
Installation Mgmt
install/update/remove &
resolve dependencies
Lifecycle Mgmt
start/stop/terminate &
prioritize
Provisioning
download, authenticate,
verify
Security Policy Provider
security policy &
permissionsStorage
App-1
App
Mgmt
Agent
Application Management System (AMS)
Authentication Provider
authenticate
App-2
Java Runtime
Uses API
2. Download
3. Authenticate (2)
4. Install
6. Access
7. Provide
8. Control
9. Secure
5. Store
Application
Package
Deployment Infrastructure
â˘âŻ Identity
â˘âŻ Provisioning
â˘âŻ Security Policy
â˘âŻ Management
1. Implement protocol
App Management Agent:
â˘âŻ Privileged application
â˘âŻ Implements deployment-
specific protocol
â˘âŻ Manages local
applications via AMS API
3. Authenticate (1)
Client Device
56. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.56
Shareable Software Components
§ď§âŻ A shareable software component that one or more applications MAY use
at runtime
§ď§âŻ Save static footprint size by enabling multiple application suites to share
the same common code without packaging them redundantly
§ď§âŻ Reduced download times for applications that declare dependencies on
shared components
§ď§âŻ Each shared library exposes a set of classes and resources to
applications for their use just as if those classes and resources were
originally packaged within the application JAR
§ď§âŻ Different implementations of the same API can be can be accessed via
the Service Provider/Consumer pattern
Shared Libraries (LIBlets)
57. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.57
Service Provider/Consumer Pattern
§ď§âŻ Service is a well known set of interfaces/abstract classes;
Service Provider is an implementation of the service
§ď§âŻ Enables consumers to use services by one or more providers
§ď§âŻ Features of the Application Platform Framework
â⯠Ability of apps, shared libraries, or runtime to declare it provides a service (provider)
â⯠Ability of apps or shared libraries declare a dependency on a service (consumer)
â⯠Ability of the AMS to bind a consumer to a provider, and rebind on updates
â⯠Service provider executed in context of consumer (client application)
§ď§âŻ Benefits
â⯠Modular software design, increased reuse, easier updating, reduced
testing, reduced footprint
Based on Java SE ServiceLoader API
58. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.58
MIDletSuite1
MIDletSuite2
How does it work?
Simple example, Service Provider and Consumer are two different apps
MIDlet 2
LIBlet 2
MIDlet 1
59. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.59
How does it work? (cont)
Simple example, Service Provider and Consumer are two different apps
MIDletSuite1
MIDletSuite2
MIDlet 2
LIBlet 2
MIDlet 1
LIBlet2.jar/META-INF/services/com.example.CodecSet
LIBlet2.jar/META-INF/MANIFESTMIDletSuite1.jad
LIBlet-Services: com.example.CodecSet
âŚ
MIDlet-Dependency-1: service; required; com.example.CodecSet
âŚ
com.example.impl.StandardCodecs # Standard codecs
60. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.60
How does it work? (cont)
Simple example, Service Provider and Consumer are two different apps
MIDletSuite1
MIDletSuite2
class StandardCodecs
class MIDlet1
MIDlet 2
LIBlet 2
MIDlet 1
public class StadardCodecs implements CodecSet {
public StadardCodecs() { ⌠}
public Encoder getEncoder(String encodingName) {
return new EncoderImpl(âŚ);
}
}
private static ServiceLoader<CodecSet> codecSetLoader
= ServiceLoader.load(CodecSet.class);
public static Encoder getEncoder(String encodingName) {
for (CodecSet cp : codecSetLoader) {
Encoder enc = cp.getEncoder(encodingName);
if (enc != null)
return enc;
}
return null;
}
Interface CodecSet
public interface CodecSet {
public Encoder getEncoder(String encodingName);
public Decoder getDecoder(String encodingName);
}
61. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.61
MEEP 8 Enhanced Security Model
§ď§âŻâClientsâ and Software Components
â⯠Clients are entities with particular security privileges (similar to users or
application vendors). Specialized clients are possible (e.g. âroot clientâ).
â⯠Software components are associated with clients and inherit their
privileges
â⯠Authentication of clients and software components can be use case-
specific (e.g. specialized authentication scheme)
§ď§âŻSecurity Privileges
â⯠Priviledges are based on clients and expressed as fine-grain permissions
â⯠Authorization (granting of permissions) can be use case-specific (e.g.
networked authorization services)
Flexibility to Support Specialized Security Scenarios
62. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.62
Device I/O API (DIO)
63. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.63
Device I/O API Overview
Java VM
Application
Layer
Application
Environment
CLDC
Example 1
Real-Time Clock Peripheral
Implementation
(High Level Driver)
Example 2
Simple GPIO Pin-
based sensor reader
(low level application)
On-Device I/O
Access Device I/O API
â˘âŻ Generic API to access devices
in a platform-neutral manner
â˘âŻ âLate bindingâ allows addition
of new peripheral types without
changing API
â˘âŻ Enables downstream support
of use case-specific
peripherals (non-real time)
â˘âŻ No native application code
â˘âŻ Also planned for availability on
Java SE
Access Peripheral I/O Hardware directly from Java applications
64. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.64
Device I/O API Features in ME 8
Peripheral Type Description
Peripheral abstraction interface All access to peripherals via PeripheralManager (late binding)
General Purpose Input/Output (GPIO) Access to buttons, switches, LEDs, etc.
Inter-Integrated Circuit Bus (I2C) Access to I2C slaves (sensors, RTC, DAC/ADC, NVRAM, âŚ)
Serial Peripheral Interface Bus (SPI) Access to SPI slaves (audio devices, LCD screens, EEPROM/Flash, âŚ)
Analog/Digital conversion Access to ADC and DAC channels
Universal Asynchronous Receiver/
Transmitter (UART)
Access to UART serial communication and control
Memory-Mapped Input/Output Access to devices with memory-mapped registers and memory blocks
AT Command Interface Access to modems and devices supporting AT commands
Watchdog Watchdog functionality to ensure reliable operation
Pulse counter Access to pulse counter functionality
Pulse Width Modulation (PWM) Access to pulse width modulation output
65. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.65
Conclusion
Call to Action
66. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.66
Conclusion
Aspect Benefit
Modern Embedded
Software Platform
â˘âŻ Java SE alignment enables unified ecosystem for Java Embedded
expertise, reuse, and resources
â˘âŻ Modular software system and enhanced manageability accelerates
time-to-market and extends product value at reduced cost/risk
â˘âŻ Enhanced and more flexible security model allows deployment-
specific security infrastructure
Increased Market Reach â˘âŻ Platform âright-sizingâ allows to address wide range of use cases
and target markets with a single software model, from low-footprint
devices to more powerful systems
Open, based on
standards,
interoperable
â˘âŻ Avoid vendor lock-in
â˘âŻ Participate in and benefit from technology innovation
â˘âŻ Integratable with many industry standards
Java ME 8: The Platform for the Internet of Things
67. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.67
Call To Action
â˘âŻ Java ME Embedded 8 Early Access
Download it and try it out today!
-⯠oracle.com/technetwork/java/embedded/overview/javame/index.html
â˘âŻ Learn more about Java ME 8
â⯠CLDC 8: jcp.org/en/jsr/detail?id=360
â⯠MEEP 8: jcp.org/en/jsr/detail?id=361
â˘âŻ Follow me to keep abreast of Java Embedded
-⯠terrencebarr.wordpress.com
-⯠@terrencebarr
68. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.68
Safe Harbor Statement
The preceding is intended to outline our general product direction. It is intended
for information purposes only, and may not be incorporated into any contract.
It is not a commitment to deliver any material, code, or functionality, and should
not be relied upon in making purchasing decisions. The development, release,
and timing of any features or functionality described for Oracle s products
remains at the sole discretion of Oracle.
69. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.69
Java Micro Edition (ME) 8
Introduction
Terrence Barr
Senior Technologist & Product Manager
Oracle
Sep, 2013
70. Copyright Š 2013, Oracle and/or its affiliates. All rights reserved.70
Graphic Section Divider