tweet4beer (atualizada): torneira de chopp controlada por java, javafx, iot e nuvem 
TRANSCRIPT
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Tweet4Beer: Torneira de Chopp Controlada por Java, JavaFX, IoT e Nuvem
@BrunoBorges Principal Product Manager
@MarcoMaciel Principal Sales Consultant
Oracle LaEn America – Agosto, 2014
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Oracle’s Internet of Things PlaMorm – D2D
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 3
Soluções Java para Embarcados e Internet of Things
Java ME
Java SE Embedded
Java Embedded Suite OEP for Oracle Java
Embedded
Java Card
SECURITY SMALL MEDIUM LARGE
50KB-‐1MB
1MB-‐10MB
10MB-‐100MB
Device CPU/ GPU/I-‐O
Footprint
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Java ME Não é mais sobre celulares!
• De disposiQvos low-‐end a mid-‐range • DisposiQvos com 130KB a 32MB de memória • Apps sem interface gráfica • Microcontroller, RTOS ou Sistemas Operacionais mínimos • Módulso wireless, smart metering, eHealth, IoT / M2M em geral
4
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Java SE Embedded • O mesmo Java que roda no seu computador, mas com foco em disposiQvos embarcados
• Mid-‐range to high-‐end devices • Full compaQbility with Java SE • JavaFX support • ARM v5/6/7 • ARM Cortex-‐A • Your Java knowledge, now in embedded devices!
5
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Java SE -‐ JavaFX Embedded Profiles
• Plataforma de Referência – BeagleBoard XM com PowerVR SGX530 GPU
• Roda também em: – Raspberry Pi – Freescale iMX53 & IMX6 boards – PandaBoard
Plataformas de Hardware para FX Embedded
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Real World Deployments
• RFID Readers • Parking Meters
• Intelligent Power Module
• Wireless Modules
• Routers & Switches • Storage Appliances • Network Management Systems
• Factory AutomaQon Systems
• Security Systems
• Smart Meters
• MulQ FuncQon Printers • ATMs • POS Systems • In-‐Flight Entertainment Systems • Electronic VoQng Systems • Medical Imaging Systems
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Java Tweet for Beer
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
+
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
+ =
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
+ =
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Cloud
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Cloud
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Cloud
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
#XATIADO
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
G
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Geração do Token
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Twijer Stream com Apache Camel
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Twijer Stream com Apache Camel
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Twijer Stream com Apache Camel
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Serviço REST no Oracle Java Cloud Service
• Serviço simples JAX-‐RS – Comando POST
• Chamado pela aplicação JavaFX (via Apache Camel) para aQvar o comando de “LIGAR”
– Comando GET • Chamado pela aplicação Java console conectada ao relê da chopeira para obter o estado atual do comando LIGAR
Aplicações Java EE
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Serviço REST no Oracle Java Cloud Service @Path("turnon") public class TurnonResource { @Context ServletContext servletContext; @GET @Produces("text/plain") public String getText() { String comando = (String) servletContext.getAjribute("LIGAR"); servletContext.removeAjribute("LIGAR"); return comando; } @PUT @Consumes("text/plain") @Produces("text/plain") public String putText(String comando) { servletContext.setAjribute("LIGAR", comando); return "Received: " + comando; } }
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Oracle Java Cloud Service cloud.oracle.com DEMO Dashboard
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Oracle Java Cloud Service
• Suporte a IDEs Populares • Plugins disponíveis para os principais build tools
• Oracle Java Cloud Service SDK disponível
• Deploy direto na nuvem • Visualize logs • Visualize métricas
IDEs Integradas
REST
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Acionando a Chopeira com GPIO
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Conecta com a Nuvem
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 comando = target.request().get(String.class); return “LIGAR”.equals(comando) ? 1 : 0; }
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Java GPIO no Raspberry Pi (pi4j)
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Acionando a Chopeira com GPIO -‐ HARD Usando Oracle Event Processing for Java Embedded
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Perguntas?
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |