SlideShare a Scribd company logo
1 of 67
Download to read offline
1
Pushing 
Java 
EE 
outside 
of 
the 
Enterprise 
Home 
Automation 
David 
Delabassee 
-­‐ 
@delabassee 
Software 
Evangelist 
– 
Java 
EE 
Oracle 
September, 
2014 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
2
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. 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
3
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Program 
Agenda 
Home 
Automation 
Java 
EE 
Demo 
Wrap-­‐up 
1 
2 
3 
4 
4
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Program 
Agenda 
Home 
Automation 
Java 
EE 
Demo 
Wrap-­‐up 
1 
2 
3 
4 
5
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Home 
Automation 
• “Devices” 
control 
- Lights, 
windows, 
blinders, 
audio, 
doors, 
wall-­‐plugs, 
heating, 
etc. 
- From 
different 
“terminal” 
• Monitoring 
& 
dashboard 
- Power 
consumption, 
weather, 
motion/presence, 
intrusion, 
etc. 
• Scenario, 
scene, 
scheduling 
& 
automation 
• “Flexible” 
configuration 
Features 
6
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Home 
Automation 
Benefits 
• Better 
control 
• Improves 
day-­‐to-­‐day 
life 
• Improves 
security 
• More 
Eco 
friendly 
• … 
7
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Home 
Automation 
Market 
• Crowded 
space 
• Just 
the 
beginning! 
• IoT 
8
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Home 
Automation 
Technologies 
• X10 
/ 
PCLBUS 
• RF433 
• EnOcean 
• Z-­‐Wave 
• ZigBee 
• Domologic 
9 
• Domintell 
• NikoBus 
/ 
HomeControl 
• Chacon 
/ 
DI-­‐O 
• Somfy 
RTS 
• io-­‐homecontrol 
• VelBus 
• Domologic 
• KNX 
• BLE 
• HomeKit 
• Thread 
• …
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Home 
Automation 
• Sensors 
- Switches, 
motion, 
temperature, 
CO2, 
humidity, 
wind 
speed, 
etc. 
• Actuators 
- Lights, 
blinders, 
windows, 
doors, 
audio, 
wall-­‐plugs, 
etc. 
• Network 
- Wired 
or/and 
wireless 
+ 
TCP/IP 
• Hub, 
box, 
gateway 
- Provides 
added 
values 
Actors 
10
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Z-­‐Wave 
“Z-­‐Wave, 
The 
Interoperable 
Standard” 
• “Interoperable 
wireless 
RF-­‐based 
communications 
technology 
designed 
for 
control, 
monitoring 
and 
status 
reading 
applications 
in 
residential 
and 
light 
commercial 
environments.” 
• Proprietary 
• Z-­‐Wave 
Alliance 
- Consortium 
of 
250 
manufacturers 
and 
service 
providers 
worldwide 
! 
http://www.z-­‐wavealliance.org 
11
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Z-­‐Wave 
“Z-­‐Wave, 
The 
Interoperable 
Standard” 
• Meshed 
wireless 
network 
• Range 
100 
ft 
(open-­‐sight) 
• 232 
modules 
per 
controller 
• Cheap 
and 
simple 
12
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Connectivity 
• Physical 
connectivity 
- Razberry-­‐Pi 
Daughter 
Card 
- Aeon 
Labs 
Z-­‐Stick, 
… 
• Middleware 
- OpenZwave 
- RaZberry 
/ 
Z-­‐Wave-­‐me 
/ 
Z-­‐Way 
- Domoticz, 
… 
13
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Principles 
14 
Switch Z-­‐Wave 
Chip 
1 
1 
Z-­‐Wave 
Midd. App. 
Set(0) 
Set(0) Set(0) 
Get() 
Get() 
1 
(inv.) 
0 
(valid.) 0
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
In 
real 
life 
15
“The 
worldwide 
STANDARD 
for 
home 
and 
building 
control” 
- 40,189 
KNX 
Partners 
in 
125 
countries 
- 100 
Scientific 
Partners 
in 
28 
countries 
- 13 
User 
clubs 
in 
12 
countries 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
KNX 
• ISO/IEC 
14543-­‐3 
• KNX 
Association 
- 340 
KNX 
Members 
in 
37 
countries 
- 40 
KNX 
National 
Groups 
- 275 
Training 
Centres 
in 
51 
countries 
! 
http://www.knx.org 
16
“The 
worldwide 
STANDARD 
for 
home 
and 
building 
control” 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
KNX 
• Media 
- TP, 
PL, 
RF 
and 
IP 
• Engineering 
Tool 
Software 
- Manufacturer 
independent 
configuration 
software 
tool 
- Design 
and 
configure 
intelligent 
home 
and 
building 
KNX 
installations 
17
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Connectivity 
• Physical 
connectivity 
- KNX/USB 
Router 
- KNX/IP 
Router 
- Eelectron 
Raspberry 
Pi 
KNX 
interface 
18
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Calimero 
• Java 
library 
for 
KNX/EIB 
applications 
- KNX 
Network 
services 
and 
data 
encodings 
- Routing 
- Local 
device 
management 
- Datapoint 
type 
and 
property 
type 
translation 
- ETS4 
import, 
… 
• Min 
Java 
2 
Micro-­‐Edition 
CDC 
Foundation 
Profile 
• http://calimero.sourceforge.net 
19
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Config 
only Optional 
Principles 
KNX 
Bus 
Bus 
Power 
Supply 
IP 
KNX 
KNX 
Output 
module 
KNX 
Input 
module 
ETS 
IP 
Controller 
Gateway 
… 
110/220v 
20
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
In 
real 
life 
21
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Z-­‐Wave 
Vs. 
KNX 
• Proprietary 
• 232 
devices 
per 
controller 
• Residential 
grade 
• Wireless, 
more 
sensible 
• Powered 
via 
batteries 
and 
PL 
• Controller 
is 
the 
Single 
PoF 
• Simple, 
non 
intrusive 
• Cheap 
• ISO 
Standard 
• Up 
to 
58.000 
bus 
devices 
• Industrial, 
professional 
grade 
• Wired, 
more 
reliable 
• Powered 
through 
the 
Bus 
• No 
real 
PoF 
• Complex, 
intrusive 
• Expensive 
22
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Program 
Agenda 
Home 
Automation 
Java 
EE 
Demo 
Wrap-­‐up 
1 
2 
3 
4 
23
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Java 
EE 
ENTERPRISE 
EDITION 
▪Batch 
▪Concurrency 
▪Simplified JMS 
DEVELOPER 
PRODUCTIVITY 
▪More annotated POJOs 
▪Less boilerplate code 
▪Cohesive integrated platform 
▪WebSockets 
▪JSON 
▪Servlet 3.1 NIO 
▪REST 
MEETING 
ENTERPRISE 
DEMANDS 
Java EE 7 
24
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Java 
EE 
ENTERPRISE 
EDITION 
Java EE 
25 
• Connectivity 
- EE 
to 
clients 
- EE 
to 
HA 
• Events
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
JSON-­‐P 
• API 
to 
parse 
and 
generate 
JSON 
• Streaming 
API 
(javax.json.stream) 
- Low-­‐level, 
efficient 
way 
to 
parse/generate 
JSON 
- Similar 
to 
StAX 
API 
in 
XML 
world 
• Object 
model 
API 
(javax.json) 
- Simple, 
easy 
to 
use 
high-­‐level 
API 
- Similar 
to 
DOM 
API 
in 
XML 
world 
JSR 
353 
26
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
public 
class 
Notification 
{ 
! 
// 
bunch 
of 
Getters 
& 
Setters 
! 
public 
String 
toJson() 
{ 
JsonObject 
model 
= 
Json.createObjectBuilder() 
.add("source", 
getSource()) 
.add("target", 
getTarget()) 
.add("val", 
getValue()) 
.add("type", 
getType()) 
.add("medium", 
getMedium()) 
.add("cyclic", 
isCyclic()) 
.add("time", 
getTimestamp()) 
.build(); 
return 
model; 
} 
27 
JSON-­‐P
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Java 
API 
for 
Web 
Socket 
• Bidirectional 
full-­‐duplex 
messaging 
- Initial 
HTTP 
handshake 
- Over 
a 
single 
TCP 
connection 
• IETF 
defined 
protocol: 
RFC 
6455 
• HTML5 
/ 
W3C 
defined 
JavaScript 
API 
• JSR 
356 
- Client 
& 
Server 
API 
JSR 
356 
28
WebSocket 
Server 
Endpoint 
(1/2) 
@ServerEndpoint("/wsEndPt") 
public 
class 
InboundWebsocket 
implements 
Serializable 
{ 
! 
static 
Queue<Session> 
queue 
= 
new 
ConcurrentLinkedQueue<>(); 
@OnOpen 
public 
void 
openConnection(Session 
session) 
{ 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
queue.add(session); 
} 
! 
public 
void 
onEvent(Notification 
notif) 
{ 
sendAllEndpoints(notif.toJson()); 
} 
! 
… 
29
WebSocket 
Server 
Endpoint 
(2/2) 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
! 
… 
public 
static 
synchronized 
void 
sendAllEndpoints(String 
payload) 
{ 
try 
{ 
for 
(Session 
session 
: 
queue) 
{ 
if 
(session.isOpen()) 
{ 
session.getBasicRemote().sendText(payload); 
} 
} 
} 
catch 
(IOException 
e) 
{ 
// 
Oooops 
} 
} 
30
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
WebSocket 
Client 
Endpoint 
function 
connect() 
{ 
wsocket 
= 
new 
WebSocket('ws://' 
+ 
window.location.host 
+ 
'/dashboard/wsEndPt'); 
wsocket.onmessage 
= 
onMessage; 
} 
! 
function 
onMessage(evt) 
{ 
jsonData 
= 
JSON.parse(evt.data); 
targetDiv 
= 
jsonData.target; 
var 
myDiv 
= 
document.getElementById(targetDiv); 
! 
if 
(jsonData.type 
=== 
"switch") 
{ 
if 
(jsonData.val 
=== 
"true") 
value 
= 
"ON"; 
else 
value 
= 
"OFF"; 
} 
else 
value 
= 
jsonData.val; 
$(myDiv).text(value); 
} 
31
Contexts 
and 
Dependency 
Injection 
for 
Java 
EE 
1.1 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
JSR 
346 
• Core 
component 
model 
- Enabled 
by 
default 
in 
implicit 
bean 
archives 
• Expanded 
use 
of 
CDI 
Interceptors 
- Transactional 
interceptors 
- Method-­‐level 
validation 
interceptors 
• New 
CDI 
scopes 
- @TransactionScoped 
- @FlowScoped 
32
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
CDI 
Events 
• Observer 
Design 
Pattern 
• Defined 
by 
- A 
java 
object 
(the 
event 
object) 
- Event 
Qualifier(s) 
JSR 
346 
33
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
CDI 
Events 
JSR 
346 
34 
!public 
class 
producerClass 
{ 
! 
@Inject 
Event<SomeEvent> 
someEvent; 
public 
void 
someMethod(...) 
{ 
... 
someEvent.fire(myEvent); 
} 
} 
!public 
class 
anotherClass 
{ 
public 
void 
someObserver(@Observes 
SomeEvent 
someEvent 
) 
{ 
... 
! 
} 
}
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 35 
CDI 
Events 
MDB 
! 
@MessageDriven( 
… 
) 
public 
class 
KnxMdb 
implements 
KnxListener 
{ 
! 
@Inject 
@HomeEvent 
Event<Notification> 
homeEvent; 
! 
@KnxMessage(type="sensor") 
public 
void 
handleKnxSensor(Notification 
notif) 
{ 
… 
homeEvent.fire(notif); 
} 
! 
}
CDI 
Events 
@ServerEndpoint("/wsEndPt") 
public 
class 
InboundWebsocket 
implements 
Serializable 
{ 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
!! 
@Inject 
@HomeEvent 
Event<Notification> 
homeEvent; 
! 
@OnOpen 
public 
void 
openConnection(Session 
session) 
{ 
… 
} 
! 
public 
void 
onEvent(@Observes 
@HomeEvent 
Notification 
notif) 
{ 
sendAllEndpoints(notif.toJson()); 
} 
… 
36 
WebSocker 
Server 
Endpoint
Java 
API 
for 
RESTful 
Web 
Services 
2.0 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
• Filters 
and 
Interceptors 
• Asynchronous 
Processing 
• Hypermedia 
• Validation 
• Client 
API 
JSR 
339 
37
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
JAX-­‐RS 
Client 
!! 
private 
void 
zwaveCommand(String 
url, 
String 
node, 
boolean 
val) 
{ 
//http://host/ZWaveAPI/Run/devices[3].instances[0].commandClasses[0x25].Set(false) 
! 
String 
zwaveUrl 
= 
url 
+ 
node 
+ 
".Set(" 
+ 
val 
+ 
")"; 
! 
private 
final 
Client 
jaxrsClient 
= 
ClientBuilder.newClient(); 
! 
String 
zwaveResp 
= 
jaxrsClient.target(zwaveUrl) 
.request(MediaType.TEXT_PLAIN_TYPE) 
.get(String.class); 
} 
38
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
REST 
Endpoint 
! 
@Path("/zwave") 
public 
class 
ZwaveEndpoint 
{ 
@Inject 
@HomeEvent 
Event<Notification> 
homeEvent; 
! 
@PUT 
@Path("/{id}/{val}/") 
@Produces("text/plain") 
public 
String 
swithZ(@PathParam("id") 
String 
id, 
@PathParam("val") 
String 
val) 
{ 
Notification 
notif 
= 
new 
Notification(id, 
"switch" 
, 
val, 
"ZWAVE"); 
notif.setTarget(id); 
// 
target 
is 
required 
to 
identify 
the 
Zwave 
device 
notif.setValue(val); 
homeEvent.fire(notif); 
} 
! 
} 
39
Java 
Connector 
Architecture 
1.7 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
• Resource 
Adapter 
- JCA 
component 
for 
a 
specific 
EIS 
- Mediates 
communication 
between 
the 
container 
and 
the 
EIS 
by 
means 
of 
contracts 
- Packaged 
as 
a 
RAR 
• EIS 
- Packaged 
Applications, 
ERP, 
CICS, 
mail 
server, 
MoM, 
etc. 
• Contracts 
- Lifecycle, 
Connection 
(inc. 
pooling), 
TX, 
Work 
Management, 
CCI, 
… 
40 
JSR 
322
Java 
Connector 
Architecture 
1.7 
Outbound 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
41 
JSR 
322 
Java 
EE 
Container 
Java 
EE 
Application 
Resource 
Adapter EIS 
Inbound
Java 
Connector 
Architecture 
1.7 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
42 
JSR 
322 
Java 
EE 
Container 
Java 
EE 
Application 
Resource 
Adapter EIS 
MDB Inbound
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Message 
Driven 
Bean 
@MessageDriven 
( 
activationConfig 
= 
{ 
@ActivationConfigProperty( 
propertyName="destinationLookup", 
propertyValue="…"), 
@ActivationConfigProperty( 
propertyName="destinationType", 
propertyValue="javax.jms.Queue") 
} 
) 
! 
public 
class 
MyJmsMdb 
implements 
MessageListener 
{ 
@Override 
public 
void 
onMessage(Message 
message) 
{ 
//do 
the 
work 
} 
! 
} 
43 
JMS
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Message 
Driven 
Bean 
44 
• “A 
MDB 
is 
an 
asynchronous 
message 
consumer…” 
• “A 
MDB 
is 
invoked 
by 
the 
container 
as 
a 
result 
of 
the 
arrival 
of 
a 
message 
at 
the 
destination 
or 
endpoint 
that 
is 
serviced 
by 
the 
MDB…” 
• “MDB 
listen 
to 
an 
Inbound 
Ressource 
Adapter” 
- Eg. 
JMS
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 45 
Message 
Driven 
Bean 
KNX 
@MessageDriven( 
activationConfig 
= 
{ 
@ActivationConfigProperty( 
propertyName 
= 
“knx", 
propertyValue 
= 
"10.0.0.60") 
} 
) 
! 
public 
class 
KnxMdb 
implements 
KnxListener 
{ 
! 
@Override 
public 
void 
onMessage(Message 
message) 
{ 
//handle 
the 
KNX 
Message 
} 
! 
}
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 46 
Message 
Driven 
Bean 
KNX 
@MessageDriven( 
activationConfig 
= 
{ 
@ActivationConfigProperty( 
propertyName 
= 
“knx", 
propertyValue 
= 
"10.0.0.60") 
} 
) 
! 
!public 
class 
KnxMdb 
implements 
KnxListener 
{ 
@KnxMessage(type="sensor") 
public 
void 
handleKnxSensor(Notification 
notif) 
{ 
… 
} 
@KnxMessage(type=“switch") 
public 
void 
switchKnx(Notification 
notif) 
{ 
… 
} 
! 
}
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Inbound 
RA 
• public 
interface 
KnxListener 
{ 
} 
- Will 
be 
implemented 
by 
the 
MDB 
• public 
class 
KnxResourceAdapter 
implements 
ResourceAdapter 
{…} 
- Do 
the 
actual 
work, 
without 
real 
constraints 
(e.g. 
threads) 
- Handle 
MDB 
activation 
- Will 
listen 
on 
the 
KNX 
bus 
via 
WorkManager 
• public 
class 
KnxActivationSpec 
implements 
ActivationSpec 
{…} 
- Expose 
RA 
configuration 
to 
the 
application 
!! 
47
Inbound 
RA 
@Override 
public 
void 
endpointActivation(MessageEndpointFactory 
endpointFactory, 
ActivationSpec 
spec) 
throws 
ResourceException 
{ 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
tSpec 
= 
(TrafficActivationSpec) 
spec; 
Class 
endpointClass 
= 
endpointFactory.getEndpointClass(); 
tSpec.setBeanClass(endpointClass); 
tSpec.findCommandsInMDB(); 
ObtainEndpointWork 
work 
= 
new 
ObtainEndpointWork(this, 
endpointFactory); 
workManager.scheduleWork(work); 
} 
48
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Inbound 
RA 
public 
void 
findCommandsInMDB() 
{ 
! 
for 
(Method 
method 
: 
beanClass.getMethods()) 
{ 
if 
(method.isAnnotationPresent(KnxMessage.class)) 
{ 
KnxMessage 
tCommand 
= 
method.getAnnotation(KnxMessage.class); 
commands.put(tCommand.type(), 
method); 
} 
} 
… 
} 
49
KNX 
(real) 
Listener 
// 
KNX 
ProcessedEvent 
from 
the 
Calimero 
stack 
switch 
(actor) 
{ 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
case 
"0/7/4": 
messageType 
= 
"sensor"; 
notif.setType("humidity"); 
processedEvent 
= 
Float.toString(knxSensorHumidity(pe)); 
notif.setValue(processedEvent); 
// 
and 
so 
on… 
break; 
} 
! 
if 
(spec.getCommands().containsKey(messageType)) 
{ 
// 
Does 
the 
MDB 
support 
this 
message? 
Method 
mdbMethod 
= 
spec.getCommands().get(messageType); 
try 
{ 
callMdb(mdb, 
mdbMethod, 
notif); 
} 
catch 
(ResourceException 
ex) 
{ 
// 
Ooops! 
} 
} 
else 
{ 
// 
Unknown 
command 
?! 
} 
50
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
KnxMessage 
! 
/* 
Annotation 
to 
decorate 
methods 
in 
the 
MDB 
*/ 
@Target({ElementType.METHOD}) 
@Retention(RetentionPolicy.RUNTIME) 
public 
@interface 
KnxMessage 
{ 
String 
type() 
default 
""; 
String 
info() 
default 
""; 
} 
51
Inbound 
connector 
private 
Notif 
callMdb(MessageEndpoint 
mdb, 
Method 
command, 
Notification 
param) 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
throws 
ResourceException 
{ 
! 
try 
{ 
mdb.beforeDelivery(command); 
Object 
ret 
= 
command.invoke(mdb, 
param); 
notif 
= 
(Notif) 
ret; 
} 
catch 
(NoSuchMethodException 
| 
ResourceException 
| 
IllegalAccessException 
| 
IllegalArgumentException 
|InvocationTargetException 
ex) 
{ 
// 
MDB 
invocation 
error 
:( 
… 
} 
mdb.afterDelivery(); 
return 
notif; 
} 
52
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
KNX 
MDB 
53 
@MessageDriven( 
activationConfig 
= 
{ 
@ActivationConfigProperty( 
propertyName 
= 
“knx", 
propertyValue 
= 
"10.0.0.60") 
} 
) 
! 
public 
class 
KnxMdb 
implements 
KnxListener 
{ 
! 
@KnxMessage(type="sensor") 
public 
void 
handleKnxSensor(Notification 
notif) 
{ 
… 
} 
@KnxMessage(type=“switch") 
public 
void 
switchKnx(Notification 
notif) 
{ 
… 
} 
! 
}
Java 
Connector 
Architecture 
1.7 
Outbound 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
54 
JSR 
322 
Java 
EE 
Container 
Java 
EE 
Application 
Resource 
Adapter EIS
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
And 
more… 
• EJB 
• CDI 
Interceptors 
• JAX-­‐RS 
Interceptors 
• Concurrency 
Utilities 
for 
Java 
EE 
• Java 
Persistence 
API 
• JavaServer 
Faces 
• OpenMQ 
Stomp 
support 
• Jersey 
SSE, 
MVC… 
55
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Program 
Agenda 
Home 
Automation 
Java 
EE 
Demo 
Wrap-­‐up 
1 
2 
3 
4 
56
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Dashboard 
• HTML 
Client 
- “Pure” 
JS 
- Real-­‐time 
notifications 
via 
WebSocket 
- Control 
devices 
via 
REST 
• Java 
EE 
7 
backend 
- KNX 
(JCA) 
& 
Z-­‐Wave 
(REST) 
- In 
& 
Outbound 
57
KNX 
Sensors 
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
KNX 
Bus 
Bus 
Power 
Supply 
IP 
KNX 
KNX 
Output 
module 
VPN 
IP 
Java 
EE 
110/220v 
58 
KNX 
Output 
module 
KNX 
Input 
module 
KNX 
Input 
module 
KNX 
Input 
module 
Z-­‐Wave 
Output 
module 
Z-­‐Wave 
KNX 
Sensors 
Z-­‐Wave 
Input 
module 
Demo 
JCA 
REST
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Program 
Agenda 
Home 
Automation 
Java 
EE 
Demo 
Wrap-­‐up 
1 
2 
3 
4 
59
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
• Connectivity 
- JAX-­‐RS, 
JCA, 
WebSocket, 
JMS… 
• ‘Event’ 
driven 
capabilities 
- MDB, 
CDI 
event 
• Non 
blocking 
IO 
• Asynchronous 
• Scheduling 
• Persistence 
• Component 
models 
• UI 
- JSF, 
JAX-­‐RS 
• Container 
- Lifecycle 
- Monitoring 
& 
Management 
- Ressources 
pooling 
- Logging 
- … 
Java 
EE 
for 
Home 
Automation 
60
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
What’s 
next 
• PoC 
- KNX, 
Z-­‐Wave 
& 
InfraRed 
• Improvements 
- Additional 
‘connectors’, 
e.g. 
RF433 
- More 
types, 
e.g. 
range 
for 
blinders 
- State 
Management 
- User 
interface 
- Add 
‘scenario’s 
- Leverage 
Java 
EE 
more, 
e.g. 
CDI 
Interceptors 
61
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Java 
EE 
and 
IoT 
• Connected 
devices 
• Messages 
/ 
data 
producer 
• Data 
aggregation 
/ 
processing 
- Deeper 
in 
the 
network 
• Scaling 
• Security 
62
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Java 
EE 
8 
• CDI 
2.0 
• JMS 
2.1 
• MVC 
1.0 
• JAX-­‐RS 
2.1 
• JSON-­‐B 
+ 
JSON-­‐P 
TBC! 
63
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 
Resources 
• The 
Java 
EE 
7 
Tutorial 
- http://docs.oracle.com/javaee/7/tutorial/doc/home.htm 
• GlassFish 
4.1 
- http://glassfish.org 
• NetBeans 
8.0.1 
- http://netbeans.org 
64
Copyright 
© 
2014, 
Oracle 
and/or 
its 
affiliates. 
All 
rights 
reserved. 
| 65
66
67

More Related Content

What's hot

Leveraging Android for the Internet of Things with Eclipse M2M
Leveraging Android for the Internet of Things with Eclipse M2MLeveraging Android for the Internet of Things with Eclipse M2M
Leveraging Android for the Internet of Things with Eclipse M2MBenjamin Cabé
 
OpenStack Deployment in the Enterprise
OpenStack Deployment in the Enterprise OpenStack Deployment in the Enterprise
OpenStack Deployment in the Enterprise Cisco Canada
 
What Is OpenStack | OpenStack Tutorial For Beginners | OpenStack Training | E...
What Is OpenStack | OpenStack Tutorial For Beginners | OpenStack Training | E...What Is OpenStack | OpenStack Tutorial For Beginners | OpenStack Training | E...
What Is OpenStack | OpenStack Tutorial For Beginners | OpenStack Training | E...Edureka!
 
V mware nsx_network_virtualization_open_stack
V mware nsx_network_virtualization_open_stackV mware nsx_network_virtualization_open_stack
V mware nsx_network_virtualization_open_stackEMC
 
Configuration Management Tools on NX-OS
Configuration Management Tools on NX-OSConfiguration Management Tools on NX-OS
Configuration Management Tools on NX-OSCisco DevNet
 
Open Source & The Internet of Things
Open Source & The Internet of ThingsOpen Source & The Internet of Things
Open Source & The Internet of ThingsAll Things Open
 
Extending TripleO for OpenStack Management
Extending TripleO for OpenStack ManagementExtending TripleO for OpenStack Management
Extending TripleO for OpenStack ManagementKeith Basil
 
Nanog75, Network Device Property as Code
Nanog75, Network Device Property as CodeNanog75, Network Device Property as Code
Nanog75, Network Device Property as CodeDamien Garros
 
From Data to Actions and Insights at Conviva with Rui Zhang and Yan Li
From Data to Actions and Insights at Conviva with Rui Zhang and Yan Li From Data to Actions and Insights at Conviva with Rui Zhang and Yan Li
From Data to Actions and Insights at Conviva with Rui Zhang and Yan Li Databricks
 
ISUCONインフラ提供から見るCycloudのこれから #ca_base_next / future of Cycloud see from ISUCO...
ISUCONインフラ提供から見るCycloudのこれから #ca_base_next / future of Cycloud see from ISUCO...ISUCONインフラ提供から見るCycloudのこれから #ca_base_next / future of Cycloud see from ISUCO...
ISUCONインフラ提供から見るCycloudのこれから #ca_base_next / future of Cycloud see from ISUCO...whywaita
 
OpenStack Certification | Red Hat OpenStack Certification | OpenStack Trainin...
OpenStack Certification | Red Hat OpenStack Certification | OpenStack Trainin...OpenStack Certification | Red Hat OpenStack Certification | OpenStack Trainin...
OpenStack Certification | Red Hat OpenStack Certification | OpenStack Trainin...Edureka!
 
Building Cloud Virtual Topologies with Ravello and Ansible
Building Cloud Virtual Topologies with Ravello and AnsibleBuilding Cloud Virtual Topologies with Ravello and Ansible
Building Cloud Virtual Topologies with Ravello and AnsibleDamien Garros
 
Getting a Neural Network Up and Running with OpenLab
Getting a Neural Network Up and Running with OpenLabGetting a Neural Network Up and Running with OpenLab
Getting a Neural Network Up and Running with OpenLabMelvin Hillsman
 
USING VISION SENSORS FOR INNOVATIVE HCI
USING VISION SENSORS FOR INNOVATIVE HCIUSING VISION SENSORS FOR INNOVATIVE HCI
USING VISION SENSORS FOR INNOVATIVE HCIRakuten Group, Inc.
 
Open Source IoT Building Blocks for Startups
Open Source IoT Building Blocks for StartupsOpen Source IoT Building Blocks for Startups
Open Source IoT Building Blocks for StartupsCharalampos Doukas
 
OpenStack Overview and History
OpenStack Overview and HistoryOpenStack Overview and History
OpenStack Overview and HistoryMirantis
 
How to Achieve more through Collaboration
How to Achieve more through Collaboration How to Achieve more through Collaboration
How to Achieve more through Collaboration Damien Garros
 

What's hot (20)

Leveraging Android for the Internet of Things with Eclipse M2M
Leveraging Android for the Internet of Things with Eclipse M2MLeveraging Android for the Internet of Things with Eclipse M2M
Leveraging Android for the Internet of Things with Eclipse M2M
 
De leukste Bug
De leukste BugDe leukste Bug
De leukste Bug
 
OpenStack Deployment in the Enterprise
OpenStack Deployment in the Enterprise OpenStack Deployment in the Enterprise
OpenStack Deployment in the Enterprise
 
What Is OpenStack | OpenStack Tutorial For Beginners | OpenStack Training | E...
What Is OpenStack | OpenStack Tutorial For Beginners | OpenStack Training | E...What Is OpenStack | OpenStack Tutorial For Beginners | OpenStack Training | E...
What Is OpenStack | OpenStack Tutorial For Beginners | OpenStack Training | E...
 
V mware nsx_network_virtualization_open_stack
V mware nsx_network_virtualization_open_stackV mware nsx_network_virtualization_open_stack
V mware nsx_network_virtualization_open_stack
 
Configuration Management Tools on NX-OS
Configuration Management Tools on NX-OSConfiguration Management Tools on NX-OS
Configuration Management Tools on NX-OS
 
Open Source & The Internet of Things
Open Source & The Internet of ThingsOpen Source & The Internet of Things
Open Source & The Internet of Things
 
Extending TripleO for OpenStack Management
Extending TripleO for OpenStack ManagementExtending TripleO for OpenStack Management
Extending TripleO for OpenStack Management
 
Nanog75, Network Device Property as Code
Nanog75, Network Device Property as CodeNanog75, Network Device Property as Code
Nanog75, Network Device Property as Code
 
From Data to Actions and Insights at Conviva with Rui Zhang and Yan Li
From Data to Actions and Insights at Conviva with Rui Zhang and Yan Li From Data to Actions and Insights at Conviva with Rui Zhang and Yan Li
From Data to Actions and Insights at Conviva with Rui Zhang and Yan Li
 
ISUCONインフラ提供から見るCycloudのこれから #ca_base_next / future of Cycloud see from ISUCO...
ISUCONインフラ提供から見るCycloudのこれから #ca_base_next / future of Cycloud see from ISUCO...ISUCONインフラ提供から見るCycloudのこれから #ca_base_next / future of Cycloud see from ISUCO...
ISUCONインフラ提供から見るCycloudのこれから #ca_base_next / future of Cycloud see from ISUCO...
 
OpenStack Certification | Red Hat OpenStack Certification | OpenStack Trainin...
OpenStack Certification | Red Hat OpenStack Certification | OpenStack Trainin...OpenStack Certification | Red Hat OpenStack Certification | OpenStack Trainin...
OpenStack Certification | Red Hat OpenStack Certification | OpenStack Trainin...
 
Building Cloud Virtual Topologies with Ravello and Ansible
Building Cloud Virtual Topologies with Ravello and AnsibleBuilding Cloud Virtual Topologies with Ravello and Ansible
Building Cloud Virtual Topologies with Ravello and Ansible
 
Getting a Neural Network Up and Running with OpenLab
Getting a Neural Network Up and Running with OpenLabGetting a Neural Network Up and Running with OpenLab
Getting a Neural Network Up and Running with OpenLab
 
USING VISION SENSORS FOR INNOVATIVE HCI
USING VISION SENSORS FOR INNOVATIVE HCIUSING VISION SENSORS FOR INNOVATIVE HCI
USING VISION SENSORS FOR INNOVATIVE HCI
 
JavaCro'15 - Everything a Java EE Developer needs to know about the JavaScrip...
JavaCro'15 - Everything a Java EE Developer needs to know about the JavaScrip...JavaCro'15 - Everything a Java EE Developer needs to know about the JavaScrip...
JavaCro'15 - Everything a Java EE Developer needs to know about the JavaScrip...
 
Open Source IoT Building Blocks for Startups
Open Source IoT Building Blocks for StartupsOpen Source IoT Building Blocks for Startups
Open Source IoT Building Blocks for Startups
 
OpenStack Overview and History
OpenStack Overview and HistoryOpenStack Overview and History
OpenStack Overview and History
 
How to Achieve more through Collaboration
How to Achieve more through Collaboration How to Achieve more through Collaboration
How to Achieve more through Collaboration
 
What's new OpenStack kilo
What's new OpenStack kiloWhat's new OpenStack kilo
What's new OpenStack kilo
 

Viewers also liked

Keynote on industrial internet
Keynote on industrial internetKeynote on industrial internet
Keynote on industrial internetBenedict Evans
 
La metodología Lean Startup
La metodología Lean StartupLa metodología Lean Startup
La metodología Lean StartupJaume Teixi
 
IoT Developer Survey 2015
IoT Developer Survey 2015IoT Developer Survey 2015
IoT Developer Survey 2015Ian Skerrett
 
LUMA's State of the State 2015 at DMS 15
LUMA's State of the State 2015 at DMS 15LUMA's State of the State 2015 at DMS 15
LUMA's State of the State 2015 at DMS 15LUMA Partners
 
Getting Started with WebSocket and Server-Sent Events in Java
Getting Started with WebSocket and Server-Sent Events in JavaGetting Started with WebSocket and Server-Sent Events in Java
Getting Started with WebSocket and Server-Sent Events in JavaArun Gupta
 
Server-Side Programming Primer
Server-Side Programming PrimerServer-Side Programming Primer
Server-Side Programming PrimerIvano Malavolta
 
Debugging microservices in production
Debugging microservices in productionDebugging microservices in production
Debugging microservices in productionbcantrill
 
Lessons for the Industrial Internet (pdf with notes)
Lessons for the Industrial Internet (pdf with notes)Lessons for the Industrial Internet (pdf with notes)
Lessons for the Industrial Internet (pdf with notes)Tim O'Reilly
 
Industrial internet big data china market study
Industrial internet big data china market studyIndustrial internet big data china market study
Industrial internet big data china market studyBusiness Finland
 
Home and building automation systems
Home and building automation systemsHome and building automation systems
Home and building automation systemsDario Bonino
 

Viewers also liked (12)

Keynote on industrial internet
Keynote on industrial internetKeynote on industrial internet
Keynote on industrial internet
 
Overview of IoT and Security issues
Overview of IoT and Security issuesOverview of IoT and Security issues
Overview of IoT and Security issues
 
La metodología Lean Startup
La metodología Lean StartupLa metodología Lean Startup
La metodología Lean Startup
 
IoT Developer Survey 2015
IoT Developer Survey 2015IoT Developer Survey 2015
IoT Developer Survey 2015
 
LUMA's State of the State 2015 at DMS 15
LUMA's State of the State 2015 at DMS 15LUMA's State of the State 2015 at DMS 15
LUMA's State of the State 2015 at DMS 15
 
Getting Started with WebSocket and Server-Sent Events in Java
Getting Started with WebSocket and Server-Sent Events in JavaGetting Started with WebSocket and Server-Sent Events in Java
Getting Started with WebSocket and Server-Sent Events in Java
 
Server-Side Programming Primer
Server-Side Programming PrimerServer-Side Programming Primer
Server-Side Programming Primer
 
Debugging microservices in production
Debugging microservices in productionDebugging microservices in production
Debugging microservices in production
 
Lessons for the Industrial Internet (pdf with notes)
Lessons for the Industrial Internet (pdf with notes)Lessons for the Industrial Internet (pdf with notes)
Lessons for the Industrial Internet (pdf with notes)
 
Industrial internet big data china market study
Industrial internet big data china market studyIndustrial internet big data china market study
Industrial internet big data china market study
 
Home and building automation systems
Home and building automation systemsHome and building automation systems
Home and building automation systems
 
Swarm Extreme
Swarm ExtremeSwarm Extreme
Swarm Extreme
 

Similar to Pushing Java EE outside of the Enterprise - Home Automation

Pushing Java EE outside of the Enterprise: Home Automation and IoT - David De...
Pushing Java EE outside of the Enterprise: Home Automation and IoT - David De...Pushing Java EE outside of the Enterprise: Home Automation and IoT - David De...
Pushing Java EE outside of the Enterprise: Home Automation and IoT - David De...JAXLondon2014
 
Pushing JavaEE outside of the enterprise: Home Automation & IoT - David Delab...
Pushing JavaEE outside of the enterprise: Home Automation & IoT - David Delab...Pushing JavaEE outside of the enterprise: Home Automation & IoT - David Delab...
Pushing JavaEE outside of the enterprise: Home Automation & IoT - David Delab...Codemotion Tel Aviv
 
Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...
Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...
Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...Tomek Borek
 
Tweet4Beer (atualizada): Torneira de Chopp Controlada por Java, JavaFX, IoT ...
Tweet4Beer (atualizada): Torneira de Chopp Controlada por Java, JavaFX, IoT ...Tweet4Beer (atualizada): Torneira de Chopp Controlada por Java, JavaFX, IoT ...
Tweet4Beer (atualizada): Torneira de Chopp Controlada por Java, JavaFX, IoT ...Marco Antonio Maciel
 
Sviluppo IoT - Un approccio standard da Nerd ad Impresa, prove pratiche di Me...
Sviluppo IoT - Un approccio standard da Nerd ad Impresa, prove pratiche di Me...Sviluppo IoT - Un approccio standard da Nerd ad Impresa, prove pratiche di Me...
Sviluppo IoT - Un approccio standard da Nerd ad Impresa, prove pratiche di Me...Codemotion
 
Increased Developer Productivity for IoT with Java and Reactive Blocks (Oracl...
Increased Developer Productivity for IoT with Java and Reactive Blocks (Oracl...Increased Developer Productivity for IoT with Java and Reactive Blocks (Oracl...
Increased Developer Productivity for IoT with Java and Reactive Blocks (Oracl...Bart Jonkers
 
HTTP/2 Comes to Java - What Servlet 4.0 Means to You
HTTP/2 Comes to Java - What Servlet 4.0 Means to YouHTTP/2 Comes to Java - What Servlet 4.0 Means to You
HTTP/2 Comes to Java - What Servlet 4.0 Means to YouDavid Delabassee
 
Virtual Compute Appliance Oracle IaaS
Virtual Compute Appliance Oracle IaaS Virtual Compute Appliance Oracle IaaS
Virtual Compute Appliance Oracle IaaS Fran Navarro
 
Plataforma Java Embedded & Internet of Things (IoT)
Plataforma Java Embedded & Internet of Things (IoT)Plataforma Java Embedded & Internet of Things (IoT)
Plataforma Java Embedded & Internet of Things (IoT)Marco Antonio Maciel
 
WebSockets in Enterprise Applications
WebSockets in Enterprise ApplicationsWebSockets in Enterprise Applications
WebSockets in Enterprise ApplicationsPavel Bucek
 
Simplify IT: Oracle SuperCluster
Simplify IT: Oracle SuperCluster Simplify IT: Oracle SuperCluster
Simplify IT: Oracle SuperCluster Fran Navarro
 
JDK 8 and JDK 8 Updates in OpenJDK
JDK 8 and JDK 8 Updates in OpenJDKJDK 8 and JDK 8 Updates in OpenJDK
JDK 8 and JDK 8 Updates in OpenJDKWolfgang Weigend
 
A practical introduction to Oracle NoSQL Database - OOW2014
A practical introduction to Oracle NoSQL Database - OOW2014A practical introduction to Oracle NoSQL Database - OOW2014
A practical introduction to Oracle NoSQL Database - OOW2014Anuj Sahni
 
Managing Oracle Solaris Systems with Puppet
Managing Oracle Solaris Systems with PuppetManaging Oracle Solaris Systems with Puppet
Managing Oracle Solaris Systems with Puppetglynnfoster
 
Desayuno Tecnico OVN - Xsigo
Desayuno Tecnico OVN - XsigoDesayuno Tecnico OVN - Xsigo
Desayuno Tecnico OVN - XsigoFran Navarro
 
Developing Java EE Applications on IntelliJ IDEA with Oracle WebLogic 12c
Developing Java EE Applications on IntelliJ IDEA with Oracle WebLogic 12cDeveloping Java EE Applications on IntelliJ IDEA with Oracle WebLogic 12c
Developing Java EE Applications on IntelliJ IDEA with Oracle WebLogic 12cBruno Borges
 
Introduction to MySQL
Introduction to MySQLIntroduction to MySQL
Introduction to MySQLTed Wennmark
 
Grow Your Business with Oracle Linux, Virtualization- BL v6.pdf
Grow Your Business with Oracle Linux, Virtualization- BL v6.pdfGrow Your Business with Oracle Linux, Virtualization- BL v6.pdf
Grow Your Business with Oracle Linux, Virtualization- BL v6.pdfsyamsulsakbar
 
Tweet4Beer - Beertap powered by Java goes IoT and JavaFX
Tweet4Beer - Beertap powered by Java goes IoT and JavaFXTweet4Beer - Beertap powered by Java goes IoT and JavaFX
Tweet4Beer - Beertap powered by Java goes IoT and JavaFXBruno Borges
 

Similar to Pushing Java EE outside of the Enterprise - Home Automation (20)

Pushing Java EE outside of the Enterprise: Home Automation and IoT - David De...
Pushing Java EE outside of the Enterprise: Home Automation and IoT - David De...Pushing Java EE outside of the Enterprise: Home Automation and IoT - David De...
Pushing Java EE outside of the Enterprise: Home Automation and IoT - David De...
 
Pushing JavaEE outside of the enterprise: Home Automation & IoT - David Delab...
Pushing JavaEE outside of the enterprise: Home Automation & IoT - David Delab...Pushing JavaEE outside of the enterprise: Home Automation & IoT - David Delab...
Pushing JavaEE outside of the enterprise: Home Automation & IoT - David Delab...
 
Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...
Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...
Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...
 
Tweet4Beer (atualizada): Torneira de Chopp Controlada por Java, JavaFX, IoT ...
Tweet4Beer (atualizada): Torneira de Chopp Controlada por Java, JavaFX, IoT ...Tweet4Beer (atualizada): Torneira de Chopp Controlada por Java, JavaFX, IoT ...
Tweet4Beer (atualizada): Torneira de Chopp Controlada por Java, JavaFX, IoT ...
 
Sviluppo IoT - Un approccio standard da Nerd ad Impresa, prove pratiche di Me...
Sviluppo IoT - Un approccio standard da Nerd ad Impresa, prove pratiche di Me...Sviluppo IoT - Un approccio standard da Nerd ad Impresa, prove pratiche di Me...
Sviluppo IoT - Un approccio standard da Nerd ad Impresa, prove pratiche di Me...
 
Increased Developer Productivity for IoT with Java and Reactive Blocks (Oracl...
Increased Developer Productivity for IoT with Java and Reactive Blocks (Oracl...Increased Developer Productivity for IoT with Java and Reactive Blocks (Oracl...
Increased Developer Productivity for IoT with Java and Reactive Blocks (Oracl...
 
HTTP/2 Comes to Java - What Servlet 4.0 Means to You
HTTP/2 Comes to Java - What Servlet 4.0 Means to YouHTTP/2 Comes to Java - What Servlet 4.0 Means to You
HTTP/2 Comes to Java - What Servlet 4.0 Means to You
 
Virtual Compute Appliance Oracle IaaS
Virtual Compute Appliance Oracle IaaS Virtual Compute Appliance Oracle IaaS
Virtual Compute Appliance Oracle IaaS
 
Plataforma Java Embedded & Internet of Things (IoT)
Plataforma Java Embedded & Internet of Things (IoT)Plataforma Java Embedded & Internet of Things (IoT)
Plataforma Java Embedded & Internet of Things (IoT)
 
WebSockets in Enterprise Applications
WebSockets in Enterprise ApplicationsWebSockets in Enterprise Applications
WebSockets in Enterprise Applications
 
Simplify IT: Oracle SuperCluster
Simplify IT: Oracle SuperCluster Simplify IT: Oracle SuperCluster
Simplify IT: Oracle SuperCluster
 
JDK 8 and JDK 8 Updates in OpenJDK
JDK 8 and JDK 8 Updates in OpenJDKJDK 8 and JDK 8 Updates in OpenJDK
JDK 8 and JDK 8 Updates in OpenJDK
 
A practical introduction to Oracle NoSQL Database - OOW2014
A practical introduction to Oracle NoSQL Database - OOW2014A practical introduction to Oracle NoSQL Database - OOW2014
A practical introduction to Oracle NoSQL Database - OOW2014
 
Managing Oracle Solaris Systems with Puppet
Managing Oracle Solaris Systems with PuppetManaging Oracle Solaris Systems with Puppet
Managing Oracle Solaris Systems with Puppet
 
Desayuno Tecnico OVN - Xsigo
Desayuno Tecnico OVN - XsigoDesayuno Tecnico OVN - Xsigo
Desayuno Tecnico OVN - Xsigo
 
Developing Java EE Applications on IntelliJ IDEA with Oracle WebLogic 12c
Developing Java EE Applications on IntelliJ IDEA with Oracle WebLogic 12cDeveloping Java EE Applications on IntelliJ IDEA with Oracle WebLogic 12c
Developing Java EE Applications on IntelliJ IDEA with Oracle WebLogic 12c
 
Oracle Database Cloud Service
Oracle Database Cloud ServiceOracle Database Cloud Service
Oracle Database Cloud Service
 
Introduction to MySQL
Introduction to MySQLIntroduction to MySQL
Introduction to MySQL
 
Grow Your Business with Oracle Linux, Virtualization- BL v6.pdf
Grow Your Business with Oracle Linux, Virtualization- BL v6.pdfGrow Your Business with Oracle Linux, Virtualization- BL v6.pdf
Grow Your Business with Oracle Linux, Virtualization- BL v6.pdf
 
Tweet4Beer - Beertap powered by Java goes IoT and JavaFX
Tweet4Beer - Beertap powered by Java goes IoT and JavaFXTweet4Beer - Beertap powered by Java goes IoT and JavaFX
Tweet4Beer - Beertap powered by Java goes IoT and JavaFX
 

More from David Delabassee

JVMs in Containers - Best Practices
JVMs in Containers - Best PracticesJVMs in Containers - Best Practices
JVMs in Containers - Best PracticesDavid Delabassee
 
Serverless Java Challenges & Triumphs
Serverless Java Challenges & TriumphsServerless Java Challenges & Triumphs
Serverless Java Challenges & TriumphsDavid Delabassee
 
Serverless Java - Challenges and Triumphs
Serverless Java - Challenges and TriumphsServerless Java - Challenges and Triumphs
Serverless Java - Challenges and TriumphsDavid Delabassee
 
Randstad Docker meetup - Serverless
Randstad Docker meetup - ServerlessRandstad Docker meetup - Serverless
Randstad Docker meetup - ServerlessDavid Delabassee
 
Java Serverless in Action - Voxxed Banff
Java Serverless in Action - Voxxed BanffJava Serverless in Action - Voxxed Banff
Java Serverless in Action - Voxxed BanffDavid Delabassee
 
Java EE 8 - February 2017 update
Java EE 8 - February 2017 updateJava EE 8 - February 2017 update
Java EE 8 - February 2017 updateDavid Delabassee
 
Java EE Next - BeJUG JavaOne Afterglow 2016
Java EE Next - BeJUG JavaOne Afterglow 2016Java EE Next - BeJUG JavaOne Afterglow 2016
Java EE Next - BeJUG JavaOne Afterglow 2016David Delabassee
 
Java EE 8 - Work in progress
Java EE 8 - Work in progressJava EE 8 - Work in progress
Java EE 8 - Work in progressDavid Delabassee
 
HTTP/2 comes to Java (Dec. 2015 version)
HTTP/2 comes to Java (Dec. 2015 version)HTTP/2 comes to Java (Dec. 2015 version)
HTTP/2 comes to Java (Dec. 2015 version)David Delabassee
 
EJB and CDI - Alignment and Strategy
EJB and CDI - Alignment and StrategyEJB and CDI - Alignment and Strategy
EJB and CDI - Alignment and StrategyDavid Delabassee
 
Java EE 8 - What’s new on the Web front
Java EE 8 - What’s new on the Web frontJava EE 8 - What’s new on the Web front
Java EE 8 - What’s new on the Web frontDavid Delabassee
 
What's coming in Java EE 8
What's coming in Java EE 8What's coming in Java EE 8
What's coming in Java EE 8David Delabassee
 

More from David Delabassee (20)

JVMs in Containers - Best Practices
JVMs in Containers - Best PracticesJVMs in Containers - Best Practices
JVMs in Containers - Best Practices
 
JVMs in Containers
JVMs in ContainersJVMs in Containers
JVMs in Containers
 
Serverless Java Challenges & Triumphs
Serverless Java Challenges & TriumphsServerless Java Challenges & Triumphs
Serverless Java Challenges & Triumphs
 
Serverless Java - Challenges and Triumphs
Serverless Java - Challenges and TriumphsServerless Java - Challenges and Triumphs
Serverless Java - Challenges and Triumphs
 
Randstad Docker meetup - Serverless
Randstad Docker meetup - ServerlessRandstad Docker meetup - Serverless
Randstad Docker meetup - Serverless
 
Java Serverless in Action - Voxxed Banff
Java Serverless in Action - Voxxed BanffJava Serverless in Action - Voxxed Banff
Java Serverless in Action - Voxxed Banff
 
Serverless Kotlin
Serverless KotlinServerless Kotlin
Serverless Kotlin
 
REST in an Async World
REST in an Async WorldREST in an Async World
REST in an Async World
 
JAX-RS 2.1 Reloaded
JAX-RS 2.1 ReloadedJAX-RS 2.1 Reloaded
JAX-RS 2.1 Reloaded
 
Java EE 8 - February 2017 update
Java EE 8 - February 2017 updateJava EE 8 - February 2017 update
Java EE 8 - February 2017 update
 
Java EE Next
Java EE NextJava EE Next
Java EE Next
 
Java EE Next - BeJUG JavaOne Afterglow 2016
Java EE Next - BeJUG JavaOne Afterglow 2016Java EE Next - BeJUG JavaOne Afterglow 2016
Java EE Next - BeJUG JavaOne Afterglow 2016
 
HTTP/2 comes to Java
HTTP/2 comes to JavaHTTP/2 comes to Java
HTTP/2 comes to Java
 
Java EE 8 - Work in progress
Java EE 8 - Work in progressJava EE 8 - Work in progress
Java EE 8 - Work in progress
 
HTTP/2 comes to Java (Dec. 2015 version)
HTTP/2 comes to Java (Dec. 2015 version)HTTP/2 comes to Java (Dec. 2015 version)
HTTP/2 comes to Java (Dec. 2015 version)
 
EJB and CDI - Alignment and Strategy
EJB and CDI - Alignment and StrategyEJB and CDI - Alignment and Strategy
EJB and CDI - Alignment and Strategy
 
HTTP/2 Comes to Java
HTTP/2 Comes to JavaHTTP/2 Comes to Java
HTTP/2 Comes to Java
 
Java EE 8 - What’s new on the Web front
Java EE 8 - What’s new on the Web frontJava EE 8 - What’s new on the Web front
Java EE 8 - What’s new on the Web front
 
HTTP/2 Comes to Java
HTTP/2 Comes to JavaHTTP/2 Comes to Java
HTTP/2 Comes to Java
 
What's coming in Java EE 8
What's coming in Java EE 8What's coming in Java EE 8
What's coming in Java EE 8
 

Recently uploaded

How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 

Recently uploaded (20)

How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 

Pushing Java EE outside of the Enterprise - Home Automation

  • 1. 1
  • 2. Pushing Java EE outside of the Enterprise Home Automation David Delabassee -­‐ @delabassee Software Evangelist – Java EE Oracle September, 2014 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 2
  • 3. 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. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 3
  • 4. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Program Agenda Home Automation Java EE Demo Wrap-­‐up 1 2 3 4 4
  • 5. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Program Agenda Home Automation Java EE Demo Wrap-­‐up 1 2 3 4 5
  • 6. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Home Automation • “Devices” control - Lights, windows, blinders, audio, doors, wall-­‐plugs, heating, etc. - From different “terminal” • Monitoring & dashboard - Power consumption, weather, motion/presence, intrusion, etc. • Scenario, scene, scheduling & automation • “Flexible” configuration Features 6
  • 7. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Home Automation Benefits • Better control • Improves day-­‐to-­‐day life • Improves security • More Eco friendly • … 7
  • 8. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Home Automation Market • Crowded space • Just the beginning! • IoT 8
  • 9. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Home Automation Technologies • X10 / PCLBUS • RF433 • EnOcean • Z-­‐Wave • ZigBee • Domologic 9 • Domintell • NikoBus / HomeControl • Chacon / DI-­‐O • Somfy RTS • io-­‐homecontrol • VelBus • Domologic • KNX • BLE • HomeKit • Thread • …
  • 10. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Home Automation • Sensors - Switches, motion, temperature, CO2, humidity, wind speed, etc. • Actuators - Lights, blinders, windows, doors, audio, wall-­‐plugs, etc. • Network - Wired or/and wireless + TCP/IP • Hub, box, gateway - Provides added values Actors 10
  • 11. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Z-­‐Wave “Z-­‐Wave, The Interoperable Standard” • “Interoperable wireless RF-­‐based communications technology designed for control, monitoring and status reading applications in residential and light commercial environments.” • Proprietary • Z-­‐Wave Alliance - Consortium of 250 manufacturers and service providers worldwide ! http://www.z-­‐wavealliance.org 11
  • 12. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Z-­‐Wave “Z-­‐Wave, The Interoperable Standard” • Meshed wireless network • Range 100 ft (open-­‐sight) • 232 modules per controller • Cheap and simple 12
  • 13. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Connectivity • Physical connectivity - Razberry-­‐Pi Daughter Card - Aeon Labs Z-­‐Stick, … • Middleware - OpenZwave - RaZberry / Z-­‐Wave-­‐me / Z-­‐Way - Domoticz, … 13
  • 14. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Principles 14 Switch Z-­‐Wave Chip 1 1 Z-­‐Wave Midd. App. Set(0) Set(0) Set(0) Get() Get() 1 (inv.) 0 (valid.) 0
  • 15. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | In real life 15
  • 16. “The worldwide STANDARD for home and building control” - 40,189 KNX Partners in 125 countries - 100 Scientific Partners in 28 countries - 13 User clubs in 12 countries Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | KNX • ISO/IEC 14543-­‐3 • KNX Association - 340 KNX Members in 37 countries - 40 KNX National Groups - 275 Training Centres in 51 countries ! http://www.knx.org 16
  • 17. “The worldwide STANDARD for home and building control” Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | KNX • Media - TP, PL, RF and IP • Engineering Tool Software - Manufacturer independent configuration software tool - Design and configure intelligent home and building KNX installations 17
  • 18. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Connectivity • Physical connectivity - KNX/USB Router - KNX/IP Router - Eelectron Raspberry Pi KNX interface 18
  • 19. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Calimero • Java library for KNX/EIB applications - KNX Network services and data encodings - Routing - Local device management - Datapoint type and property type translation - ETS4 import, … • Min Java 2 Micro-­‐Edition CDC Foundation Profile • http://calimero.sourceforge.net 19
  • 20. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Config only Optional Principles KNX Bus Bus Power Supply IP KNX KNX Output module KNX Input module ETS IP Controller Gateway … 110/220v 20
  • 21. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | In real life 21
  • 22. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Z-­‐Wave Vs. KNX • Proprietary • 232 devices per controller • Residential grade • Wireless, more sensible • Powered via batteries and PL • Controller is the Single PoF • Simple, non intrusive • Cheap • ISO Standard • Up to 58.000 bus devices • Industrial, professional grade • Wired, more reliable • Powered through the Bus • No real PoF • Complex, intrusive • Expensive 22
  • 23. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Program Agenda Home Automation Java EE Demo Wrap-­‐up 1 2 3 4 23
  • 24. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Java EE ENTERPRISE EDITION ▪Batch ▪Concurrency ▪Simplified JMS DEVELOPER PRODUCTIVITY ▪More annotated POJOs ▪Less boilerplate code ▪Cohesive integrated platform ▪WebSockets ▪JSON ▪Servlet 3.1 NIO ▪REST MEETING ENTERPRISE DEMANDS Java EE 7 24
  • 25. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Java EE ENTERPRISE EDITION Java EE 25 • Connectivity - EE to clients - EE to HA • Events
  • 26. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | JSON-­‐P • API to parse and generate JSON • Streaming API (javax.json.stream) - Low-­‐level, efficient way to parse/generate JSON - Similar to StAX API in XML world • Object model API (javax.json) - Simple, easy to use high-­‐level API - Similar to DOM API in XML world JSR 353 26
  • 27. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | public class Notification { ! // bunch of Getters & Setters ! public String toJson() { JsonObject model = Json.createObjectBuilder() .add("source", getSource()) .add("target", getTarget()) .add("val", getValue()) .add("type", getType()) .add("medium", getMedium()) .add("cyclic", isCyclic()) .add("time", getTimestamp()) .build(); return model; } 27 JSON-­‐P
  • 28. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Java API for Web Socket • Bidirectional full-­‐duplex messaging - Initial HTTP handshake - Over a single TCP connection • IETF defined protocol: RFC 6455 • HTML5 / W3C defined JavaScript API • JSR 356 - Client & Server API JSR 356 28
  • 29. WebSocket Server Endpoint (1/2) @ServerEndpoint("/wsEndPt") public class InboundWebsocket implements Serializable { ! static Queue<Session> queue = new ConcurrentLinkedQueue<>(); @OnOpen public void openConnection(Session session) { Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | queue.add(session); } ! public void onEvent(Notification notif) { sendAllEndpoints(notif.toJson()); } ! … 29
  • 30. WebSocket Server Endpoint (2/2) Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | ! … public static synchronized void sendAllEndpoints(String payload) { try { for (Session session : queue) { if (session.isOpen()) { session.getBasicRemote().sendText(payload); } } } catch (IOException e) { // Oooops } } 30
  • 31. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | WebSocket Client Endpoint function connect() { wsocket = new WebSocket('ws://' + window.location.host + '/dashboard/wsEndPt'); wsocket.onmessage = onMessage; } ! function onMessage(evt) { jsonData = JSON.parse(evt.data); targetDiv = jsonData.target; var myDiv = document.getElementById(targetDiv); ! if (jsonData.type === "switch") { if (jsonData.val === "true") value = "ON"; else value = "OFF"; } else value = jsonData.val; $(myDiv).text(value); } 31
  • 32. Contexts and Dependency Injection for Java EE 1.1 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | JSR 346 • Core component model - Enabled by default in implicit bean archives • Expanded use of CDI Interceptors - Transactional interceptors - Method-­‐level validation interceptors • New CDI scopes - @TransactionScoped - @FlowScoped 32
  • 33. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | CDI Events • Observer Design Pattern • Defined by - A java object (the event object) - Event Qualifier(s) JSR 346 33
  • 34. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | CDI Events JSR 346 34 !public class producerClass { ! @Inject Event<SomeEvent> someEvent; public void someMethod(...) { ... someEvent.fire(myEvent); } } !public class anotherClass { public void someObserver(@Observes SomeEvent someEvent ) { ... ! } }
  • 35. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 35 CDI Events MDB ! @MessageDriven( … ) public class KnxMdb implements KnxListener { ! @Inject @HomeEvent Event<Notification> homeEvent; ! @KnxMessage(type="sensor") public void handleKnxSensor(Notification notif) { … homeEvent.fire(notif); } ! }
  • 36. CDI Events @ServerEndpoint("/wsEndPt") public class InboundWebsocket implements Serializable { Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | !! @Inject @HomeEvent Event<Notification> homeEvent; ! @OnOpen public void openConnection(Session session) { … } ! public void onEvent(@Observes @HomeEvent Notification notif) { sendAllEndpoints(notif.toJson()); } … 36 WebSocker Server Endpoint
  • 37. Java API for RESTful Web Services 2.0 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | • Filters and Interceptors • Asynchronous Processing • Hypermedia • Validation • Client API JSR 339 37
  • 38. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | JAX-­‐RS Client !! private void zwaveCommand(String url, String node, boolean val) { //http://host/ZWaveAPI/Run/devices[3].instances[0].commandClasses[0x25].Set(false) ! String zwaveUrl = url + node + ".Set(" + val + ")"; ! private final Client jaxrsClient = ClientBuilder.newClient(); ! String zwaveResp = jaxrsClient.target(zwaveUrl) .request(MediaType.TEXT_PLAIN_TYPE) .get(String.class); } 38
  • 39. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | REST Endpoint ! @Path("/zwave") public class ZwaveEndpoint { @Inject @HomeEvent Event<Notification> homeEvent; ! @PUT @Path("/{id}/{val}/") @Produces("text/plain") public String swithZ(@PathParam("id") String id, @PathParam("val") String val) { Notification notif = new Notification(id, "switch" , val, "ZWAVE"); notif.setTarget(id); // target is required to identify the Zwave device notif.setValue(val); homeEvent.fire(notif); } ! } 39
  • 40. Java Connector Architecture 1.7 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | • Resource Adapter - JCA component for a specific EIS - Mediates communication between the container and the EIS by means of contracts - Packaged as a RAR • EIS - Packaged Applications, ERP, CICS, mail server, MoM, etc. • Contracts - Lifecycle, Connection (inc. pooling), TX, Work Management, CCI, … 40 JSR 322
  • 41. Java Connector Architecture 1.7 Outbound Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 41 JSR 322 Java EE Container Java EE Application Resource Adapter EIS Inbound
  • 42. Java Connector Architecture 1.7 Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 42 JSR 322 Java EE Container Java EE Application Resource Adapter EIS MDB Inbound
  • 43. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Message Driven Bean @MessageDriven ( activationConfig = { @ActivationConfigProperty( propertyName="destinationLookup", propertyValue="…"), @ActivationConfigProperty( propertyName="destinationType", propertyValue="javax.jms.Queue") } ) ! public class MyJmsMdb implements MessageListener { @Override public void onMessage(Message message) { //do the work } ! } 43 JMS
  • 44. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Message Driven Bean 44 • “A MDB is an asynchronous message consumer…” • “A MDB is invoked by the container as a result of the arrival of a message at the destination or endpoint that is serviced by the MDB…” • “MDB listen to an Inbound Ressource Adapter” - Eg. JMS
  • 45. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 45 Message Driven Bean KNX @MessageDriven( activationConfig = { @ActivationConfigProperty( propertyName = “knx", propertyValue = "10.0.0.60") } ) ! public class KnxMdb implements KnxListener { ! @Override public void onMessage(Message message) { //handle the KNX Message } ! }
  • 46. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 46 Message Driven Bean KNX @MessageDriven( activationConfig = { @ActivationConfigProperty( propertyName = “knx", propertyValue = "10.0.0.60") } ) ! !public class KnxMdb implements KnxListener { @KnxMessage(type="sensor") public void handleKnxSensor(Notification notif) { … } @KnxMessage(type=“switch") public void switchKnx(Notification notif) { … } ! }
  • 47. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Inbound RA • public interface KnxListener { } - Will be implemented by the MDB • public class KnxResourceAdapter implements ResourceAdapter {…} - Do the actual work, without real constraints (e.g. threads) - Handle MDB activation - Will listen on the KNX bus via WorkManager • public class KnxActivationSpec implements ActivationSpec {…} - Expose RA configuration to the application !! 47
  • 48. Inbound RA @Override public void endpointActivation(MessageEndpointFactory endpointFactory, ActivationSpec spec) throws ResourceException { Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | tSpec = (TrafficActivationSpec) spec; Class endpointClass = endpointFactory.getEndpointClass(); tSpec.setBeanClass(endpointClass); tSpec.findCommandsInMDB(); ObtainEndpointWork work = new ObtainEndpointWork(this, endpointFactory); workManager.scheduleWork(work); } 48
  • 49. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Inbound RA public void findCommandsInMDB() { ! for (Method method : beanClass.getMethods()) { if (method.isAnnotationPresent(KnxMessage.class)) { KnxMessage tCommand = method.getAnnotation(KnxMessage.class); commands.put(tCommand.type(), method); } } … } 49
  • 50. KNX (real) Listener // KNX ProcessedEvent from the Calimero stack switch (actor) { Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | case "0/7/4": messageType = "sensor"; notif.setType("humidity"); processedEvent = Float.toString(knxSensorHumidity(pe)); notif.setValue(processedEvent); // and so on… break; } ! if (spec.getCommands().containsKey(messageType)) { // Does the MDB support this message? Method mdbMethod = spec.getCommands().get(messageType); try { callMdb(mdb, mdbMethod, notif); } catch (ResourceException ex) { // Ooops! } } else { // Unknown command ?! } 50
  • 51. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | KnxMessage ! /* Annotation to decorate methods in the MDB */ @Target({ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) public @interface KnxMessage { String type() default ""; String info() default ""; } 51
  • 52. Inbound connector private Notif callMdb(MessageEndpoint mdb, Method command, Notification param) Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | throws ResourceException { ! try { mdb.beforeDelivery(command); Object ret = command.invoke(mdb, param); notif = (Notif) ret; } catch (NoSuchMethodException | ResourceException | IllegalAccessException | IllegalArgumentException |InvocationTargetException ex) { // MDB invocation error :( … } mdb.afterDelivery(); return notif; } 52
  • 53. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | KNX MDB 53 @MessageDriven( activationConfig = { @ActivationConfigProperty( propertyName = “knx", propertyValue = "10.0.0.60") } ) ! public class KnxMdb implements KnxListener { ! @KnxMessage(type="sensor") public void handleKnxSensor(Notification notif) { … } @KnxMessage(type=“switch") public void switchKnx(Notification notif) { … } ! }
  • 54. Java Connector Architecture 1.7 Outbound Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 54 JSR 322 Java EE Container Java EE Application Resource Adapter EIS
  • 55. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | And more… • EJB • CDI Interceptors • JAX-­‐RS Interceptors • Concurrency Utilities for Java EE • Java Persistence API • JavaServer Faces • OpenMQ Stomp support • Jersey SSE, MVC… 55
  • 56. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Program Agenda Home Automation Java EE Demo Wrap-­‐up 1 2 3 4 56
  • 57. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Dashboard • HTML Client - “Pure” JS - Real-­‐time notifications via WebSocket - Control devices via REST • Java EE 7 backend - KNX (JCA) & Z-­‐Wave (REST) - In & Outbound 57
  • 58. KNX Sensors Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | KNX Bus Bus Power Supply IP KNX KNX Output module VPN IP Java EE 110/220v 58 KNX Output module KNX Input module KNX Input module KNX Input module Z-­‐Wave Output module Z-­‐Wave KNX Sensors Z-­‐Wave Input module Demo JCA REST
  • 59. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Program Agenda Home Automation Java EE Demo Wrap-­‐up 1 2 3 4 59
  • 60. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | • Connectivity - JAX-­‐RS, JCA, WebSocket, JMS… • ‘Event’ driven capabilities - MDB, CDI event • Non blocking IO • Asynchronous • Scheduling • Persistence • Component models • UI - JSF, JAX-­‐RS • Container - Lifecycle - Monitoring & Management - Ressources pooling - Logging - … Java EE for Home Automation 60
  • 61. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | What’s next • PoC - KNX, Z-­‐Wave & InfraRed • Improvements - Additional ‘connectors’, e.g. RF433 - More types, e.g. range for blinders - State Management - User interface - Add ‘scenario’s - Leverage Java EE more, e.g. CDI Interceptors 61
  • 62. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Java EE and IoT • Connected devices • Messages / data producer • Data aggregation / processing - Deeper in the network • Scaling • Security 62
  • 63. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Java EE 8 • CDI 2.0 • JMS 2.1 • MVC 1.0 • JAX-­‐RS 2.1 • JSON-­‐B + JSON-­‐P TBC! 63
  • 64. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Resources • The Java EE 7 Tutorial - http://docs.oracle.com/javaee/7/tutorial/doc/home.htm • GlassFish 4.1 - http://glassfish.org • NetBeans 8.0.1 - http://netbeans.org 64
  • 65. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 65
  • 66. 66
  • 67. 67