What’s hot? Tech Trends That Made a Real Difference in 2017

At Java One 2017 I had the pleasure to be interviewed in a podcast with industry legends such as Chris Richardson, Lucas Jellema and others:

“In order to get a sense of what’s happening on the street, we gathered a group of highly respected software developers, recognized leaders in the community, crammed them into a tiny hotel room in San Francisco (they were in town to present sessions at JavaOne and Oracle OpenWorld), tossed in a couple of microphones, and asked them to talk about the technologies that actually had an impact on their work over the past year. The resulting conversation is lively, wide-ranging, often funny, and insightful from start to finish. Listen for yourself.”

For those who care, this was last year’s interview about “The Role of the Cloud Architect”.

With Kotlin and Spring Boot to the Clouds

0. Overview

This posting is based on a quick customer demo that I did the other week. It demonstrates running Kotlin code in different public clouds. To be more precise: We use Kotlin together with Spring Boot to create a somehow minimalistic REST-like application that is running on multiple, load balanced instances on AWS Beanstalk or Oracle ACCS.

1. Kotlin

Kotlin is one of the upcoming, trendy JVM-based languages. It’s syntax is close to Java, but just sometimes more convenient. The language is backed by two industry giants: Pivotal announced support forSpring and Google officially supports Android development with Kotlin.

The Kotlin language follows the Java coding conventions, but makes the semicolon mostly optional (great!) and adds null-pointer safety (you never had problem with this in Java, did you?) and string interpolation on top of that. Although Kotlin packages are same as in Java in reverse order, in Kotlin package names don’t have to match to folder structure (great!). Interesting enough, most Kotlin control structures are expressions.

2. Spring Boot

We will use Kotlin together with Spring Boot in this posting.

Project Creation

For the purpose of this demo we will create the smallest possible application that is still helpful to learn about the synergy of Kotlin, Spring Boot and cloud. To get started, we create a maven project  for Spring Boot with the spring.io initializer.

The project will contain an empty Spring Boot application and the maven pom file amongst others.

Add a Controller

To get some meaningful output we add another Kotlin class: a controller with three functions. Did you know, the “fun” in Kotlin is for function?

  1. the hello(World) function that simply echoes a name.
  2. a func that shows how to access java.util.Date from Java and returns the time.
  3. a info func that show a bit of load balancing magic when deployed on ACCS.

Build the Project

We can build the project with mvn package from the command-line (or from the IDE, as shown in the web cast).

IDE Support for Kotlin

Being developed by Jetbrains, Intellij offers great support for Kotlin. In this webcast I simply use Netbeans.

 

3 Kotlin in the Clouds

This little demo is more real life than you might think. I will show you to run Kotlin in two different clouds. These days I see multiple clouds at my customers usually. Simply choose the one you like most.

3.a ACCS

ACCS is a Oracle Public Cloud PaaS service that provides several language runtimes. ACCS is based on Docker containers, but don’t worry, you won’t see any of them. With ACCS you can easily deploy Java, Java EE, as well as Python, Ruby, NodeJS and even Go code. Also it supports spinning up multiple instances with load balancing.

Deploying a .jar file on ACCS is as straight forward as it gets:

  1. zip it.
  2. upload it.
  3. run it.

However, there is one more thing: to successfully run the .jar file we need to add a manifest.json file that contains the exact command how the jar file will be started in the Java container. It should be all obvious watching the webcast. Check my other posting to learn about ACCS and Java EE.

3.b Beanstalk

The AWS Beanstalk deployment isn’t more complicated than the ACCS one. Actually even the manifest.json file can be omitted. Beanstalk implicitly understands how to run a .jar file (which of course is easy in most cases: java -jar demo.jar). So all you need to do is upload to Beanstalk. However with Beanstalk we have to make sure to include a SERVER_PORT variable and set its value to 5000. This is required since Beanstalk is internally listening to port 5000 but Spring Boot uses 8080.

5. Web cast

I created a web cast for you with all the details.

6. Ressources

Some additional resources that you might find useful:

  1. Kotlin language
  2. Try Kotlin online
  3. Spring Initalizer
  4. Get started with ACCS
  5. Access the demo code from github. TO DO.
  6. AWS Beanstalk

 

 

Java One 2017: Open Source Big Data in the Cloud (Hadoop, Hive, Spark, Kafka)

It’s true. I always said “presenting at Java One is like playing in champions league”. Last month I had the great pleasure to present at the Java One 2017 conference in San Francisco together with Edelweiss Kammermann about Open Source Big Data used in the cloud. The presentation included 4 live demos about Apache Hadoop with Map Reduce, Apache Hive, Apache Spark and Kafka all using Oracle Big Data Cloud Service – Compute Edition (aka BDCS-CE) and the Oracle Event Hub Service. The presentation was recorded – so you can enjoy from anywhere in the world.

For your convenience the slides are available on slideshare:

Oracle CODE San Francisco Review: From Docker Swarm on a Raspi to Oracle Container Cloud Service (OCCS) with Wercker

Last month I presented at the Oracle CODE event in San Francisco. The presentation included almost 30 minutes of live hacking with Docker Swarm on a Raspberry Pi running Hypriot Linux. I was scheduled to speak at 8.30h in the morning and still an amazing number of 90 people showed up – thanks guys! The presentation was recorded – so you can enjoy it from the comfort of your living room.

The presentation is online here:

You can get the slides from slideshare.com:

Fixed SOA Suite CS Error in Oracle Cloud: Validation Failed – Unable to Create Service / Invalid Storage Container

Situation

This post should provide some help for those working for the first time with SOA CS in the Oracle Cloud.

After working a lot with ACCS, OCCS, Developer CS, and JCS, surprisingly I struggled with the provisioning of SOA CS in the Oracle Cloud. Part of the problem was that the storage service seems to be accessed in (at least) three different ways within OPC .

  1. The syntax StorageName-IDDomain/chosenContainerName workes fine for DB and Java CS. There also you can create the storage container while provisioning the service.
  2. I have seen slides at OOW2017 where the storage container name was specified as a single identifier, e.g. “xyzcontainer” (however I cannot find the my paparazzi for that cloud service right now).
  3. For SOA CS none of this worked. Also the reported solution in the ODC forum did not apply in this case. The tooltip actually suggested the syntax 1).

    Also the error message(s) is not that helpful. “Validation Failed” could mean anything. “Check the log file for the real cause” makes me wonder in case of a PaaS service. What worked for SOA CS is using pre-creating the container and using the REST endpoint of the storage service.

Some Details

For SOA CS, when using the syntax that nicely worked for DB and JCS as described in 1) be prepared to see the following error message:

If you are trying to use the REST endpoint of the storage service, you might see the following rather cryptic error message if you are slightly off with the syntax.

Solution

What worked for me:

  • Precreate the storage container with the storage service console
  • Get the REST endpoint from the storage service. This is a bit hidden under Storage / View Details.
  • The syntax of the endpoint is like this:
    https://Storage-a534966.storage.oraclecloud.com/v1/Storage-f275638b05994123123123
  • Append the container name to the REST endpoint
  • Use this as storage container name

Improvements

Anyway. Thanks to Jenny for suggesting solution 3.)! IMHO, error messages given by SOA CS need improvement, also the handling of storage container needs be unified across all services and communicated in a much better way. As I already posted for Big Data CS-CE, the tooltip information for storage container is conflicting with the documentation.

A few days ago, I forwarded these issues to Oracle and received feedback that they will work on 1) improving our Cloud UI / UX design and consistency, 2) delivering useful tooltips and error messages.

For those who care: I started to write a posting about design criteria for a good PaaS.