<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Niklas Heidloff</title>
    <description>The latest articles on Forem by Niklas Heidloff (@nheidloff).</description>
    <link>https://forem.com/nheidloff</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F138852%2F658e89d1-dfec-4bbe-b73a-e5a69b470e2a.jpg</url>
      <title>Forem: Niklas Heidloff</title>
      <link>https://forem.com/nheidloff</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/nheidloff"/>
    <language>en</language>
    <item>
      <title>New Open-Source Multi-Cloud Asset to build SaaS</title>
      <dc:creator>Niklas Heidloff</dc:creator>
      <pubDate>Thu, 03 Feb 2022 07:29:46 +0000</pubDate>
      <link>https://forem.com/nheidloff/new-open-source-multi-cloud-asset-to-build-saas-1b08</link>
      <guid>https://forem.com/nheidloff/new-open-source-multi-cloud-asset-to-build-saas-1b08</guid>
      <description>&lt;p&gt;Over the last months I’ve worked with many companies who want to build SaaS (Software as a Service) to scale their solutions to new markets and to save costs. To address these needs, our team has produced an asset that demonstrates how to build cloud-native applications that can be deployed to multiple clouds and how they can be exposed in multiple marketplaces. Red Hat OpenShift is a perfect technology to address these requirements.&lt;/p&gt;

&lt;p&gt;Check out the &lt;a href="https://github.com/IBM/multi-tenancy"&gt;SaaS&lt;/a&gt; repo.&lt;/p&gt;

&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;When software is provided as a managed service (SaaS), using a multi-tenant approach helps minimise costs for the deployments and operations of each tenant.  In order to leverage these advantages, applications need to be designed so that they can be deployed to support multiple tenants, while maintaining isolation for security reasons.  At the same time, common deployment and operation models are required so that new SaaS versions can be deployed to existing tenants, or to onboard new tenants, in a reliable and efficient way.&lt;/p&gt;

&lt;p&gt;A new &lt;a href="https://github.com/IBM/multi-tenancy"&gt;open-source project&lt;/a&gt; from IBM developers aims to support a DevSecOps approach to building multi-tenant SaaS for different platforms including Kubernetes, Red Hat OpenShift, IBM Code Engine (serverless), IBM Satellite, and public clouds including IBM Cloud, AWS and Azure.  The asset includes DevSecOps toolchains to automate the process for deploying a sample cloud native application to a common platform and create per-tenant cloud services for persistence and authentication.&lt;/p&gt;

&lt;p&gt;The initial release uses Continuous Integration and Continuous Delivery (CI/CD) toolchains on IBM Cloud to deploy SaaS to IBM Code Engine, Red Hat OpenShift on IBM Cloud, or IBM Kubernetes Service on IBM Cloud.  We have plans to extend the deployment to support multi-cloud using Red Hat OpenShift on AWS (ROSA) and Azure Red Hat OpenShift (ARO).&lt;/p&gt;

&lt;p&gt;This asset has been created by IBM's Build Labs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/in/deleeuwa/"&gt;Adam de Leeuw&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitter.com/AAairom"&gt;Alain Airom&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitter.com/nheidloff"&gt;Niklas Heidloff&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitter.com/tsuedbroecker"&gt;Thomas Suedbroecker&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Challenges
&lt;/h3&gt;

&lt;p&gt;Organisations offering SaaS will need to deliver rapidly and often, while maintaining a strong security posture and continuous state of audit-readiness.  Achieving this goal involves several teams including developers, IT operations and security.  DevSecOps integrates a set of security and compliance controls and makes application and infrastructure security a shared responsibility for all these teams, and automatically bakes in security at every phase of the software development lifecycle, bringing speed and security.  This is of particular importance for SaaS where the challenges and benefits are a factor of the number of tenants!&lt;/p&gt;

&lt;p&gt;The project provides a starting point for learning how to create an application which is ready for SaaS, using best practices for DevSecOps such as detecting code or container vulnerabilities, and using CI/CD pipelines to automate deployments.  The key value of this asset is that it shows how to reuse the same application code, containers, and CI/CD, with the flexibility to deploy to a dedicated or shared Kubernetes cluster, while maintaining isolation and security.&lt;/p&gt;

&lt;h3&gt;
  
  
  Support for multiple platforms
&lt;/h3&gt;

&lt;p&gt;The following diagram shows the different deployment platform options, currently including several alternatives for IBM Cloud, as indicated by the green boxes.  The orange boxes represent planned future developments, including the addition of IBM Cloud Satellite which will allow the SaaS application to be deployed on-premises at client data centers, while still taking advantage of an OpenShift cluster managed by IBM Cloud.  Additionally, the same SaaS application could be deployed to other managed OpenShift services like AWS ROSA and Azure ARO.&lt;/p&gt;

&lt;p&gt;The easiest way to get started is with serverless, using the fully managed IBM Code Engine platform to run the application.  For more advanced cloud-native applications, a dedicated Kubernetes or OpenShift cluster can be used.  Compute isolation can be achieved with a shared cluster using Kubernetes namespaces/OpenShift projects, or by having dedicated clusters for each SaaS tenant.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tRhG3SQo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://heidloff.net/wp-content/uploads/2022/02/Options-Simple.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tRhG3SQo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://heidloff.net/wp-content/uploads/2022/02/Options-Simple.png" width="880" height="413"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Core technologies used:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Kubernetes using either IBM Kubernetes Service or OpenShift on IBM Cloud&lt;/li&gt;
&lt;li&gt;IBM Code Engine (serverless)&lt;/li&gt;
&lt;li&gt;IBM Continuous Delivery CI/CD pipelines using Tekton&lt;/li&gt;
&lt;li&gt;IBM Cloud Databases for PostgreSQL&lt;/li&gt;
&lt;li&gt;IBM App ID&lt;/li&gt;
&lt;li&gt;IBM Container Registry&lt;/li&gt;
&lt;li&gt;Terraform&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Sample e-commerce application
&lt;/h3&gt;

&lt;p&gt;A sample e-commerce application is provided, which is deployed as two containers.  A frontend web application displays a catalogue of products.  The data for the catalogue is provided by a backend microservice.  Configuration properties are used extensively to customise both the frontend and backend at deployment time, including titles, connection details for the PostgreSQL database and authentication service etc.  This means the same e-commerce sample application can easily be used for multiple tenants, perhaps one selling books, the other shoes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Automation first
&lt;/h3&gt;

&lt;p&gt;Everything in this project embraces automation and a series of approaches to deploy SaaS are provided, each with an increasing degree of capability.  You are able to start with any of the following approaches:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Simple bash scripts to create and deploy the sample application container images, and the PostgreSQL and AppID cloud services.&lt;/li&gt;
&lt;li&gt;A simple DevOps toolchain with CI/CD pipelines which deploys to IBM Code Engine.  The pipelines orchestrate build, test, and deployment jobs (optionally across multiple environments) as changes progress from the developer to production.&lt;/li&gt;
&lt;li&gt;A more comprehensive DevSecOps toolchain which deploys to a Kubernetes cluster.  This brings a more robust process where the CI/CD pipelines ensure that code is scanned for security vulnerabilities (e.g. secrets or credentials), and repository branch protection prevents a developer from directly updating the main branch without first issuing a pull/merge request to be approved by a second developer.  In addition, the container images are scanned for vulnerabilities, a dynamic application security testing tool looks for vulnerabilities in the deployed application, and application acceptance tests all contribute to a secure and quality assured release.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Any of these approaches are ready to deploy the multiple tenancies of a SaaS application.  Simply change the externalised properties and re-run the script or trigger the pipelines.&lt;/p&gt;

&lt;p&gt;For deployments to IBM Kubernetes Service or OpenShift, terraform templates are also provided to automate the cluster creation on IBM Cloud.&lt;/p&gt;

&lt;h3&gt;
  
  
  Ready for regulated industries
&lt;/h3&gt;

&lt;p&gt;Regulated industries such as financial institutions, insurance, healthcare and more, all want the advantages of a hybrid cloud, but need assurance they can protect their assets and maintain compliance with industry and regulatory requirements.  The key to hosting regulated workloads in the cloud is to eliminate and mitigate the risks that might be standing in the way of progress.  In regulated industries, critical risks fall into the general categories of compliance, cybersecurity, governance, business continuity and resilience.  &lt;/p&gt;

&lt;p&gt;The DevSecOps approach of our CI/CD pipelines are based an &lt;a href="https://www.ibm.com/cloud/blog/announcements/devsecops-reference-implementation-for-audit-ready-compliance-across-development-teams"&gt;IBM DevSecOps reference architecture&lt;/a&gt;, helping to address some of the risks faced by regulated industries.  The CI/CD pipelines include steps to collect and upload deployment log files, artifacts, and evidence to a secure evidence locker.  In addition, a toolchain integration to &lt;a href="https://cloud.ibm.com/docs/devsecops?topic=ContinuousDelivery-scc"&gt;IBM Security and Compliance Center&lt;/a&gt; verifies the security and compliance posture of the toolchain by identifying the location of the evidence locker, and the presence of the evidence information.&lt;/p&gt;

&lt;h3&gt;
  
  
  What's next?
&lt;/h3&gt;

&lt;p&gt;Our project is constantly evolving.  You can expect more supported platforms including IBM Cloud Satellite and other public clouds including support for their native database and authentication services.  We still have some work to do on the documentation, e.g. explaining how to observe multi-tenant runtime logs, and understand how much cloud resource each tenant is consuming, to help calculate the bills.&lt;/p&gt;

&lt;p&gt;In the meantime, we invite you to explore the &lt;a href="https://github.com/IBM/multi-tenancy"&gt;repo&lt;/a&gt; and give it a try.  Why not start by using our most simple script-based approach with IBM Code Engine, and see for yourself how easy it is is to be a SaaS provider!  We would also be happy to work together with you on using this asset to build your SaaS.&lt;/p&gt;

&lt;p&gt;If you have feedback or comments, please don't hesitate to get in touch via our social media links above.&lt;/p&gt;

</description>
      <category>saas</category>
      <category>development</category>
      <category>devops</category>
      <category>cloudnative</category>
    </item>
    <item>
      <title>Accessing Apache Kafka from Quarkus</title>
      <dc:creator>Niklas Heidloff</dc:creator>
      <pubDate>Wed, 18 Mar 2020 10:23:11 +0000</pubDate>
      <link>https://forem.com/nheidloff/accessing-apache-kafka-from-quarkus-30na</link>
      <guid>https://forem.com/nheidloff/accessing-apache-kafka-from-quarkus-30na</guid>
      <description>&lt;p&gt;This article describes how to develop microservices with &lt;a href="https://quarkus.io/"&gt;Quarkus&lt;/a&gt; which use &lt;a href="https://kafka.apache.org/"&gt;Apache Kafka&lt;/a&gt; running in a Kubernetes cluster.&lt;/p&gt;

&lt;p&gt;Quarkus supports &lt;a href="https://github.com/eclipse/microprofile-reactive-messaging"&gt;MicroProfile Reactive Messaging&lt;/a&gt; to interact with Apache Kafka. There is a nice guide &lt;a href="https://quarkus.io/guides/kafka"&gt;Using Apache Kafka with reactive Messaging&lt;/a&gt; which explains how to send and receive messages to and from Kafka.&lt;/p&gt;

&lt;p&gt;The guide contains instructions how to run Kafka locally via Docker with docker-compose. While this is probably the easiest way to get started, the next step for microservices developers is often to figure out how to access Apache Kafka in Kubernetes environments or hosted Kafka services.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Option 1: Apache Kafka running in Kubernetes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The open source project &lt;a href="https://strimzi.io/"&gt;Strimzi&lt;/a&gt; provides container images and operators for running Apache Kafka on Kubernetes and Red Hat OpenShift. There is a nice &lt;a href="https://developers.redhat.com/blog/2019/06/06/accessing-apache-kafka-in-strimzi-part-1-introduction/"&gt;blog series&lt;/a&gt; on Red Hat Developer that describes how to use Strimzi. In order to access it from applications there are several different options, for example NodePorts, OpenShift routes, load balancers and Ingress.&lt;/p&gt;

&lt;p&gt;Sometimes these options can be overwhelming for developers, especially when all you need is a simple development environment to write some reactive hello world applications to get started. In my case I wanted to install a simple Kafka server in my Minikube cluster.&lt;/p&gt;

&lt;p&gt;There is a &lt;a href="https://strimzi.io/quickstarts/minikube/"&gt;quickstart&lt;/a&gt; guide how to deploy Strimzi to Minikube. Unfortunately it doesn’t explain how to access it from applications. The second part of the blog series &lt;a href="https://developers.redhat.com/blog/2019/06/07/accessing-apache-kafka-in-strimzi-part-2-node-ports/"&gt;Accessing Apache Kafka in Strimzi: Part 2 – Node ports&lt;/a&gt; explains this.&lt;/p&gt;

&lt;p&gt;Based on these two articles I wrote a simple script that deploys Kafka to Minikube in less than 5 minutes. The script is part of the &lt;a href="https://github.com/IBM/cloud-native-starter/tree/master/reactive"&gt;cloud-native-starter&lt;/a&gt; project. Run these commands to give it a try:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ git clone https://github.com/IBM/cloud-native-starter.git
$ cd cloud-native-starter/reactive
$ sh scripts/start-minikube.sh
$ sh scripts/deploy-kafka.sh
$ sh scripts/show-urls.sh
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The output of the last command prints out the URL of the Kafka bootstrap server which you’ll need in the next step. You can find all resources in the ‘kafka’ namespace.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WLdMzazQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://heidloff.net/wp-content/uploads/2020/01/kafka-in-kubernetes.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WLdMzazQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://heidloff.net/wp-content/uploads/2020/01/kafka-in-kubernetes.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In order to access Kafka from Quarkus, the Kafka connector has to be &lt;a href="https://quarkus.io/guides/kafka#configuring-the-kafka-connector"&gt;configured&lt;/a&gt;. When running the Quarkus application in the same Kubernetes cluster as Kafka, use the following configuration in ‘application.properties’. ‘my-cluster-kafka-external-bootstrap’ is the service name, ‘kafka’ the namespace and ‘9094’ the port.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kafka.bootstrap.servers=my-cluster-kafka-external-bootstrap.kafka:9094`
mp.messaging.incoming.new-article-created.connector=smallrye-kafka`
mp.messaging.incoming.new-article-created.value.deserializer=org.apache.kafka.common.serialization.StringDeserializer
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;When developing the Quarkus application locally, Kafka in Minikube is accessed via NodePort. In this case replace the kafka.bootstrap.servers configuration with the following URL:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ minikubeip=$(minikube ip)
$ nodeport=$(kubectl get svc my-cluster-kafka-external-bootstrap -n kafka --ignore-not-found --output 'jsonpath={.spec.ports[*].nodePort}')
$ echo ${minikubeip}:${nodeport}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Option 2: Kafka as a Service&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Most cloud providers also host managed Kafka services. For example &lt;a href="https://cloud.ibm.com/catalog/services/event-streams"&gt;Event Streams&lt;/a&gt; is the managed Kafka service in the IBM Cloud. There is a free lite plan which offers access to a single partition in a multi-tenant Event Streams cluster. All you need is an &lt;a href="http://ibm.biz/nheidloff"&gt;IBM id&lt;/a&gt;, which is free and you don’t need a credit card.&lt;/p&gt;

&lt;p&gt;As most Kafka services in production, Event Streams requires a secure connection. This additional configuration needs to be defined in ‘application.properties’ again.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kafka.bootstrap.servers=broker-0-YOUR-ID.kafka.svc01.us-south.eventstreams.cloud.ibm.com:9093,broker-4-YOUR-ID.kafka.svc01.us-south.eventstreams.cloud.ibm.com:9093,...MORE-SERVERS
mp.messaging.incoming.new-article-created.connector=smallrye-kafka
mp.messaging.incoming.new-article-created.value.deserializer=org.apache.kafka.common.serialization.StringDeserializer
mp.messaging.incoming.new-article-created.sasl.mechanism=PLAIN
mp.messaging.incoming.new-article-created.security.protocol=SASL_SSL
mp.messaging.incoming.new-article-created.ssl.protocol=TLSv1.2
mp.messaging.incoming.new-article-created.sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username="token" password="YOUR-PASSWORD";
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;In order to enter this information, you need 1. the list of Kafka bootstrap servers and 2. your password for the Event streams service. You can receive this information in the web frontend of the Event Streams service or you can use the IBM Cloud CLI.&lt;/p&gt;

&lt;p&gt;My colleague Harald Uebele has developed a &lt;a href="https://github.com/IBM/cloud-native-starter/blob/master/reactive/iks-scripts/deploy-kafka.sh"&gt;script&lt;/a&gt; that creates the service programmatically and returns these two pieces of information.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Next Steps&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The scripts mentioned in this article are part of the cloud-native-starter project which describes how to get develop reactive applications with Quarkus. My previous &lt;a href="http://heidloff.net/article-development-reactive-applications-quarkus/"&gt;article&lt;/a&gt; describes the project.&lt;/p&gt;

&lt;p&gt;Try out the &lt;a href="https://github.com/IBM/cloud-native-starter/tree/master/reactive"&gt;code&lt;/a&gt; yourself.&lt;/p&gt;

&lt;p&gt;Read the other articles of this series:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="http://heidloff.net/article-development-reactive-applications-quarkus/"&gt;Development of Reactive Applications with Quarkus&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="http://heidloff.net/article/accessing-apache-kafka-from-quarkus/"&gt;Accessing Apache Kafka from Quarkus&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="http://heidloff.net/article/accessing-postgresql-from-quarkus/"&gt;Accessing PostgreSQL in Kubernetes from Quarkus&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="http://heidloff.net/article/reactive-messaging-examples-quarkus/"&gt;Reactive Messaging Examples for Quarkus&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="http://heidloff.net/article/developing-reactive-rest-apis-with-quarkus/"&gt;Developing reactive REST APIs with Quarkus&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="http://heidloff.net/article/invoking-rest-apis-asynchronously-with-quarkus/"&gt;Invoking REST APIs asynchronously with Quarkus&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="http://heidloff.net/article/comparing-synchronous-asynchronous-access-postgresql/"&gt;Comparing synchronous and asynchronous Access to Postgres&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>java</category>
      <category>microservices</category>
      <category>reactive</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Development of Reactive Applications with Quarkus</title>
      <dc:creator>Niklas Heidloff</dc:creator>
      <pubDate>Thu, 12 Mar 2020 09:39:46 +0000</pubDate>
      <link>https://forem.com/nheidloff/development-of-reactive-applications-with-quarkus-34p1</link>
      <guid>https://forem.com/nheidloff/development-of-reactive-applications-with-quarkus-34p1</guid>
      <description>&lt;p&gt;In the context of cloud-native applications the topic ‘reactive’ becomes more and more important, since more efficient applications can be built and user experiences can be improved. If you want to learn more about reactive functionality in Java applications, read on and try out the &lt;a href="https://github.com/IBM/cloud-native-starter/tree/master/reactive"&gt;code&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Challenges when getting started with reactive Applications&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;While the topic ‘reactive’ has been around for quite some time, for some developers it’s not straightforward to get started with reactive applications. One reason is that the term is overloaded and describes different aspects, for example reactive programming, reactive systems, reactive manifesto and reactive streams. Another reason is that there are several different frameworks which support different functionality and use other terminologies. For example for me with my JavaScript background it wasn’t obvious to figure out the Java counterparts for JavaScript callbacks, promises and observables. Yet another reason why it can be challenging for some developers to get started is that reactive programming requires a different type of thinking compared to writing imperative code.&lt;/p&gt;

&lt;p&gt;There are a lot of resources available to start learning various reactive concepts. When learning new technologies simple tutorials, samples and guides help to understand specific functions. In order to understand how to use the functions together, it helps me to look at more complete applications with use cases that come closer to what developers need when building enterprise applications. Because of this I’ve implemented a sample application which shows various aspects of reactive programming and reactive systems and which can be easily deployed on Kubernetes platforms.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Architecture of the Sample Application&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Rather than reinventing the wheel, I reused the scenario from the &lt;a href="https://cloud-native-starter.mybluemix.net/"&gt;cloud-native-starter&lt;/a&gt; project which shows how to develop and operate synchronous microservices that use imperative programming.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://github.com/IBM/cloud-native-starter/tree/master/reactive"&gt;sample&lt;/a&gt; comes with a web application which displays links to articles with author information in a simple web application. The web application invokes the web-api service which implements a backend-for-frontend pattern and invokes the articles and authors service. The articles service stores data in a Postgres database. Messages are sent between the microservices via Kafka. This diagram describes the high level architecture:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--EXne62jT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://heidloff.net/wp-content/uploads/2020/01/cns-reactive-architecture.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EXne62jT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://heidloff.net/wp-content/uploads/2020/01/cns-reactive-architecture.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Technologies and Functionality&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The sample leverages heavily &lt;a href="https://quarkus.io/"&gt;Quarkus&lt;/a&gt; which is “a Kubernetes Native Java stack […] crafted from the best of breed Java libraries and standards”. Additionally &lt;a href="https://microprofile.io/"&gt;Eclipse MicroProfile&lt;/a&gt;, &lt;a href="https://vertx.io/"&gt;Eclipse Vert.x&lt;/a&gt;, &lt;a href="https://kafka.apache.org/"&gt;Apache Kafka&lt;/a&gt;, &lt;a href="https://www.postgresql.org/"&gt;PostgreSQL&lt;/a&gt;, &lt;a href="https://www.eclipse.org/openj9/"&gt;Eclipse OpenJ9&lt;/a&gt; and &lt;a href="https://kubernetes.io/"&gt;Kubernetes&lt;/a&gt; are used.&lt;/p&gt;

&lt;p&gt;Over the next days I’ll try to blog about the following functionality:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Sending in-memory messages via MicroProfile&lt;/li&gt;
&lt;li&gt;  Sending in-memory messages via Vertx event bus&lt;/li&gt;
&lt;li&gt;  Sending and receiving Kafka messages via MicroProfile&lt;/li&gt;
&lt;li&gt;  Sending Kafka messages via Kafka API&lt;/li&gt;
&lt;li&gt;  Reactive REST endpoints via CompletionStage&lt;/li&gt;
&lt;li&gt;  Reactive REST invocations via Vertx Axle Web Client&lt;/li&gt;
&lt;li&gt;  Reactive REST invocations via MicroProfile REST Client&lt;/li&gt;
&lt;li&gt;  Exception handling in chained reactive invocations&lt;/li&gt;
&lt;li&gt;  Timeouts via CompletableFuture&lt;/li&gt;
&lt;li&gt;  Resiliency of reactive microservices&lt;/li&gt;
&lt;li&gt;  Reactive CRUD operations for Postgres&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The sample application demonstrates several scenarios and benefits of reactive applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scenario 1: Reactive Messaging&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One benefit of reactive models is the ability to update web applications by sending messages, rather than pulling for updates. This is more efficient and improves the user experience.&lt;/p&gt;

&lt;p&gt;Articles can be created via REST API. The web application receives a notification and adds the new article to the page.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zFklVY1M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/http://heidloff.net/wp-content/uploads/2020/01/cns-reactive-demo-1-video-small.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zFklVY1M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/http://heidloff.net/wp-content/uploads/2020/01/cns-reactive-demo-1-video-small.gif" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This diagram explains the flow:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bfKqDXAR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://heidloff.net/wp-content/uploads/2020/01/cns-reactive-demo-1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bfKqDXAR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://heidloff.net/wp-content/uploads/2020/01/cns-reactive-demo-1.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scenario 2 – Reactive REST Endpoints for higher Efficiency&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Another benefit of reactive systems and reactive REST endpoints is efficiency. This scenario describes how to use reactive systems and reactive programming to achieve faster response times. Especially in public clouds where costs depend on CPU, RAM and compute durations this model saves money.&lt;/p&gt;

&lt;p&gt;The project contains the endpoint ‘/articles’ of the web-api service in two different versions, one uses imperative code, the other one reactive code.&lt;/p&gt;

&lt;p&gt;The reactive stack of this sample provides response times that take less than half of the time compared to the imperative stack: Reactive: 793 ms – Imperative: 1956 ms.&lt;/p&gt;

&lt;p&gt;Read the &lt;a href="https://github.com/IBM/cloud-native-starter/blob/master/reactive/documentation/LoadTests.md"&gt;documentation&lt;/a&gt; for details.&lt;/p&gt;

&lt;p&gt;This diagram explains the flow:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kXUcOrCe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://heidloff.net/wp-content/uploads/2020/01/cns-reactive-demo-2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kXUcOrCe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://heidloff.net/wp-content/uploads/2020/01/cns-reactive-demo-2.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the result of the imperative version after 30000 invocations:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--D2S2PnxP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://heidloff.net/wp-content/uploads/2020/01/cns-reactive-load-100x300-v1-summary.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--D2S2PnxP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://heidloff.net/wp-content/uploads/2020/01/cns-reactive-load-100x300-v1-summary.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the result of the reactive version after 30000 invocations:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uh6VuagF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://heidloff.net/wp-content/uploads/2020/01/cns-reactive-load-100x30-v2-summary.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uh6VuagF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://heidloff.net/wp-content/uploads/2020/01/cns-reactive-load-100x30-v2-summary.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Supported Kubernetes Environments&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We have put a lot of effort in making the setup of the sample as easy as possible. For all components and services there are scripts to deploy and configure everything. For example if you have Minikube installed, the setup shouldn’t take longer than 10 minutes.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://github.com/IBM/cloud-native-starter/blob/master/reactive/README.md#setup-in-minikube"&gt;Minikube&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://github.com/IBM/cloud-native-starter/blob/master/reactive/documentation/IKS.md"&gt;IBM Cloud Kubernetes Service&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://github.com/IBM/cloud-native-starter/blob/master/reactive/documentation/OpenShift4.md"&gt;CodeReady Containers / local OpenShift 4&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Closing Thoughts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A big thank you goes to &lt;a href="https://twitter.com/harald_u"&gt;Harald Uebele&lt;/a&gt; and &lt;a href="https://twitter.com/tsuedbroecker"&gt;Thomas Südbröcker&lt;/a&gt; for their ongoing support. Especially I want to thank Harald for writing the deployment scripts for CodeReady Containers and Thomas for writing the deployment scripts for IBM Cloud Kubernetes Service. Additionally I want to thank &lt;a href="https://twitter.com/DaschnerS"&gt;Sebastian Daschner&lt;/a&gt; for providing feedback and sending pull requests.&lt;/p&gt;

&lt;p&gt;Try out the &lt;a href="https://github.com/IBM/cloud-native-starter/tree/master/reactive"&gt;code&lt;/a&gt; yourself!&lt;/p&gt;

&lt;p&gt;Read the other articles of this series:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="http://heidloff.net/article-development-reactive-applications-quarkus/"&gt;Development of Reactive Applications with Quarkus&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="http://heidloff.net/article/accessing-apache-kafka-from-quarkus/"&gt;Accessing Apache Kafka from Quarkus&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="http://heidloff.net/article/accessing-postgresql-from-quarkus/"&gt;Accessing PostgreSQL in Kubernetes from Quarkus&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="http://heidloff.net/article/reactive-messaging-examples-quarkus/"&gt;Reactive Messaging Examples for Quarkus&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="http://heidloff.net/article/developing-reactive-rest-apis-with-quarkus/"&gt;Developing reactive REST APIs with Quarkus&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="http://heidloff.net/article/invoking-rest-apis-asynchronously-with-quarkus/"&gt;Invoking REST APIs asynchronously with Quarkus&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="http://heidloff.net/article/comparing-synchronous-asynchronous-access-postgresql/"&gt;Comparing synchronous and asynchronous Access to Postgres&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>java</category>
      <category>microservices</category>
      <category>kubernetes</category>
      <category>reactive</category>
    </item>
    <item>
      <title>Persistence for Java Microservices in Kubernetes via JPA</title>
      <dc:creator>Niklas Heidloff</dc:creator>
      <pubDate>Thu, 23 May 2019 15:05:22 +0000</pubDate>
      <link>https://forem.com/nheidloff/persistence-for-java-microservices-in-kubernetes-via-jpa-2pc6</link>
      <guid>https://forem.com/nheidloff/persistence-for-java-microservices-in-kubernetes-via-jpa-2pc6</guid>
      <description>&lt;p&gt;Over the last weeks I’ve worked on an example application that demonstrates how Java EE developers can get started with microservices. The application is a full end-to-end sample which includes a web application, business logic, authentication and now also persistence. It runs on Kubernetes and Istio and there are scripts to easily deploy it.&lt;/p&gt;

&lt;p&gt;Get the &lt;a href="https://github.com/nheidloff/cloud-native-starter"&gt;cloud-native-starter&lt;/a&gt; code from GitHub.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Java Persistence API&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In the example I use a full open source Java stack with OpenJ9, OpenJDK, Open Liberty and MicroProfile. In order to deploy the microservices to Kubernetes, I’ve created an image. Read my article &lt;a href="http://heidloff.net/article/dockerizing-container-java-microprofile"&gt;Dockerizing Java MicroProfile Applications&lt;/a&gt; for details.&lt;/p&gt;

&lt;p&gt;Open Liberty provides some pretty good guides. One guide is specifically about JPA: &lt;a href="https://openliberty.io/guides/jpa-intro.html"&gt;Accessing and persisting data in microservices&lt;/a&gt;. I don’t want to repeat everything here, but only highlight the changes I had to do to run this functionality in a container, rather than via a local Open Liberty installation.&lt;/p&gt;

&lt;p&gt;Here is a short description of JPA:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;JPA is a Java EE specification for representing relational database table data as Plain Old Java Objects (POJO). JPA simplifies object-relational mapping (ORM) by using annotations to map Java objects to tables in a relational database. In addition to providing an efficient API for performing CRUD operations, JPA also reduces the burden of having to write JDBC and SQL code when performing database operations and takes care of database vendor-specific differences.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Configuration of the Sample Application&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The following diagram shows the simplied architecture of the cloud-native-starter example. A web application invokes through Ingress the Web-API service that implements a backend-for-frontend pattern. The Web-API service invokes the Articles service which stores data in a SQL database on the &lt;a href="https://cloud.ibm.com/"&gt;IBM Cloud&lt;/a&gt;. Obviously you can use any other SQL database instead.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eTPspoNo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/d3iupxu1818c1vib5tq8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eTPspoNo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/d3iupxu1818c1vib5tq8.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In order to access the Db2 on the IBM Cloud, first the driver needs to be downloaded via &lt;a href="https://github.com/nheidloff/cloud-native-starter/blob/master/articles-java-jee/pom.xml"&gt;Maven&lt;/a&gt;. Note that the driver does not go into the war files together with the business logic of the microservices, but it needs to be copied in a certain &lt;a href="https://github.com/nheidloff/cloud-native-starter/blob/master/articles-java-jee/Dockerfile#L17"&gt;Open Liberty directory&lt;/a&gt;: /opt/ol/wlp/usr/shared/resources/jcc-11.1.4.4.jar&lt;/p&gt;

&lt;p&gt;Next you need to define in &lt;a href="https://github.com/nheidloff/cloud-native-starter/blob/master/articles-java-jee/liberty/server.xml"&gt;server.xml&lt;/a&gt; information about the driver and the data source.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;server description="OpenLiberty Server"&amp;gt;
    &amp;lt;featureManager&amp;gt;
        &amp;lt;feature&amp;gt;webProfile-8.0&amp;lt;/feature&amp;gt;
        &amp;lt;feature&amp;gt;microProfile-2.1&amp;lt;/feature&amp;gt;
    &amp;lt;/featureManager&amp;gt;

    &amp;lt;httpEndpoint id="defaultHttpEndpoint" host="*" httpPort="8080" httpsPort="9443"/&amp;gt;

    &amp;lt;library id="DB2JCCLib"&amp;gt;
        &amp;lt;fileset dir="${shared.resource.dir}" includes="jcc*.jar"/&amp;gt;
    &amp;lt;/library&amp;gt;

    &amp;lt;dataSource id="articlejpadatasource"
              jndiName="jdbc/articlejpadatasource"&amp;gt;
        &amp;lt;jdbcDriver libraryRef="DB2JCCLib" /&amp;gt;
        &amp;lt;properties.db2.jcc databaseName="BLUDB"
            portNumber="50000"
            serverName="DB2-SERVER"        
            user="DB2-USER"
            password="DB2-PASSWORD" /&amp;gt;
  &amp;lt;/dataSource&amp;gt;
&amp;lt;/server&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Next the persistence unit needs to be define in &lt;a href="https://github.com/nheidloff/cloud-native-starter/blob/master/articles-java-jee/src/main/resources/META-INF/persistence.xml"&gt;persistence.xml&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The tricky part was for me to figure out the right location for this file. In order for all Maven versions to build it correctly I put it in ‘src/main/resources/META-INF/persistence.xml’. This produces an articles.war file with the internal structure ‘classes/META-INF/persistence.xml’.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;persistence version="2.2"
    xmlns="http://xmlns.jcp.org/xml/ns/persistence"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence 
                        http://xmlns.jcp.org/xml/ns/persistence/persistence_2_2.xsd"&amp;gt;
    &amp;lt;persistence-unit name="jpa-unit" transaction-type="JTA"&amp;gt;
        &amp;lt;jta-data-source&amp;gt;jdbc/articlejpadatasource&amp;lt;/jta-data-source&amp;gt;
        &amp;lt;properties&amp;gt;
            &amp;lt;property name="eclipselink.ddl-generation" value="create-tables"/&amp;gt;
            &amp;lt;property name="eclipselink.ddl-generation.output-mode" value="both" /&amp;gt;
        &amp;lt;/properties&amp;gt;
    &amp;lt;/persistence-unit&amp;gt;
&amp;lt;/persistence&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Usage of JPA in Java&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once all the configuration has been done, writing the Java code is simple.&lt;/p&gt;

&lt;p&gt;First you need to define the Java class which represents the entries in a table. Check out the code of &lt;a href="https://github.com/nheidloff/cloud-native-starter/blob/master/articles-java-jee/src/main/java/com/ibm/articles/data/ArticleEntity.java"&gt;ArticleEntity.java&lt;/a&gt; with the five columns id, title, url, author and creation date. As defined in persistence.xml this table is created automatically.&lt;/p&gt;

&lt;p&gt;The CRUD operations for articles are defined in &lt;a href="https://github.com/nheidloff/cloud-native-starter/blob/master/articles-java-jee/src/main/java/com/ibm/articles/data/ArticleDao.java"&gt;ArticleDao.java&lt;/a&gt;. The code is pretty straight forward. The only thing that confused me, was that I have to begin and commit transactions manually for the create operation. In the Open Liberty sample this was not necessary. I’m trying to find out what the difference is.&lt;/p&gt;

&lt;p&gt;In &lt;a href="https://github.com/nheidloff/cloud-native-starter/blob/master/articles-java-jee/src/main/java/com/ibm/articles/data/JPADataAccess.java"&gt;JPADataAccess.java&lt;/a&gt; the logic is implemented to add and read articles. The ArticleDao is injected. Again, the code looks simple. The lesson that I learned here is, that dependency injection only seems to work when the upper layers that invoke this code use dependency injection and @ApplicationScoped as well.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to run the Example&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’ve written scripts to create the SQL database and create the Articles service. Check out the &lt;a href="https://github.com/nheidloff/cloud-native-starter/blob/master/documentation/DemoJPA.md"&gt;documentation&lt;/a&gt; to run the sample yourself on Minikube or the &lt;a href="https://cloud.ibm.com/docs/containers"&gt;IBM Cloud Kubernetes Service&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Once installed the OpenAPI API Explorer can be used to create a new article.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--y_THjE4h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://heidloff.net/wp-content/uploads/2019/05/jpa-demo-1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--y_THjE4h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://heidloff.net/wp-content/uploads/2019/05/jpa-demo-1.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The table is displayed in the Db2 console.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--X-hAO05e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://heidloff.net/wp-content/uploads/2019/05/jpa-demo-2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--X-hAO05e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://heidloff.net/wp-content/uploads/2019/05/jpa-demo-2.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The data in the table can be displayed in the console as well.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--x7wt0u6t--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://heidloff.net/wp-content/uploads/2019/05/jpa-demo-3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--x7wt0u6t--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://heidloff.net/wp-content/uploads/2019/05/jpa-demo-3.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To learn more about microservices built with Java and MicroProfile, check out the &lt;a href="https://github.com/nheidloff/cloud-native-starter"&gt;cloud-native-starter&lt;/a&gt; repo.&lt;/p&gt;

</description>
      <category>microservices</category>
      <category>java</category>
      <category>kubernetes</category>
    </item>
    <item>
      <title>Example Java App running in the Cloud via Kubernetes</title>
      <dc:creator>Niklas Heidloff</dc:creator>
      <pubDate>Wed, 10 Apr 2019 12:29:41 +0000</pubDate>
      <link>https://forem.com/nheidloff/example-java-app-running-in-the-cloud-via-kubernetes-2lb7</link>
      <guid>https://forem.com/nheidloff/example-java-app-running-in-the-cloud-via-kubernetes-2lb7</guid>
      <description>&lt;p&gt;Over the last weeks I’ve worked on a new sample application which demonstrates how to build microservices-based architectures. While there are still some minor things I’d like to add, I think the sample is pretty comprehensive now and a good option for developers, especially Java EE developers, to learn microservices and cloud-native patterns.&lt;/p&gt;

&lt;p&gt;The example is available as open source. The GitHub repo is called &lt;a href="https://github.com/nheidloff/cloud-native-starter" rel="noopener noreferrer"&gt;cloud-native-starter&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Kubernetes, Istio and Java&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When building cloud-native applications, developers are challenged to figure out how to address topics like traffic routing, resiliency, distributed monitoring, service discoveries and more. Fortunately most of these new challenges are handled by the orchestration platform &lt;a href="https://kubernetes.io/" rel="noopener noreferrer"&gt;Kubernetes&lt;/a&gt; and the service mesh &lt;a href="https://istio.io/" rel="noopener noreferrer"&gt;Istio&lt;/a&gt;. This functionality works generically for microservices, regardless of the language they are implemented in and without changes to the application logic.&lt;/p&gt;

&lt;p&gt;However, some functionality can not be covered by orchestration platforms and service meshes. Instead it must be handled in the business logic of the microservices, for example application specific failover functionality, metrics, and fine-grained authorizations.&lt;/p&gt;

&lt;p&gt;Java developers can leverage &lt;a href="https://microprofile.io/" rel="noopener noreferrer"&gt;Eclipse MicroProfile&lt;/a&gt; to implement this functionality. MicroProfile is an extension to Java EE (Enterprise Edition) to build microservices-based architectures and it complements Kubernetes and Istio capabilities. In addition to the application specific logic which Kubernetes and Istio cannot handle, it also comes with convenience functionality that you typically need when developing microservices, for example mechanisms to invoke REST APIs and functionality to implement REST APIs including their documentation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Design Principles&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The example application follows these design principles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Leverage platforms as much as possible – do as little as possible in language-specific frameworks&lt;/li&gt;
&lt;li&gt;  Use open-source components for the core services of the application only&lt;/li&gt;
&lt;li&gt;  Make the first time experience as simple as possible&lt;/li&gt;
&lt;li&gt;  Be able to run the application in different environments&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let me explain the design principles in more detail.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Leverage platforms as much as possible – do as little as possible in language-specific frameworks&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The advantage of using Kubernetes and Istio for features like traffic management is, that these features are language agnostic. Cloud-native applications can be, and often are, polyglot. This allows developers to pick the best possible languages for the specific tasks.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Use open-source components for the core services of the application only&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In my role as developer advocate I talk with many developers. Pretty much everyone loves open source. In order to reach as many developers as possible, the sample application uses for the core services of the application only open source projects. For example the Java stack leverages &lt;a href="https://www.eclipse.org/openj9/" rel="noopener noreferrer"&gt;OpenJ9&lt;/a&gt;, OpenJDK from &lt;a href="https://adoptopenjdk.net/" rel="noopener noreferrer"&gt;AdoptOpenJDK&lt;/a&gt;, &lt;a href="https://openliberty.io/" rel="noopener noreferrer"&gt;OpenLiberty&lt;/a&gt; and &lt;a href="https://microprofile.io/" rel="noopener noreferrer"&gt;MicroProfile&lt;/a&gt;. Kubernetes and Istio are obviously open source projects as well. The components of the application that are not available as open source are optional and can be exchanged.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Make the first time experience as simple as possible&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;There are many samples, snippets, articles and tutorials available for the various cloud-native features and many of them are really good. However, I’ve had issues to run some of these features together in one application. Sometimes they used different Java stacks, sometimes different versions and sometimes the articles were outdated.&lt;/p&gt;

&lt;p&gt;The example application shows several features working together, see below for details. There are also scripts to deploy services very easily, basically one script per service, similar to the ‘cf push’ experience for Cloud Foundry applications.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Be able to run the application in different environments&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Fortunately this is one of the main advantages of Kubernetes since you can run workloads on-premises, hybrid or public cloud infrastructures. The repo has instructions how to deploy the application to Minikube and to the managed &lt;a href="https://www.ibm.com/cloud/container-service" rel="noopener noreferrer"&gt;IBM Cloud Kubernetes Service&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Functionality of the Sample Application&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The project &lt;a href="https://github.com/nheidloff/cloud-native-starter#demos" rel="noopener noreferrer"&gt;demonstrates&lt;/a&gt; the following functionality:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="http://heidloff.net/article/dockerizing-container-java-microprofile" rel="noopener noreferrer"&gt;Dockerizing Java MicroProfile services&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://github.com/nheidloff/cloud-native-starter/blob/master/documentation/DemoTrafficRouting.md" rel="noopener noreferrer"&gt;Traffic management&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="http://heidloff.net/article/authentication-authorization-openid-connect-istio" rel="noopener noreferrer"&gt;Authentication and authorization&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://github.com/nheidloff/cloud-native-starter/blob/master/documentation/DemoResiliency.md" rel="noopener noreferrer"&gt;Resiliency&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="http://heidloff.net/article/rest-apis-microprofile-javaee-jaxrs" rel="noopener noreferrer"&gt;REST APIs implementations including documentation&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="http://heidloff.net/invoke-rest-apis-java-microprofile-microservice" rel="noopener noreferrer"&gt;REST API invocations&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="http://heidloff.net/article/prometheus-metrics-microprofile-microservices-istio/" rel="noopener noreferrer"&gt;Monitoring and metrics&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://github.com/nheidloff/cloud-native-starter/blob/master/documentation/DemoDistributedLoggingMonitoring.md" rel="noopener noreferrer"&gt;Distributed logging and monitoring&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This diagram shows the services and components:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fsm4hngrz1mfjpbjud13m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fsm4hngrz1mfjpbjud13m.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The web application invokes an API of a BFF (backend for frontend) service to display articles with authors.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F469ocs7ztjqiml92p0qf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F469ocs7ztjqiml92p0qf.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Call to Action&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you want to learn cloud-native applications, get the code of the &lt;a href="https://github.com/nheidloff/cloud-native-starter" rel="noopener noreferrer"&gt;example application&lt;/a&gt; and follow the &lt;a href="https://github.com/nheidloff/cloud-native-starter#setup" rel="noopener noreferrer"&gt;instructions&lt;/a&gt; to set up a local Minikube environment and to deploy the microservices. If you have already a Kubernetes cluster, the setup should not take longer than half an hour.&lt;/p&gt;

&lt;p&gt;You can also run this application on the &lt;a href="https://www.ibm.com/cloud/container-service" rel="noopener noreferrer"&gt;IBM Cloud Kubernetes Service&lt;/a&gt; which is a managed service that comes with an &lt;a href="https://cloud.ibm.com/docs/containers?topic=containers-istio#istio" rel="noopener noreferrer"&gt;Istio plugin&lt;/a&gt;. IBM provides an &lt;a href="http://ibm.biz/nheidloff" rel="noopener noreferrer"&gt;IBM Cloud Lite&lt;/a&gt; account which is free, no credit card is required and there is no time restriction. In order to use the Kubernetes service, contact &lt;a href="https://twitter.com/harald_u" rel="noopener noreferrer"&gt;Harald&lt;/a&gt; and &lt;a href="https://twitter.com/nheidloff" rel="noopener noreferrer"&gt;myself&lt;/a&gt; to get a promo code. Then follow these &lt;a href="https://github.com/nheidloff/cloud-native-starter/blob/master/documentation/IKSDeployment.md" rel="noopener noreferrer"&gt;instructions&lt;/a&gt; to deploy the services to the IBM Cloud.&lt;/p&gt;

&lt;p&gt;As always, I’d like to get feedback. Please let me know what you think about the example and how it could be improved. My direct messages on Twitter are open: &lt;a href="https://twitter.com/nheidloff" rel="noopener noreferrer"&gt;@nheidloff&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I also want to thank everyone who has helped to create this application, especially Harald Uebele who has written a lot of the code and scripts.&lt;/p&gt;

</description>
      <category>java</category>
      <category>kubernetes</category>
      <category>microservices</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Debugging Microservices running in Kubernetes</title>
      <dc:creator>Niklas Heidloff</dc:creator>
      <pubDate>Mon, 25 Mar 2019 09:26:02 +0000</pubDate>
      <link>https://forem.com/nheidloff/debugging-microservices-running-in-kubernetes-3f2b</link>
      <guid>https://forem.com/nheidloff/debugging-microservices-running-in-kubernetes-3f2b</guid>
      <description>&lt;p&gt;In order to learn more about microservices, container orchestration and service meshes, I’ve set up a &lt;a href="http://heidloff.net/article/setup-local-development-kubernetes-istio" rel="noopener noreferrer"&gt;local development environment&lt;/a&gt; with Minikube, Istio and tools like Kiali and created a &lt;a href="https://github.com/nheidloff/cloud-native-starter" rel="noopener noreferrer"&gt;sample application&lt;/a&gt;. In this article I describe how to debug these services locally.&lt;/p&gt;

&lt;p&gt;Microservices can be developed in various languages and with multiple frameworks. For the different implementation types there are specialized and established IDEs (integrated development environments) and tools to debug the single services.&lt;/p&gt;

&lt;p&gt;The new challenge when debugging cloud-native applications is that applications often have many microservices and there is a lot of communication between them. Testing and debugging only separate services is not sufficient.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Requirements&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here is a list of my debugging requirements. In the optimal case I’d like to …&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Run and debug my code in my favorite IDE locally (rather than using a slow remote debugger)&lt;/li&gt;
&lt;li&gt;Run the single service as part of the overall application, for example invoke it from another service (rather than via unit tests and mock objects only)&lt;/li&gt;
&lt;li&gt;Run the code in the same container locally as in production (rather than installing application servers locally)&lt;/li&gt;
&lt;li&gt;Do changes in the code locally and test them immediately (rather than restarting containers)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Telepresence&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;There are several different ways to debug microservices. One great solution is to use &lt;a href="https://www.telepresence.io/" rel="noopener noreferrer"&gt;Telepresence&lt;/a&gt;, which is an open source tool for the “FAST, LOCAL DEVELOPMENT FOR KUBERNETES AND OPENSHIFT MICROSERVICES”.&lt;/p&gt;

&lt;p&gt;Here is an example. I’m using a &lt;a href="https://github.com/nheidloff/cloud-native-starter" rel="noopener noreferrer"&gt;simple application&lt;/a&gt; which has two microservices so far. The BFF (backend for frontend) ‘web-api’ microservice invokes another ‘articles’ microservice. I want to debug the ‘articles’ service locally and let the ‘web-api’ service invoke it which runs in a Kubernetes cluster.&lt;/p&gt;

&lt;p&gt;I’ve implemented these services with JavaEE, OpenJ9, &lt;a href="https://openliberty.io/" rel="noopener noreferrer"&gt;Open Liberty&lt;/a&gt; and MicroProfile within Eclipse. There is a lot of documentation available how to debug Open Liberty in Eclipse via the &lt;a href="https://github.com/OpenLiberty/open-liberty-tools" rel="noopener noreferrer"&gt;Open Liberty Tools&lt;/a&gt;. You can import the ‘articles’ service as existing Maven project. In order to run the service in the local Open Liberty server, you need to check ‘Dynamic Web Module’ in the ‘Project Facets’ settings. After this, you can start the local Open Liberty server.&lt;/p&gt;

&lt;p&gt;In order to run the ‘articles’ service on Kubernetes, I’ve written a simple &lt;a href="https://github.com/nheidloff/cloud-native-starter/blob/master/scripts/deploy-articles-java-jee.sh" rel="noopener noreferrer"&gt;script&lt;/a&gt; to deploy it. Here is the &lt;a href="https://github.com/nheidloff/cloud-native-starter/blob/master/articles-java-jee/deployment/kubernetes.yaml" rel="noopener noreferrer"&gt;yaml&lt;/a&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;kind: Service
apiVersion: v1
metadata:
  name: articles
  labels:
    app: articles
spec:
  selector:
    app: articles
  ports:
    - port: 9080
      name: http
  type: NodePort
---

kind: Deployment
apiVersion: apps/v1beta1
metadata:
  name: articles
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: articles
        version: v1
    spec:
      containers:
      - name: articles
        image: articles:1
        ports:
        - containerPort: 9080
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now to the exciting part. Telepresence allows you to swap a pod running in Kubernetes with a service running locally. All requests to the pod in Kubernetes are redirected to the local URL and port.&lt;/p&gt;

&lt;p&gt;After you have installed &lt;a href="https://www.telepresence.io/reference/install" rel="noopener noreferrer"&gt;Telepresense&lt;/a&gt;, the following command can be run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ telepresence --method inject-tcp --swap-deployment articles --expose 9080:9080
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://thepracticaldev.s3.amazonaws.com/i/nw4w9rljd3g8b1u037kg.png" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fnw4w9rljd3g8b1u037kg.png" alt="debugging-istio-1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the Kubernetes remote port 9080 has been mapped to the local port 9080, the locally running service can be invoked from the ‘web-api’ service running in Kubernetes. The best part is you can also use the Eclipse debugger as if everything would run locally.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://thepracticaldev.s3.amazonaws.com/i/8k2f2lsf3g3ayjndn5h1.png" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F8k2f2lsf3g3ayjndn5h1.png" alt="debugging-istio-4"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Calling from local Services to Kubernetes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With this easy setup services in Kubernetes can invoke local services. Unfortunately the other direction doesn’t work. For example a locally running service ‘web-api’ can not invoke the Kubernetes service ‘articles’ via &lt;a href="http://articles:9080" rel="noopener noreferrer"&gt;http://articles:9080&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Fortunately Telepresense comes with a &lt;a href="https://www.telepresence.io/tutorials/java" rel="noopener noreferrer"&gt;mechanism&lt;/a&gt; to support this as well. Essentially you can run your code in a local Docker container and debug it with a remote debugger. Telepresense can replace the Kubernetes pod with a two-way proxy that handles the traffic to your local Docker container. There is even support for ‘hot code replace’ (see documentation).&lt;/p&gt;

&lt;p&gt;I haven’t tried the two-way communication yet, but the functionality sounds very promising and would fulfill the requirements above!&lt;/p&gt;

&lt;p&gt;If you want to give it a try, use the &lt;a href="https://github.com/nheidloff/cloud-native-starter" rel="noopener noreferrer"&gt;sample application&lt;/a&gt;, set up a &lt;a href="http://heidloff.net/article/setup-local-development-kubernetes-istio" rel="noopener noreferrer"&gt;local development environment&lt;/a&gt; and follow the instructions above.&lt;/p&gt;

</description>
      <category>microservices</category>
      <category>debugging</category>
      <category>kubernetes</category>
      <category>java</category>
    </item>
    <item>
      <title>Introducing the Fun Cloud Showcase #BlueCloudMirror</title>
      <dc:creator>Niklas Heidloff</dc:creator>
      <pubDate>Fri, 15 Mar 2019 14:06:09 +0000</pubDate>
      <link>https://forem.com/nheidloff/introducing-the-fun-cloud-showcase-bluecloudmirror-5425</link>
      <guid>https://forem.com/nheidloff/introducing-the-fun-cloud-showcase-bluecloudmirror-5425</guid>
      <description>&lt;p&gt;Blue Cloud Mirror is a game where players need to show five specific emotions and do five specific poses in two levels. The faster, the better.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://blue-cloud-mirror.mybluemix.net/emotions" rel="noopener noreferrer"&gt;Play the game.&lt;/a&gt; It only takes a minute. All you need is a webcam and a Chrome browser.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/ibm/blue-cloud-mirror" rel="noopener noreferrer"&gt;Get the code from GitHub.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here are my results:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://thepracticaldev.s3.amazonaws.com/i/4x1pkckl44aq5bq19zmw.png" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F4x1pkckl44aq5bq19zmw.png" alt="game-results"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The game uses key technologies of the &lt;a href="https://ibm.biz/nheidloff" rel="noopener noreferrer"&gt;IBM Cloud&lt;/a&gt; and has three main parts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Core game: Implemented as serverless web application and via Cloud Functions since it is not accessed 24x7&lt;/li&gt;
&lt;li&gt;Users service: Implemented via IBM Cloud Private to avoid having the personal data in a public cloud&lt;/li&gt;
&lt;li&gt;Scores service: Implemented via Cloud Foundry Enterprise Edition to demonstrate developer productivity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The following diagram shows the key components:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://thepracticaldev.s3.amazonaws.com/i/toex6teumglq85958xbq.png" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ftoex6teumglq85958xbq.png" alt="diagram-overview"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I’ve built Blue Cloud Mirror together with my colleagues &lt;a href="https://twitter.com/tsuedbroecker" rel="noopener noreferrer"&gt;Thomas Südbröcker&lt;/a&gt; and &lt;a href="https://twitter.com/harald_u" rel="noopener noreferrer"&gt;Harald Uebele&lt;/a&gt;. Check out our &lt;a href="https://github.com/ibm/blue-cloud-mirror#documentation-and-articles" rel="noopener noreferrer"&gt;series of blog entries&lt;/a&gt; about it.&lt;/p&gt;

&lt;p&gt;You can also run the application locally. The setup shouldn't take longer than five minutes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ npm install -g @vue/cli
$ git clone https://github.com/IBM/blue-cloud-mirror.git
$ cd blue-cloud-mirror/game
$ yarn install
$ yarn run serve
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://blue-cloud-mirror.mybluemix.net/emotions" rel="noopener noreferrer"&gt;Try the Game!&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>cloud</category>
      <category>kubernetes</category>
      <category>serverless</category>
    </item>
    <item>
      <title>Lightweight serverless Java functions with Quarkus</title>
      <dc:creator>Niklas Heidloff</dc:creator>
      <pubDate>Wed, 13 Mar 2019 07:24:04 +0000</pubDate>
      <link>https://forem.com/nheidloff/lightweight-serverless-java-functions-with-quarkus-4ejd</link>
      <guid>https://forem.com/nheidloff/lightweight-serverless-java-functions-with-quarkus-4ejd</guid>
      <description>&lt;p&gt;&lt;a href="https://quarkus.io/"&gt;Quarkus&lt;/a&gt; is a “next-generation Kubernetes native Java framework” which is available as open source. Quarkus promises fast boot times and low memory usages. This makes Quarkus a perfect fit for Java workloads running as microservices on Kubernetes as well as Java workloads running as serverless functions.&lt;/p&gt;

&lt;p&gt;Read the article &lt;a href="http://in.relation.to/2019/03/08/why-quarkus/"&gt;Why Quarkus&lt;/a&gt; to learn how Quarkus works. In a nutshell Quarkus compiles Java source code in native binaries via &lt;a href="https://graalvm.org/"&gt;GraalVM&lt;/a&gt;. The Quarkus framework helps developers to easily build applications that can leverage the GraalVM benefits.&lt;/p&gt;

&lt;p&gt;Most developers use JavaScript/Node.js to build serverless functions nowadays. One reason is that Node.js applications usually (used to?) start faster and consume less memory. Since you typically pay for memory and time in the cloud, Node.js often saves you money and provides better experiences.&lt;/p&gt;

&lt;p&gt;Today I looked briefly into how to use Quarkus to build lightweight and fast Docker images which can be run as serverless functions on &lt;a href="https://openwhisk.apache.org/"&gt;Apache OpenWhisk&lt;/a&gt; based platforms like &lt;a href="https://cloud.ibm.com/docs/openwhisk?topic=cloud-functions-index#index"&gt;IBM Cloud Functions&lt;/a&gt;. One of the great features of OpenWhisk is that you can use Docker to develop functions.&lt;/p&gt;

&lt;p&gt;I’ve put together a little &lt;a href="https://github.com/nheidloff/openwhisk-quarkus-starter"&gt;sample&lt;/a&gt; on GitHub.&lt;/p&gt;

&lt;p&gt;Here is how you can try Quarkus on IBM Cloud Functions. All you need is a free &lt;a href="https://ibm.biz/nheidloff"&gt;IBM Cloud lite account&lt;/a&gt; and the &lt;a href="https://console.bluemix.net/docs/cli/index.html"&gt;ibmcloud&lt;/a&gt; CLI.&lt;/p&gt;

&lt;p&gt;First download the code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ git clone https://github.com/nheidloff/openwhisk-quarkus-starter.git
$ cd openwhisk-quarkus-starter
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Before the actual Docker image is built, the native binary is created. Follow the &lt;a href="https://quarkus.io/guides/building-native-image-guide"&gt;instructions&lt;/a&gt; on the Quarkus web site how to set up GraalVM, a Java JDK and Maven.&lt;/p&gt;

&lt;p&gt;Then build the image (replace ‘nheidloff’ with your Docker name).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ mvn package -Pnative -Dnative-image.docker-build=true
$ docker build -t nheidloff/quarkus-serverless:1 .
$ docker push nheidloff/quarkus-serverless:1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;In order to invoke the function locally, run these commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ docker run -i --rm -p 8080:8080 nheidloff/quarkus-serverless
$ curl --request POST \
  --url [http://localhost:8080/run](http://localhost:8080/run) \
  --header 'Content-Type: application/json' \
  --data '{"value":{"name":"Niklas"}}'
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;In order to change the implementation of the sample function, use your favorite Java IDE or text editor. When you run the following command, the application will be updated automatically every time you save a file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ mvn compile quarkus:dev
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;The OpenWhisk function can be created on the IBM Cloud with these commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ ibmcloud login
$ ibmcloud fn action create echo-quarkus --docker nheidloff/quarkus-serverless:1 -m 128
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The deployed Quarkus function only consumes 128 MB memory. I think this is pretty amazing.&lt;/p&gt;

&lt;p&gt;The easiest way to invoke the command is via the ibmcloud CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ ibmcloud fn action invoke --blocking echo-quarkus --param name Niklas
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Next I want to look more at the speed of the Quarkus functions. &lt;/p&gt;

</description>
      <category>java</category>
      <category>serverless</category>
      <category>quarkus</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Setup of a Local Kubernetes and Istio Dev Environment</title>
      <dc:creator>Niklas Heidloff</dc:creator>
      <pubDate>Fri, 08 Mar 2019 08:45:40 +0000</pubDate>
      <link>https://forem.com/nheidloff/setup-of-a-local-kubernetes-and-istio-dev-environment-1c67</link>
      <guid>https://forem.com/nheidloff/setup-of-a-local-kubernetes-and-istio-dev-environment-1c67</guid>
      <description>&lt;p&gt;As developer I like to do as much development as possible locally, because it’s generally easier and faster to develop and debug code. In order to build cloud-native applications and microservices, it’s very convenient to have a local &lt;a href="https://kubernetes.io/" rel="noopener noreferrer"&gt;Kubernetes&lt;/a&gt; cluster and &lt;a href="https://istio.io/" rel="noopener noreferrer"&gt;Istio&lt;/a&gt; running locally. This article describes how to install these components and some additional tools like &lt;a href="https://www.kiali.io/" rel="noopener noreferrer"&gt;Kiali&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Minikube&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In order to run Kubernetes clusters locally, there are different alternatives. One is to use the Kubernetes functionality integrated in &lt;a href="https://blog.docker.com/2018/07/kubernetes-is-now-available-in-docker-desktop-stable-channel/" rel="noopener noreferrer"&gt;Docker Desktop&lt;/a&gt;. The alternative that I’ve chosen is &lt;a href="https://kubernetes.io/docs/setup/minikube/" rel="noopener noreferrer"&gt;Minikube&lt;/a&gt; which runs a single-node Kubernetes cluster inside a VM on your development machine.&lt;/p&gt;

&lt;p&gt;Follow the instructions to install &lt;a href="https://kubernetes.io/docs/tasks/tools/install-kubectl/" rel="noopener noreferrer"&gt;kubectl&lt;/a&gt; and &lt;a href="https://kubernetes.io/docs/tasks/tools/install-minikube/" rel="noopener noreferrer"&gt;Minikube&lt;/a&gt;. As hypervisor I’m using VirtualBox which is supported on Mac, Linux and Windows.&lt;/p&gt;

&lt;p&gt;When running Istio and your own applications, you need more more memory and CPUs than you get by default. Here are my settings:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ minikube config set cpus 4
$ minikube config set memory 8192
$ minikube config set disk-size 50g
$ minikube addons enable ingress
$ minikube start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;‘minikube start’ can take several minutes when starting it for the first time. Be patient.&lt;/p&gt;

&lt;p&gt;Sometimes ‘minikube start’ doesn’t work for me. In that case I stop my VPN, invoke ‘minikube delete#, delete the ‘.minikube’ directory, restart my machine and start it again.&lt;/p&gt;

&lt;p&gt;After this you can get the Minikube IP address and open the Kubernetes dashboard via these commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ minikube ip
$ minikube dashboard
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Minikube comes with it’s own Docker daemon, so that you don’t have to use Docker Desktop. You only need the ‘docker’ CLI and point it to Minikube:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ eval $(minikube docker-env)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To stop the cluster run this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ minikube stop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Istio&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To download Istio, run this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ curl -L [https://git.io/getLatestIstio](https://git.io/getLatestIstio) | sh -
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Follow the instructions in the terminal to set the path.&lt;/p&gt;

&lt;p&gt;To install Istio, run these commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ cd istio-1.0.6
$ kubectl apply -f install/kubernetes/helm/istio/templates/crds.yaml
$ kubectl apply -f install/kubernetes/istio-demo.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make sure that all pods are running or completed before continuing. This can take several minutes when starting the pods for the first time. Be patient.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl get pod -n istio-system
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This screenshot shows all Istio pods running or completed (ignore the Kiali one for now).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://thepracticaldev.s3.amazonaws.com/i/51wgpd5c9hptl66csg63.png" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fges2hyi2mhn2kv0jwrkj.png" alt="setup-loca-id-kubernetes-1" width="800" height="361"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the last step enable automatic sidecar injection:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl label namespace default istio-injection=enabled
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After the setup of Minikube and Istio you can use the following tools:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Kubernetes Dashboard&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ minikube dashboard
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Jaeger Dashboard&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl port-forward -n istio-system $(kubectl get pod -n istio-system -l app=jaeger -o jsonpath='{.items[0].metadata.name}') 16686:16686
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;URL to Open Jaeger: &lt;a href="http://localhost:16686" rel="noopener noreferrer"&gt;http://localhost:16686&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Grafana Dashboard&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl -n istio-system port-forward $(kubectl -n istio-system get pod -l app=grafana -o jsonpath='{.items[0].metadata.name}') 3000:3000 &amp;amp;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;URL to open Grafana: &lt;a href="http://localhost:3000/dashboard/db/istio-mesh-dashboard" rel="noopener noreferrer"&gt;http://localhost:3000/dashboard/db/istio-mesh-dashboard&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Prometheus Dashboard&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ kubectl -n istio-system port-forward $(kubectl -n istio-system get pod -l app=prometheus -o jsonpath='{.items[0].metadata.name}') 9090:9090 &amp;amp;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;URL to open Prometheus: &lt;a href="http://localhost:9090" rel="noopener noreferrer"&gt;http://localhost:9090&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Kiali&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Run the following command to install Kiali:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ bash &amp;lt;(curl -L [http://git.io/getLatestKialiKubernetes](http://git.io/getLatestKialiKubernetes))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note: For some reason the script didn’t work for me. I had to replace one &lt;a href="https://github.com/kiali/kiali/blob/master/deploy/kubernetes/deploy-kiali-to-kubernetes.sh#L172" rel="noopener noreferrer"&gt;line&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;get_downloader
github_api_url="[https://api.github.com/repos/kiali/kiali/releases/latest](https://api.github.com/repos/kiali/kiali/releases/latest)"
kiali_version_we_want="v0.15.0"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To launch Kiali you need the IP address and NodePort:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ minikube ip
$ kubectl get svc -n istio-system kiali --output 'jsonpath={.spec.ports[*].nodePort}'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;URL to open Kiali: https://[minikube-ip]:[kiali-nodeport]/kiali&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sample Application&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I’m working on a simple &lt;a href="https://github.com/nheidloff/cloud-native-starter" rel="noopener noreferrer"&gt;sample application&lt;/a&gt; that shows some of the Istio and &lt;a href="https://microprofile.io/" rel="noopener noreferrer"&gt;MicroProfile&lt;/a&gt; functionality to build cloud-native applications. I’ll blog more about this soon.&lt;/p&gt;

&lt;p&gt;For now you can install two sample microservices from this project. Make sure Minikube runs and you have installed all necessary &lt;a href="https://github.com/nheidloff/cloud-native-starter/blob/master/scripts/check-prerequisites.sh#L13-L21" rel="noopener noreferrer"&gt;prerequisites&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ git clone [https://github.com/nheidloff/cloud-native-starter.git](https://github.com/nheidloff/cloud-native-starter.git)
$ scripts/check-prerequisites.sh
$ scripts/deploy-articles-java-jee.sh
$ scripts/deploy-web-api-java-jee.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The following screenshot shows a BFF (backend for frontend) ‘web-api’ microservice invoking another ‘articles’ webservice:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://thepracticaldev.s3.amazonaws.com/i/xwrlrfdiiruavlwwjnp7.png" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw2v0lz67svbhpzbhxw2m.png" alt="setup-loca-id-kubernetes-2" width="800" height="354"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Most of the information in this article I got from &lt;a href="https://haralduebele.blog/2019/02/22/install-istio-and-kiali-on-ibm-cloud-or-minikube/" rel="noopener noreferrer"&gt;Harald Uebele&lt;/a&gt;. Thanks Harald. I just added some details that I had to do differently.&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>istio</category>
      <category>java</category>
      <category>microservices</category>
    </item>
    <item>
      <title>Recent Java Updates from IBM</title>
      <dc:creator>Niklas Heidloff</dc:creator>
      <pubDate>Wed, 06 Mar 2019 07:32:50 +0000</pubDate>
      <link>https://forem.com/nheidloff/recent-java-updates-from-ibm-3nmn</link>
      <guid>https://forem.com/nheidloff/recent-java-updates-from-ibm-3nmn</guid>
      <description>&lt;p&gt;In preparation for a Java conference, I’ve spent some time to catch up on the latest activities in the Java community. With Java EE’s move to Eclipse and projects like MicroProfile there are a lot of things going on and there is a lot of innovation. Below are some pointers to articles my colleagues have published recently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Licensing&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Oracle has changed the licensing for commercial use. Fortunately IBM open sourced OpenJ9 which is available together with the OpenJDK at no cost from &lt;a href="https://adoptopenjdk.net/" rel="noopener noreferrer"&gt;AdoptOpenJDK&lt;/a&gt;, even for commercial use.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://thepracticaldev.s3.amazonaws.com/i/wc2ov7tx2y5bkq61j2a6.png" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fwc2ov7tx2y5bkq61j2a6.png" alt="java-ibm"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;More about licensing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://www.ibm.com/blogs/bluemix/2019/02/java-licensing-has-changed-but-theres-good-news/" rel="noopener noreferrer"&gt;Java Licensing Has Changed, but There’s Good News&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://developer.ibm.com/blogs/2019/01/30/free-java-with-paid-support/" rel="noopener noreferrer"&gt;Free Java with paid support: The IBM perspective&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://developer.ibm.com/blogs/2019/01/16/adoptopenjdk-an-open-java-distribution-and-community-you-can-count-on/" rel="noopener noreferrer"&gt;AdoptOpenJDK: An open Java distribution and community you can count on&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://developer.ibm.com/blogs/2019/01/24/java-licensing-is-changing-and-you-could-be-affected/" rel="noopener noreferrer"&gt;Java licensing has changed, and you could be affected&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Eclipse OpenJ9&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The code of the open source JVM &lt;a href="https://www.eclipse.org/openj9/" rel="noopener noreferrer"&gt;OpenJ9&lt;/a&gt; is the same code base used by the IBM SDK for Java which means that it’s enterprise ready. Plus startup time is 40% faster and memory usage is 60% lower compared to other JVMs which makes it a perfect fit for container based workloads.&lt;/p&gt;

&lt;p&gt;More about OpenJ9:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://www.eclipse.org/openj9/" rel="noopener noreferrer"&gt;OpenJ9&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.eclipse.org/openj9/oj9_performance.html" rel="noopener noreferrer"&gt;OpenJ9 Performance&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.youtube.com/watch?v=srfR38j2CFc" rel="noopener noreferrer"&gt;Video: OpenJDK with Eclipse OpenJ9: give your Java applications a thrill&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://developer.ibm.com/blogs/2019/01/10/openjdk-with-eclipse-openj9-no-worries-just-improvements/" rel="noopener noreferrer"&gt;OpenJDK with Eclipse OpenJ9: No worries, just improvements&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Eclipse MicroProfile&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;MicroProfile allows building cloud-native enterprise microservices. I like especially that MircoProfile based services can supplement Istio functionality, for example for application specific fallbacks.&lt;/p&gt;

&lt;p&gt;More about MicroProfile:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://www.eclipse.org/community/eclipse_newsletter/2018/september/MicroProfile_istio.php" rel="noopener noreferrer"&gt;MicroProfile, the microservice programming model made for Istio&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://microprofile.io/" rel="noopener noreferrer"&gt;MicroProfile&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://start.microprofile.io/" rel="noopener noreferrer"&gt;MicroProfile Starter&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://developer.ibm.com/series/write-a-simple-microprofile-application/" rel="noopener noreferrer"&gt;Write a simple MicroProfile application&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://developer.ibm.com/patterns/configure-your-app-using-eclipse-microprofile-config/" rel="noopener noreferrer"&gt;Code Pattern: Configure your app using Eclipse MicroProfile Config&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://istio.io/" rel="noopener noreferrer"&gt;Istio&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://developer.ibm.com/patterns/make-java-microservices-resilient-with-istio/" rel="noopener noreferrer"&gt;Code Pattern: Make Java microservices resilient with Istio&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;More Resources&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To learn more about what IBM provides for Java developers, check out the following resources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://developer.ibm.com/technologies/java/" rel="noopener noreferrer"&gt;IBM Developer Java Technologies&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://cloud.ibm.com/docs/cli/idt/index.html#developing" rel="noopener noreferrer"&gt;IBM Cloud CLI to create new Applications&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://cloud.ibm.com/developer/appservice/starter-kits/java-microservice-with-eclipse-microprofile-and-java-ee" rel="noopener noreferrer"&gt;IBM Cloud Starter Application&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://cloud.ibm.com/docs/cli/idt/jetbrains.html#ibm-dev-tools-for-jetbrains" rel="noopener noreferrer"&gt;IBM Cloud Developer Tools for Jetbrains IDEs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://developer.ibm.com/patterns/category/java/" rel="noopener noreferrer"&gt;Code Patterns&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.youtube.com/watch?v=Sy-JmAXZPmY" rel="noopener noreferrer"&gt;Video: Java Update&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://openliberty.io/" rel="noopener noreferrer"&gt;Open Liberty&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>java</category>
      <category>jvm</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
