Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Java @ Cloud - Setor Público SP

1º meetup de Java & Nuvem para Setor Público.

  • Be the first to comment

Java @ Cloud - Setor Público SP

  1. 1. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Java @ Cloud – 1º meetup - Gov SP
  2. 2. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Quem vos fala… 2 { name : “Ilan Salviano", title : “Solution Specialist", location : “Brasília, BR” company : “Oracle” email : ilan.salviano@oracle.com twitter : “@ilansalviano” xbox : ”Ilan MoFo” }
  3. 3. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 3 Declaração de Salvaguarda 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. Este documento visa descrever nossa direção geral em termos de produtos. Por destinar-se a fins exclusivamente informativos, não poderá ser incorporado a nenhum contrato. Este documento não consiste em compromisso de entregar nenhum material, código ou funcionalidade, tampouco deve servir de base para decisões de compras. O desenvolvimento, a liberação e a coordenação de recursos ou funcionalidades dos produtos Oracle aqui descritas permanecem sob exclusivo critério da Oracle.
  4. 4. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Java news update 4
  5. 5. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 5 1. Process API Updates 2. HTTP 2 Client 3. Improve Contended Locking 4. Unified JVM Logging 5. Compiler Control 6. Variable Handles 7. Segmented Code Cache 8. Smart Java Compilation, Phase Two 9. The Modular JDK 10. Modular Source Code 11. Elide Deprecation Warnings on Import Statements 12. Resolve Lint and Doclint Warnings 13. Milling Project Coin 14. Remove GC Combinations Deprecated in JDK 8 15. Tiered Attribution for javac 16. Process Import Statements Correctly 17. Annotations Pipeline 2.0 18. Datagram Transport Layer Security (DTLS) 19. Modular Run-Time Images 20. Simplified Doclet API 21. jshell: The Java Shell (Read-Eval-Print Loop) 22. New Version-String Scheme 23. HTML5 Javadoc 24. Javadoc Search 25. UTF-8 Property Files 26. Unicode 7.0 27. Add More Diagnostic Commands 28. Create PKCS12 Keystores by Default 29. Remove Launch-Time JRE Version Selection 30. Improve Secure Application Performance 31. Generate Run-Time Compiler Tests Automatically 32. Test Class-File Attributes Generated by javac 33. Parser API for Nashorn 34. Linux/AArch64 Port 35. Multi-Release JAR Files 36. Remove the JVM TI hprof Agent 37. Remove the jhat Tool 38. Java-Level JVM Compiler Interface 39. TLS Application-Layer Protocol Negotiation Extension 40. Validate JVM Command-Line Flag Arguments 41. Leverage CPU Instructions for GHASH and RSA 42. Compile for Older Platform Versions 43. Make G1 the Default Garbage Collector 44. OCSP Stapling for TLS 45. Store Interned Strings in CDS Archives 46. Multi-Resolution Images 47. Use CLDR Locale Data by Default 48. Prepare JavaFX UI Controls & CSS APIs for Modularization 49. Compact Strings 50. Merge Selected Xerces 2.11.0 Updates into JAXP 51. BeanInfo Annotations 52. Update JavaFX/Media to Newer Version of GStreamer 53. HarfBuzz Font-Layout Engine 54. Stack-Walking API 55. Encapsulate Most Internal APIs 56. Module System 57. TIFF Image I/O 58. HiDPI Graphics on Windows and Linux 59. Platform Logging API and Service 60. Marlin Graphics Renderer 61. More Concurrency Updates 62. Unicode 8.0 63. XML Catalogs 64. Convenience Factory Methods for Collections 65. Reserved Stack Areas for Critical Sections 66. Unified GC Logging 67. Platform-Specific Desktop Features 68. DRBG-Based SecureRandom Implementations 69. Enhanced Method Handles 70. Modular Java Application Packaging 71. Dynamic Linking of Language-Defined Object Models 72. Enhanced Deprecation 73. Additional Tests for Humongous Objects in G1 74. Improve Test-Failure Troubleshooting 75. Indify String Concatenation 76. HotSpot C++ Unit-Test Framework 77. jlink: The Java Linker 78. Enable GTK 3 on Linux 79. New HotSpot Build System 80. Spin-Wait Hints 81. SHA-3 Hash Algorithms 82. Disable SHA-1 Certificates 83. Deprecate the Applet API: Filter Incoming Serialization Data 84. Deprecate the Concurrent Mark Sweep (CMS) Garbage Collector 85. Implement Selected ECMAScript 6 Features in Nashorn 86. Linux/s390x Port 87. Ahead-of-Time Compilation 88. Unified arm32/arm64 Port 89. Remove Demos and Samples 90. Reorganize Documentation http://openjdk.java.net/projects/jdk9/ Novidades, melhorias, aposentadorias, etc…
  6. 6. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 6 • Modularity • Developer Convenience • Strings • Diagnostics • JVM options • Logging • Javadoc • JavaScript/HTTP • Native Platform • JavaFX Destaques IMHO :
  7. 7. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 7 • Modularity • Developer Convenience • Strings • Diagnostics • JVM options • Logging • Javadoc • JavaScript/HTTP • Native Platform • JavaFX Destaques IMHO : hello-jigsaw └── mods │ └── br.com.ilan.jigsaw │ ├── br │ │ └── com │ │ └── ilan │ │ └── jigsaw │ │ └── JigSaw.class │ └── module-info.class └── src └── br.com.ilan.jigsaw ├── br │ └── com │ └── ilan │ └── jigsaw │ └── JigSaw.java └── module-info.java package br.com.ilan.jigsaw; class JigSaw { public static void main (String... args) { System.out.println(”Hello from Java 9!"); } } java –module-path mods/ -m br.com.ilan.jigsaw/br.com.ilan.jigsaw.JigSaw
  8. 8. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 8 • Modularity • Developer Convenience • Strings • Diagnostics • JVM options • Logging • Javadoc • JavaScript/HTTP • Native Platform • JavaFX Destaques IMHO : • -Xloggc -> Padronização de todos os logs dos sistemas da JVM • G1 agora é o default GC da JVM. Parallel GC era o antigo. • Pequena lista das options removidas: -XX:-UseParNewGC -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -Xincgc -XX:+CMSIncrementalMode -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:+UseConcMarkSweepGC -XX:-UseParNewGC -XX:+UseCMSCompactAtFullCollection -XX:+CMSFullGCsBeforeCompaction -XX:+UseCMSCollectionPassing
  9. 9. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 9 • Modularity • Developer Convenience • Strings • Diagnostics • JVM options • Logging • Javadoc • JavaScript/HTTP • Native Platform • JavaFX Destaques IMHO : • HttpURLConnection foi substituída por HttpClient HttpRequest req = HttpRequest .create(new URI("http://www.slow.com")) .body(noBody()) .GET(); CompletableFuture<HttpResponse> aResp = req.sendAsync(); Thread.sleep(10); // use com sabedoria if (!aResp.isDone()) { aResp.cancel(true); System.out.println(”Lento demais..."); return; } HttpResponse response = aResp.get();
  10. 10. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 10 https://dev.eclipse.org/mailman/listinfo/ee4j-community
  11. 11. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 11 Java na Nuvem
  12. 12. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | O que eu mais escuto por ai… 12 15 50 15 20 0 10 20 30 40 50 60 Vou ficar preso ao fornecedor X Meus dados não estão comigo Não vou ter liberdade no desenvolvimento Não vou ter acesso aos meus logs Preocupações com Nuvem %
  13. 13. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Por que devo dar atenção à Nuvem ? 13 https://exame.abril.com.br/carreira/estes-sao-os-cargos-de-ti-em-alta-e-em-baixa-no-brasil/ Relatório da HAYS para 2017 no Brasil Cargos em Alta Cargos em baixa Especialista em Cloud & DevOps Analista de rede de telefonia Analista / Gerente Segurança Informação Coordenador / Analista de infraestrutura não-virtualizada Analista / engenheiro / cientista de dados
  14. 14. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Tipos de Aplicativos Java na Nuvem • Cloud Native Apps – Poliglota, desenvolvimento microserviço baseado em Docker com DevOps integrado – Utilizando Coherence Cloud, DB RAC Cloud , Multi Data Center/Availability Domains • Modern Java Apps – Modernização de Aplicativos Java Corporativos com WebLogic, SOA, BPM (Fusion Middleware) de base instalada – Utilizando Coherence Cloud, DB RAC Cloud , Multi Data Center/Availability Domains • Mobile Apps – Simplificando Desenvolvimento de iOS/Android/Hybrid com – Construído com mobile API analytics, API catalog e serviços mobile - push notification, synch, location … • Apps de Negócio – Desevolvimento de aplicativos de forma Declarativa com Drag & Drop para o usuário final ”ninja”. – Pré-integrado para estender o Oracle SaaS com PaaS – HCM, Sales, Service, ERP, Talent, Marketing 14
  15. 15. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Tipos de Aplicativos Java na Nuvem – Gov. • Cloud Native Apps – Poliglota, desenvolvimento microserviço baseado em Docker com DevOps integrado – Utilizando Coherence Cloud, DB RAC Cloud , Multi Data Center/Availability Domains • Modern Java Apps – Modernização de Aplicativos Java Corporativos com WebLogic, SOA, BPM (Fusion Middleware) de base instalada – Utilizando Coherence Cloud, DB RAC Cloud , Multi Data Center/Availability Domains • Mobile Apps – Simplificando Desenvolvimento de iOS/Android/Hybrid com – Construído com mobile API analytics, API catalog e serviços mobile - push notification, synch, location … • Apps de Negócio – Desevolvimento de aplicativos de forma Declarativa com Drag & Drop para o usuário final ”ninja”. – Pré-integrado para estender o Oracle SaaS com PaaS – HCM, Sales, Service, ERP, Talent, Marketing 15
  16. 16. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 16 Passo 1 Cloud Native Apps Criar um Projeto Java $ mvn archetype:generate -DarchetypeArtifactId=jersey-quickstart-grizzly2 - DarchetypeGroupId=org.glassfish.jersey.archetypes -DinteractiveMode=false - DgroupId=com.example -DartifactId=simple-service -Dpackage=com.example - DarchetypeVersion=2.25.1
  17. 17. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 17 Passo 2 Cloud Native Apps Preparar App. Cloud Deploy { "runtime":{ "majorVersion": "8" }, "command": "java -jar simple-service-1.0-SNAPSHOT-jar-with-dependencies.jar", "release": { "build": "20170113Build", "commit": "commitString", "version": "20170113Version" }, "notes": "REST app for testing" } Import java.util.Optional; … private static final Optional<String> port = Optional.ofNullable(System.getenv("PORT")); public static final String BASE_URI = "http://0.0.0.0:"+port.orElse("8080")+"/myapp/"; $ mvn compile package manifest.json 2.1 2.2 2.3
  18. 18. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 18 Passo 3 Cloud Native Apps Deploy na nuvem simple-service-1.0-SNAPSHOT-dist.zip
  19. 19. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 19 Passo 3 Cloud Native Apps Deploy na nuvem +/- 15 min.
  20. 20. Aplicações Java Web / EE
  21. 21. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 21 Java Web / EE
  22. 22. Aplicativos Móveis
  23. 23. http://www.saude.ba.gov.br/novoportal/index.php?option=com_content&view=article&id=10137:bahia-lanca- aplicativo-que-permite-mapear-focos-do-mosquito-aedes-aegypti&catid=13:noticias&Itemid=25
  24. 24. Service Bus + API
  25. 25. O que devo olhar em uma Cloud ?
  26. 26. 12200 2700 0 2000 4000 6000 8000 10000 12000 14000 WLS On-Premisse (Price List) WLS @ Cloud On Premisse vs Nuvem Preço em $ Preço…
  27. 27. Conformidade… • Acórdão TCU 1739 • Outras leis e normas (Lei 8135, IN-GSI 19, Marco Civil) • Portaria SLTI 86/14 e Manual de Orientação para uso de cloud (2016) (SISP – Poder Executivo)
  28. 28. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 28
  29. 29. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 29

×