SlideShare a Scribd company logo
Building a Reliable 
Remote Communication 
Device with Java ME 8 
JavaOne San Francisco 2014 - CON2285 
Leonardo Lima – V2COM (llima@v2com.mobi, @leomrlima) 
© 2002 - 2014 V2COM - Hardware + Software. All rights reserved
© 2002 - 2014 V2COM - Hardware + Software. All rights reserved 
About Leonardo Lima 
• Software Development Manager at V2COM 
• V2COM representative at the JCP-EC: Java Community 
Process – Executive Committee 
• Spec Lead - JSR 363 – Units of Measurement 
• llima@v2com.mobi and/or @leomrlima
© 2002 - 2014 V2COM - Hardware + Software. All rights reserved 
• V2COM is a leading Latin American 
provider of Smart Grid technologies and 
Advanced Metering Infrastructure (AMI). 
Our offer includes hardware, software 
and services that can reduce losses and 
increase water and energy efficiency, 
currently connecting more than 
1.000.000 devices.
© 2002 - 2014 V2COM - Hardware + Software. All rights reserved 
Agenda 
• The definition of reliable 
• What it means to be a reliable device? 
• Java ME 8 improvements 
• What Java ME 8 brought to the game 
• Java ME 8 applied 
• Improvements, applied 
• More improvements to come 
• New JSRs and room for improvements
The definition of reliable 
What it means to be a reliable device? 
© 2002 - 2014 V2COM - Hardware + Software. All rights reserved
© 2002 - 2014 V2COM - Hardware + Software. All rights reserved 
What does reliable mean? 
• re·li·a·ble (adjective): that may be relied on; dependable in 
achievement, accuracy, honesty, etc. 
• Do not fail! 
• Do not lose data! 
• Do not let others tamper with your data!
© 2002 - 2014 V2COM - Hardware + Software. All rights reserved 
Do not fail! 
• Protected against the environment 
• Protected against hardware failures 
• Protected against software failures 
• Protected against attackers
© 2002 - 2014 V2COM - Hardware + Software. All rights reserved 
Do not lose data! 
• It’s the device mission to ensure the data acquired is safely 
stored in itself. 
• It’s the device mission to ensure that data is safely transferred 
to the backend services.
© 2002 - 2014 V2COM - Hardware + Software. All rights reserved 
Do not let others mess with your data! 
• Take into account all security aspects 
• Authenticity: data you sent is sent from you, really 
• Confidentiality: Only you and the right server sees the data 
• Integrity: data received == data sent
Java ME 8 improvements 
What Java ME 8 brought to the game 
© 2002 - 2014 V2COM - Hardware + Software. All rights reserved
© 2002 - 2014 V2COM - Hardware + Software. All rights reserved 
Improvements 
• Language Improvements (less bugs!) 
• Service Loader pattern 
• Events and Inter-Midlet Communication 
• Device I/O 
• Security Improvements 
• Shared Libraries 
Java SE 8 
Java ME 8 (CLDC 8)
© 2002 - 2014 V2COM - Hardware + Software. All rights reserved 
Shared Libraries (LIBlets) 
• Can be uniquely updated, disabled/enabled. 
• 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
© 2002 - 2014 V2COM - Hardware + Software. All rights reserved 
Service Loader 
• Enables creation of microservices inside your device 
• Independent services that can be uniquely updated, 
disabled/enabled. 
• Monolithic firmware is now split into different services
© 2002 - 2014 V2COM - Hardware + Software. All rights reserved 
Events 
• Object driven communication 
• Publisher/Subscriber pattern 
• One-To-Many communication 
• Asynchronous delivery 
• Caveat: Events are (silently) discarded if there are no 
subscribers
© 2002 - 2014 V2COM - Hardware + Software. All rights reserved 
Inter-MIDlet Communication 
• Raw, bidirectional socket communication 
• Fast and Synchronous! 
• Reliable one-to-one communication 
• You know when the peer is there 
• Just like “localhost” sockets
© 2002 - 2014 V2COM - Hardware + Software. All rights reserved 
Network Security 
• TLS protocol enhancements 
• SecureConnection and SecureServerConnection support TLS 1.2 
• SecureServerConnection provides the server-side of a TLS connection 
• DTLS protocol support for TLS over UDP 
• SecureDatagramConnection provides client-side support for DTLS
© 2002 - 2014 V2COM - Hardware + Software. All rights reserved 
Application Provisioning & Management 
• Application Management System (AMS) allows fine grained 
control on what get installed 
• App Management Agent manages local applications via the 
AMS api
© 2002 - 2014 V2COM - Hardware + Software. All rights reserved 
Device I/O 
• Unified, object-oriented way to interact with I/O 
• Basic I/Os already mapped 
• I2C, GPIO, SPI, UART, ADC, Watchdog, PWM, Pulse Counter 
• Architecture is ready for extension with generic AbstractDevice, 
DeviceProvider
© 2002 - 2014 V2COM - Hardware + Software. All rights reserved 
Language improvements 
• Improved collections 
• Generics 
• Autoboxing 
• Static imports 
• Enumerations 
• Try with resources 
• Better byte and string manipulation 
• Events 
• Logging
© 2002 - 2014 V2COM - Hardware + Software. All rights reserved 
Java ME 8 applied 
Improvements, applied to our use cases
© 2002 - 2014 V2COM - Hardware + Software. All rights reserved 
Before… 
• We had 3 big blocks of code, merged as one on deploy 
• Hardcore for hardware abstraction 
• Zion for commons infrastructure and AT 
• App for application logic 
• One big file to manage (OTAP) 
• Java 1.3 language… 
• Did I mean Latin?
© 2002 - 2014 V2COM - Hardware + Software. All rights reserved 
… and now 
• Multiple services and libraries 
• Instead of big libraries 
• Less boilerplate code 
• Enum, foreach, try with resources makes it less verbose, more agile 
• Less ancient code 
• Easier for “desktop developers” to understand and join the fun 
• Less “made in home” code 
• Many pieces are now already in the platform, like Device I/O, Events, 
Logging 
• Less code for us to mantain
© 2002 - 2014 V2COM - Hardware + Software. All rights reserved 
Shared Libraries 
Crypto / Hashes 
Queues 
Concurrency 
Advanced String 
& Byte 
Manipulation 
Advanced Math Device protocols 
Units and 
Measurements 
Event and Bus
© 2002 - 2014 V2COM - Hardware + Software. All rights reserved 
Services 
(Safe) Storage 
Data acquisition 
(Application) 
Black Box Logging 
Remote transfer 
External Sensor 
Power 
management 
WAN 
Management 
Watchdogs 
System 
Configuration 
Firmware Update 
Management 
Resource 
Management
More improvements to 
come 
New JSRs and room for improvements 
© 2002 - 2014 V2COM - Hardware + Software. All rights reserved
© 2002 - 2014 V2COM - Hardware + Software. All rights reserved 
JSR 363 – Units of Measurement 
• JSR to beter type data that we acquire, targeting ME 8 
• https://java.net/projects/unitsofmeasurement 
import javax.measure.quantity.*; 
public class TemperatureRecord { 
private Time timestamp; 
private Temperature temperature; 
private String sensor; 
...getters, setters... 
}
© 2002 - 2014 V2COM - Hardware + Software. All rights reserved 
JSR 363 – Units of Measurement in JDK 
• Otávio Santana (SouJava, OpenJDK) is actively working in a 
SE 8 port of the JSR! 
• Streams, Lambda, High precision (BigDecimal): guaranteed! 
• Reducers, sorters, summation, group and filters. 
List<Quantity<Time>> sortNaturalList = times 
.stream() 
.sorted(QuantityFunctions.sortNaturalDesc()) 
.collect(Collectors.toList());
© 2002 - 2014 V2COM - Hardware + Software. All rights reserved 
Room for improvement 
• Configuration 
• Concurrency utilities 
• Standard protocols (MQTT, CoAP, JSON, HTTP, REST)
© 2002 - 2014 V2COM - Hardware + Software. All rights reserved 
Q?
© 2002 - 2014 V2COM - Hardware + Software. All rights reserved 
Thanks! 
llima@v2com.mobi 
@leomrlima 
www.v2com.mobi

More Related Content

PPTX
M240 reader-bundle for environmental monitoring in IT / Network Closets.
PDF
Unizen Smart Automation Brochure-2015
PPT
E Snet Raf Essc Jan2005
PPT
PDF
WebGoat.SDWAN.Net in Depth: SD-WAN Security Assessment
PDF
Esc who we are 2016 rev2
PPTX
gkkSecurity essentials domain 2
PDF
CNIT 125 Ch 5 Communication & Network Security (part 2 of 2)
M240 reader-bundle for environmental monitoring in IT / Network Closets.
Unizen Smart Automation Brochure-2015
E Snet Raf Essc Jan2005
WebGoat.SDWAN.Net in Depth: SD-WAN Security Assessment
Esc who we are 2016 rev2
gkkSecurity essentials domain 2
CNIT 125 Ch 5 Communication & Network Security (part 2 of 2)

What's hot (20)

PDF
CNIT 141 13. TLS
PDF
2012 ah vegas wlan design for high density
PPTX
Cloud Architecture
PDF
Airheads dallas 2011 wireless security
PDF
2012 ah vegas wlan security fundamentals
PDF
Airheads vail 2011 air wave overview
PPTX
Recon: Hopeless relay protection for substation automation
PDF
2012 ah vegas guest access fundamentals
PDF
CISSP Prep: Ch 5. Communication and Network Security (Part 2)
PPTX
Access Management with Aruba ClearPass #AirheadsConf Italy
PPTX
Don't Architect a Real-Time System that Can't Scale
PPTX
PLNOG15: Simplifying network deployment using Autonomic networking and Plug-a...
PPTX
Tech 2 tech low latency networking on Janet presentation
PPTX
Bluetooth technology introduction and ecosystem
PPTX
ThinManager - IRT Forum 2021
PPTX
CISSP - Chapter 3 - Cryptography
PDF
Aruba wireless and clear pass 6 integration guide v1 1.3
PDF
Bb push sapra
PDF
CNIT 123 12: Cryptography
CNIT 141 13. TLS
2012 ah vegas wlan design for high density
Cloud Architecture
Airheads dallas 2011 wireless security
2012 ah vegas wlan security fundamentals
Airheads vail 2011 air wave overview
Recon: Hopeless relay protection for substation automation
2012 ah vegas guest access fundamentals
CISSP Prep: Ch 5. Communication and Network Security (Part 2)
Access Management with Aruba ClearPass #AirheadsConf Italy
Don't Architect a Real-Time System that Can't Scale
PLNOG15: Simplifying network deployment using Autonomic networking and Plug-a...
Tech 2 tech low latency networking on Janet presentation
Bluetooth technology introduction and ecosystem
ThinManager - IRT Forum 2021
CISSP - Chapter 3 - Cryptography
Aruba wireless and clear pass 6 integration guide v1 1.3
Bb push sapra
CNIT 123 12: Cryptography
Ad

Similar to Building a Reliable Remote Communication Device with Java ME8 [CON2285] (20)

PDF
T2: What the Second Generation Holds
PDF
Introducing the Sun SPOTs
PDF
"JavaME + Android in action" CCT-CEJUG Dezembro 2008
PDF
Programming IoT Gateways with macchina.io
PPT
A Taste of Java ME
PPTX
Java Modularity with OSGi
DOC
City search documentation
PDF
Beginning Java Me Platform 1st Edition Ray Rischpater
PDF
Land vehicle tracking system using java on android platform
PPTX
PDF
Introducing J2ME Polish
PPT
Android intro
DOCX
Open source and_latest_development_in_ict
PDF
Open source building blocks for the Internet of Things - Jfokus 2013
PDF
City search documentation
ODP
Java ME Open Source
PPT
6 Months Industrial Training in Android
PDF
Android
T2: What the Second Generation Holds
Introducing the Sun SPOTs
"JavaME + Android in action" CCT-CEJUG Dezembro 2008
Programming IoT Gateways with macchina.io
A Taste of Java ME
Java Modularity with OSGi
City search documentation
Beginning Java Me Platform 1st Edition Ray Rischpater
Land vehicle tracking system using java on android platform
Introducing J2ME Polish
Android intro
Open source and_latest_development_in_ict
Open source building blocks for the Internet of Things - Jfokus 2013
City search documentation
Java ME Open Source
6 Months Industrial Training in Android
Android
Ad

More from Leonardo De Moura Rocha Lima (12)

PPTX
Top 9 mistakes to avoid when developing with NoSQL
PDF
JavaOne 2017 - JNoSQL: The Definitive Solution for Java and NoSQL Database [C...
PDF
JavaOne 2017 - Collections.compare:JDK, Eclipse, Guava, Apache... [CON1754]
PDF
JavaOne 2017 - Choosing a NoSQL API and Database to Avoid Tombstones and Drag...
PPTX
Collections.compare(JDK, Eclipse, Guava, Apache...);
PPTX
JSR363 - Devoxx US
PPTX
IoT Security: Cases and Methods
PPTX
The First IoT JSR: Units of Measurement JSR-363 [BOF5981]
PPTX
Using Java and Standards for Fast IoT Development [CON5513]
PPTX
IoT Security: Cases and Methods [CON5446]
PPTX
Secure IoT with Blockchain: Fad or Reality? [BOF5490]
PDF
A internet das coisas e o futuro - Java ME 8 e adiante!
Top 9 mistakes to avoid when developing with NoSQL
JavaOne 2017 - JNoSQL: The Definitive Solution for Java and NoSQL Database [C...
JavaOne 2017 - Collections.compare:JDK, Eclipse, Guava, Apache... [CON1754]
JavaOne 2017 - Choosing a NoSQL API and Database to Avoid Tombstones and Drag...
Collections.compare(JDK, Eclipse, Guava, Apache...);
JSR363 - Devoxx US
IoT Security: Cases and Methods
The First IoT JSR: Units of Measurement JSR-363 [BOF5981]
Using Java and Standards for Fast IoT Development [CON5513]
IoT Security: Cases and Methods [CON5446]
Secure IoT with Blockchain: Fad or Reality? [BOF5490]
A internet das coisas e o futuro - Java ME 8 e adiante!

Recently uploaded (20)

PPT
Teaching material agriculture food technology
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Machine Learning_overview_presentation.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
Teaching material agriculture food technology
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Network Security Unit 5.pdf for BCA BBA.
The AUB Centre for AI in Media Proposal.docx
Machine Learning_overview_presentation.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
20250228 LYD VKU AI Blended-Learning.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
sap open course for s4hana steps from ECC to s4
Digital-Transformation-Roadmap-for-Companies.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Unlocking AI with Model Context Protocol (MCP)
Building Integrated photovoltaic BIPV_UPV.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
MIND Revenue Release Quarter 2 2025 Press Release
Per capita expenditure prediction using model stacking based on satellite ima...

Building a Reliable Remote Communication Device with Java ME8 [CON2285]

  • 1. Building a Reliable Remote Communication Device with Java ME 8 JavaOne San Francisco 2014 - CON2285 Leonardo Lima – V2COM (llima@v2com.mobi, @leomrlima) © 2002 - 2014 V2COM - Hardware + Software. All rights reserved
  • 2. © 2002 - 2014 V2COM - Hardware + Software. All rights reserved About Leonardo Lima • Software Development Manager at V2COM • V2COM representative at the JCP-EC: Java Community Process – Executive Committee • Spec Lead - JSR 363 – Units of Measurement • llima@v2com.mobi and/or @leomrlima
  • 3. © 2002 - 2014 V2COM - Hardware + Software. All rights reserved • V2COM is a leading Latin American provider of Smart Grid technologies and Advanced Metering Infrastructure (AMI). Our offer includes hardware, software and services that can reduce losses and increase water and energy efficiency, currently connecting more than 1.000.000 devices.
  • 4. © 2002 - 2014 V2COM - Hardware + Software. All rights reserved Agenda • The definition of reliable • What it means to be a reliable device? • Java ME 8 improvements • What Java ME 8 brought to the game • Java ME 8 applied • Improvements, applied • More improvements to come • New JSRs and room for improvements
  • 5. The definition of reliable What it means to be a reliable device? © 2002 - 2014 V2COM - Hardware + Software. All rights reserved
  • 6. © 2002 - 2014 V2COM - Hardware + Software. All rights reserved What does reliable mean? • re·li·a·ble (adjective): that may be relied on; dependable in achievement, accuracy, honesty, etc. • Do not fail! • Do not lose data! • Do not let others tamper with your data!
  • 7. © 2002 - 2014 V2COM - Hardware + Software. All rights reserved Do not fail! • Protected against the environment • Protected against hardware failures • Protected against software failures • Protected against attackers
  • 8. © 2002 - 2014 V2COM - Hardware + Software. All rights reserved Do not lose data! • It’s the device mission to ensure the data acquired is safely stored in itself. • It’s the device mission to ensure that data is safely transferred to the backend services.
  • 9. © 2002 - 2014 V2COM - Hardware + Software. All rights reserved Do not let others mess with your data! • Take into account all security aspects • Authenticity: data you sent is sent from you, really • Confidentiality: Only you and the right server sees the data • Integrity: data received == data sent
  • 10. Java ME 8 improvements What Java ME 8 brought to the game © 2002 - 2014 V2COM - Hardware + Software. All rights reserved
  • 11. © 2002 - 2014 V2COM - Hardware + Software. All rights reserved Improvements • Language Improvements (less bugs!) • Service Loader pattern • Events and Inter-Midlet Communication • Device I/O • Security Improvements • Shared Libraries Java SE 8 Java ME 8 (CLDC 8)
  • 12. © 2002 - 2014 V2COM - Hardware + Software. All rights reserved Shared Libraries (LIBlets) • Can be uniquely updated, disabled/enabled. • 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
  • 13. © 2002 - 2014 V2COM - Hardware + Software. All rights reserved Service Loader • Enables creation of microservices inside your device • Independent services that can be uniquely updated, disabled/enabled. • Monolithic firmware is now split into different services
  • 14. © 2002 - 2014 V2COM - Hardware + Software. All rights reserved Events • Object driven communication • Publisher/Subscriber pattern • One-To-Many communication • Asynchronous delivery • Caveat: Events are (silently) discarded if there are no subscribers
  • 15. © 2002 - 2014 V2COM - Hardware + Software. All rights reserved Inter-MIDlet Communication • Raw, bidirectional socket communication • Fast and Synchronous! • Reliable one-to-one communication • You know when the peer is there • Just like “localhost” sockets
  • 16. © 2002 - 2014 V2COM - Hardware + Software. All rights reserved Network Security • TLS protocol enhancements • SecureConnection and SecureServerConnection support TLS 1.2 • SecureServerConnection provides the server-side of a TLS connection • DTLS protocol support for TLS over UDP • SecureDatagramConnection provides client-side support for DTLS
  • 17. © 2002 - 2014 V2COM - Hardware + Software. All rights reserved Application Provisioning & Management • Application Management System (AMS) allows fine grained control on what get installed • App Management Agent manages local applications via the AMS api
  • 18. © 2002 - 2014 V2COM - Hardware + Software. All rights reserved Device I/O • Unified, object-oriented way to interact with I/O • Basic I/Os already mapped • I2C, GPIO, SPI, UART, ADC, Watchdog, PWM, Pulse Counter • Architecture is ready for extension with generic AbstractDevice, DeviceProvider
  • 19. © 2002 - 2014 V2COM - Hardware + Software. All rights reserved Language improvements • Improved collections • Generics • Autoboxing • Static imports • Enumerations • Try with resources • Better byte and string manipulation • Events • Logging
  • 20. © 2002 - 2014 V2COM - Hardware + Software. All rights reserved Java ME 8 applied Improvements, applied to our use cases
  • 21. © 2002 - 2014 V2COM - Hardware + Software. All rights reserved Before… • We had 3 big blocks of code, merged as one on deploy • Hardcore for hardware abstraction • Zion for commons infrastructure and AT • App for application logic • One big file to manage (OTAP) • Java 1.3 language… • Did I mean Latin?
  • 22. © 2002 - 2014 V2COM - Hardware + Software. All rights reserved … and now • Multiple services and libraries • Instead of big libraries • Less boilerplate code • Enum, foreach, try with resources makes it less verbose, more agile • Less ancient code • Easier for “desktop developers” to understand and join the fun • Less “made in home” code • Many pieces are now already in the platform, like Device I/O, Events, Logging • Less code for us to mantain
  • 23. © 2002 - 2014 V2COM - Hardware + Software. All rights reserved Shared Libraries Crypto / Hashes Queues Concurrency Advanced String & Byte Manipulation Advanced Math Device protocols Units and Measurements Event and Bus
  • 24. © 2002 - 2014 V2COM - Hardware + Software. All rights reserved Services (Safe) Storage Data acquisition (Application) Black Box Logging Remote transfer External Sensor Power management WAN Management Watchdogs System Configuration Firmware Update Management Resource Management
  • 25. More improvements to come New JSRs and room for improvements © 2002 - 2014 V2COM - Hardware + Software. All rights reserved
  • 26. © 2002 - 2014 V2COM - Hardware + Software. All rights reserved JSR 363 – Units of Measurement • JSR to beter type data that we acquire, targeting ME 8 • https://java.net/projects/unitsofmeasurement import javax.measure.quantity.*; public class TemperatureRecord { private Time timestamp; private Temperature temperature; private String sensor; ...getters, setters... }
  • 27. © 2002 - 2014 V2COM - Hardware + Software. All rights reserved JSR 363 – Units of Measurement in JDK • Otávio Santana (SouJava, OpenJDK) is actively working in a SE 8 port of the JSR! • Streams, Lambda, High precision (BigDecimal): guaranteed! • Reducers, sorters, summation, group and filters. List<Quantity<Time>> sortNaturalList = times .stream() .sorted(QuantityFunctions.sortNaturalDesc()) .collect(Collectors.toList());
  • 28. © 2002 - 2014 V2COM - Hardware + Software. All rights reserved Room for improvement • Configuration • Concurrency utilities • Standard protocols (MQTT, CoAP, JSON, HTTP, REST)
  • 29. © 2002 - 2014 V2COM - Hardware + Software. All rights reserved Q?
  • 30. © 2002 - 2014 V2COM - Hardware + Software. All rights reserved Thanks! llima@v2com.mobi @leomrlima www.v2com.mobi