37
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Tweet for Beer! Beer Tap Powered by Java Goes IoT, Cloud, and JavaFX Java end-to-end to pour some beer Bruno Borges Principal Product Manager Developer Advocate Oracle Corp. May 2015

Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Embed Size (px)

Citation preview

Page 1: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Tweet for Beer! Beer Tap Powered by Java Goes IoT, Cloud, and JavaFX Java end-to-end to pour some beer

Bruno Borges Principal Product Manager – Developer Advocate Oracle Corp. May 2015

Page 2: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Speaker

• Bruno Borges

– Principal Product Manager – Developer Advocate

– Oracle Corp.

– @brunoborges – [email protected]

Page 3: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

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.

Page 4: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Internet of Things Changes Everything

• FDA (USA) and EU CE approved ingestible and wearable sensors.

• Delivers precise information about medication ingestion, dose timing and associated physiologic response of patients, including heart rate, activity, rest, and skin temperature.

Page 5: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Connecting Devices to the Internet

Connected Devices Big Data Responsiveness

Analysis for decision making and

automation of information flows

Proprietary connectors No or limited local

intelligence

Decisions in the backend

Data to Fuel the Services

Page 6: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

The Internet of Things

Intelligent Devices Big and Fast Data Responsiveness

High Frequency Analysis for instant evolution, decision

making and automation of

information flows

Always available Local store and

Local decision making

True customer service differentiation enabled

by easy access to applications, processes

and services

Data to Fuel the Services

Value From Services

Page 7: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Driving New IoT Services

• Better Customer Experience

• New Business Models

• Operational Improvements

• Increased Efficiency

Grow Revenue

Reduce Cost

• HVAC • Lighting • Safety and Security • Resource Utilization • Maintenance

• Preventative Maintenance • Remote Diagnostics • Safety Systems • V2X and C2X • Fleet and Use Management

Shareholder Value

Page 8: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Today: Slow and Painful

Incident Scheduling Diagnostic Scheduling Parts Mgt Customer

Care Repair Billing

Loyalty Program

Concerns: Cost, Wasted time, Scheduling, Loss of Use

Concerns: Customer Satisfaction, Cost, Resource Availability, Scheduling

Browser

Supply Chain

Ordering

Scheduling

CRM

Middleware Applications

Page 9: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Tomorrow: Improving Customer Experience

Incident

Scheduling

Diagnostic

Parts Mgt Repair Billing

Customer Care - Loyalty

IoT

Supply Chain

Ordering

Scheduling

CRM

Middleware Enterprise Device

Page 10: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Increasing Intelligence

IoT

Supply Chain

Ordering

Scheduling

CRM

Middleware Enterprise Device

Incident

Customer Care - Loyalty

Scheduling

Diagnostic

Parts Mgt Repair Billing

Analytics • Additional up-sell and

cross-sell opportunities

• Customer for a lifetime versus customer for a transaction

• Multiple function-based processes versus lifetime relationships across functions

Page 11: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Unlocking the Value of IoT Data

• Volume, Velocity and Variety

Time

Bu

sin

ess

Val

ue

Engine STOP

HOT Warning – maintenance required

WARM

Piece of trim gone: note for future development

COLD

Page 12: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Tweet for Beer Project

Page 13: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

+ =

Page 14: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Page 15: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Page 16: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Page 17: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Page 18: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

#FUUUUU

Page 19: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Watch demo video on YouTube https://youtu.be/UbdXGNEHieo

Page 20: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Page 21: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Token Generation – Simple Random!

Page 22: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Reading Twitter Stream with Apache Camel

Page 23: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Reading Twitter Stream with Apache Camel

Page 24: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Reading Twitter Stream with Apache Camel

Page 25: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

REST Service in the Oracle Java Cloud Service @Path("turnon“) public class TurnonResource {

@Context ServletContext servletContext;

@PUT @Consumes("text/plain") @Produces("text/plain")

public String putText(String cmd) {

servletContext.setAttribute(“TURNON", cmd); return "Received: " + cmd;

} @GET @Produces("text/plain")

public String getText() {

String cmd = (String) servletContext.getAttribute(“TURNON"); servletContext.removeAttribute(“TURNON"); return cmd;

} }

Page 26: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Oracle Java Cloud Service cloud.oracle.com DEMO Dashboard

Page 27: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Oracle Company Confidential – Shared

42

Page 28: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Oracle Company Confidential – Shared

43

Page 29: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Oracle Java Cloud Service

• Popular IDEs supported

• Plugins for Ant and Maven

• Oracle Java Cloud Service SDK available

• Deploy to the Cloud

• Visualize logs

• Visualize metrics

Integrated IDEs

REST

Page 30: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Turning On the Beer Tap with GPIO

Page 31: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Dumb loop connects to the Cloud

Don’t do this at home (or work)

Page 32: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Dumb loop connects to the Cloud

Page 33: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Java EE 7 – JAX-RS 2.0 Client API

public String readFromCloud() {

Client client = ClientBuilder.newClient();

WebTarget target = client.target(URL_CLOUD_REST_SERVICE);

String cmd = target.request().get(String.class);

return “true”.equals(cmd) ? “1” : “0”;

}

Page 34: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Java GPIO on Raspberry Pi with pi4j

Page 35: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Device Cloud

IoT Cloud Service

Enterprise Orchestration

The Building Blocks for IoT

Page 36: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX

Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |

Oracle Internet of Things Cloud Service

Endpoint Management

Message delivery & Event Cache

Stream Processing

Device Software Management

Event and Metadata Store

Device with IoT Cloud Service

Gateway software

Mobile app using IoT Cloud Service SDK

Device integrated with IoT Cloud Service SDK

2G/3G/LTE Network

WWAN

Oracle Integration Cloud

Service

Oracle Business Intelligence

Cloud Service

Firewall

IoT Cloud Service Gateway & SDKs

Other Devices

Other Cloud Services

IoT Cloud Service

Event Dispatcher Database-as-a-

Service

Custom Application

Charging and Billing

CRM / OM / SFA

ERP • Financials • SCM • HCM

Industry Vertical

Applications

Field Service

Enterprise Cloud or On Premise

Page 37: Tweet for Beer - Beertap Powered by Java Goes IoT, Cloud, and JavaFX