Developing Applications with a Security-Minded Focus | @DevOpsSummit #APM #Agile #DevOps

JDJ - Fri, 2016-11-18 23:15
Home-maintenance repair and services provider ServiceMaster develops applications with a security-minded focus as a DevOps benefit. To learn how security technology leads to posture maturity and DevOps business benefits, we're joined by Jennifer Cole, Chief Information Security Officer and Vice President of IT, Information Security, and Governance for ServiceMaster in Memphis, Tennessee, and Ashish Kuthiala, Senior Director of Marketing and Strategy at Hewlett Packard Enterprise DevOps. The discussion is moderated by BriefingsDirect's Dana Gardner, Principal Analyst at Interarbor Solutions.

read more

Categories: Java

Inner Source and Software Delivery | @DevOpsSummit #DevOps #OpenSource #ContinuousDelivery

JDJ - Fri, 2016-11-18 22:30
What is inner source? I spoke about it during my webinar on Tuesday, Nov. 8, but here's a review. At its most fundamental level, inner source is about replicating successful work practices of the open-source world to commercial software projects. There are numerous examples of open source software making big splashes in the commercial space - Linux, Firefox, Apache - and inner source takes many of the lessons learned from these massively successful projects and shows you how you can apply some of those same ideologies and practices to your business.

read more

Categories: Java

[slides] Moving Fast with Microservices | @DevOpsSummit #DevOps #Containers #Microservices

JDJ - Fri, 2016-11-18 16:30
As software becomes more and more complex, we, as software developers, have been splitting up our code into smaller and smaller components. This is also true for the environment in which we run our code: going from bare metal, to VMs to the modern-day Cloud Native world of containers, schedulers and microservices. While we have figured out how to run containerized applications in the cloud using schedulers, we've yet to come up with a good solution to bridge the gap between getting your containers from your laptop to the cloud. How do we build software for containers? How do we ship containers? How do we do all of it without shooting ourselves in the foot?

read more

Categories: Java

FinTech @CloudExpo | #AI #ML #DL #FinTech #Blockchain #MachineLearning

JDJ - Fri, 2016-11-18 13:15
Financial Technology has become a topic of intense interest throughout the cloud developer and enterprise IT communities. Accordingly, attendees at the upcoming 20th Cloud Expo at the Javits Center in New York, June 6-8, 2017, will find fresh new content in a new track called FinTech.

read more

Categories: Java

The Internal Cache of Integers

Java Lobby Announcements - Fri, 2016-11-18 12:31
The Internal Cache of Integers

There is an IntegerCache in java.lang.Integer which stores instances for values -128 though 127. This means that Integer.valueOf(17) always will return the very same instance, while Integer.of(200) will not. While this clearly has the advantage of reuse of commonly used Integer values, thus relieving the GC from some work, it also has implications for autoboxing and identity comparisons.

The Cache

An easy way to see the cache in action is to investigate identity for two small integers compared to numbers outside the scope of the cache. The following two statements both hold true.

Categories: Java

Fixed-Point and Floating-Point: Two Things That Don't Go Well Together

Java Lobby Announcements - Fri, 2016-11-18 11:01

One of the more challenging aspects of software development can be dealing with floating-point numbers. David Goldberg's 1991 Computing Surveys paper What Every Computer Scientist Should Know About Floating-Point Arithmetic is a recognized classic treatise on this subject. This paper not only provides an in-depth look at how floating-point arithmetic is implemented in most programming languages and computer systems, but also, through its length and detail, provides evidence of the nuances and difficulties of this subject. The nuances of dealing with floating-point numbers in Java and tactics to overcome these challenges are well documented in sources such as JavaWorld's Floating-point Arithmetic, IBM DeveloperWorks's Java's new math, Part 2: Floating-point numbers and Java theory and practice: Where's your point?, Dr. Dobb's Java's Floating-Point (Im)Precision and Fixed, Floating, and Exact Computation with Java's Bigdecimal, Java Glossary's Floating Point, Java Tutorial's Primitive Data Types, and NUM04-J. Do not use floating-point numbers if precise computation is required.

Most of the issues encountered and discussed in Java related to floating-point representation and arithmetic are caused by the inability to precisely represent (usually) decimal (base ten) floating point numbers with an underlying binary (base two) representation. In this post, I focus on similar consequences that can result from mixing fixed-point numbers (as stored in a database) with floating-point numbers (as represented in Java).

Categories: Java

Three Methods to Automatically Validate PDF Data

Java Lobby Announcements - Fri, 2016-11-18 10:01

An insurance customer delivery team wanted to (as part of regression testing) automate the validation of data present in PDF documents. After going through the requirements, we explored multiple options and suggested three solutions, each with its own set of unique features. Two of the options involve a two-step process, where the first step converts the PDF document into a text document, while text is extracted in the second step. In this article, we elaborate on the problem and also share an overview of each option.


Recently, we were in a discussion with a project delivery team that was dealing with PDF documents. The delivery team works for an insurance customer, where one of their activities is to generate customer policies as PDF documents. As a standard process, the PDF documents generated are verified for content and structure and then sent to the customer. After each functionality change, the team needs to perform a regression test using various data sets and multiple templates. Today, the team has to go through each generated PDF document and validate information like name, address, policy number, policy start date, and the like, manually. As the number of tests is expected to grow along with the number of PDF templates, the team wanted a solution that would reduce the manual efforts involved and work across a large volume of documents.

Categories: Java

Tracing in Microservices With Spring Cloud Sleuth

Java Lobby Announcements - Fri, 2016-11-18 08:31

One of the problems developers encounter as their microservice apps grow is tracing requests that propagate from one microservice to the next. It can quite daunting to try and figure out how a requests travels through the app, especially when you may not have any insight into the implementation of the microservice you are calling.

Spring Cloud Sleuth is meant to help with this exact problem. It introduces unique IDs to your logging which are consistent between microservice calls which makes it possible to find how a single request travels from one microservice to the next.

Categories: Java

The Beauty of Quasi-Enumerations

Java Lobby Announcements - Thu, 2016-11-17 23:37

Everybody knows at least some HTTP Status Codes, even if they don’t realize it. Most people did at one point or another in their web browsing career see the famous 404 – Not Found, or 200 – OK codes.

How could these codes be represented in Java code, however, when writing HTTP client or server code?

Categories: Java

[slides] M2M IoT Communications | @ThingsExpo #IoT #M2M #RTC #WebRTC

JDJ - Thu, 2016-11-17 15:00
Fifty billion connected devices and still no winning protocols standards. HTTP, WebSockets, MQTT, and CoAP seem to be leading in the IoT protocol race at the moment but many more protocols are getting introduced on a regular basis. Each protocol has its pros and cons depending on the nature of the communications. Does there really need to be only one protocol to rule them all? Of course not. In his session at @ThingsExpo, Chris Matthieu, co-founder and CTO of Octoblu, walked through how Octoblu solved this problem by building an open source, cross-protocol IoT M2M instant messaging platform utilized by thousands of users and companies to allow disparate devices to communicate seamlessly with each other and other platforms.

read more

Categories: Java

Small Scale Stream Processing Kata (Part 1): Thread Pools

Java Lobby Announcements - Thu, 2016-11-17 12:41

Once again I prepared a programming contest on GeeCON 2016 for my company. This time the assignment required designing and optionally implementing a system given the following requirements:

A system delivers around one thousand events per second. Each event has at least two attributes:

Categories: Java

Supporting Your Unsupported Class Version Error [Code Snippet]

Java Lobby Announcements - Thu, 2016-11-17 11:01

This article covers how to fix Java errors akin to UnsupportedClassVersionError. Please feel free to comment/suggest if I missed something.

How to Reproduce the Error
  • Set JAVA_HOME with one version of Java. Include a “bin” of different Java versions in the PATH variable.
  • Compile the class, for example, with “javac”.
  • Start the JVM with following class: “java HelloWorld”.

With the steps above, you might see an error like:

Categories: Java

Gradle Goodness: Validate Model In Rule Based Model Configuration

Java Lobby Announcements - Thu, 2016-11-17 10:01

Rule based model configuration gives Gradle more knowledge about the objects and their dependencies. This information can be used by Gradle to optimise the build process. We define rules on how we want Gradle to create objects and how we want to mutate objects in a class that extends RuleSource. We can also add rules to validate objects available in the Gradle model space. We use the @Validate annotation on methods that have validation logic. The first argument of the method is of the type of the object we want to validate. This type must be managed by Gradle.

In the following example we use the sample from a previous post. In this sample, we have a VersionFile class that is managed by Gradle. The class has a version and outputFile property. The version must be set and must start with a v. The outputFile property is also required.

Categories: Java

This Week in Spring: SpringOne Talks, REST APIs, and Spring 5's Approach

Java Lobby Announcements - Thu, 2016-11-17 08:31

Welcome to another installment of This Week in Spring! Time sure is flying! We’ve got so much to get into this week. Can you believe we’re staring down 2017? We’ve got so much to cover so let’s get to it!

Categories: Java

Getting Started with Java and Couchbase [Video]

Java Lobby Announcements - Thu, 2016-11-17 07:31

In this quickstart video tutorial, you'll learn how to set up and start building a Java application that communicates with Couchbase Server to save NoSQL JSON data as well as query for it numerous ways.

For more information on how to use the Couchbase Java SDK, visit the Couchbase developer portal. For help getting Couchbase Server set up on your machine, check out the Ubuntu, Windows, Mac, or Docker tutorials.

Categories: Java

Define-Datatype and Cases in Clojure

Java Lobby Announcements - Wed, 2016-11-16 12:31

I'm going through the Essentials of Programming Languages (3rd ed.) book and it's been pretty good so far. In chapter 2, the authors use a pair of macros — define-datatype and cases — to make it easy to define data-driven programs, where objects belong to types, each of which has several "variants" with custom fields.

The canonical example used chapter 2 is the "Lambda calculus expression":

Categories: Java

Learn Drools: Part III (Filter Facts)

Java Lobby Announcements - Wed, 2016-11-16 11:01

In the previous article, we saw how Drools creates a Cartesian product between Facts if there is a HAS-A relationship between Domain Object/Facts. In this article we will learn how to filter the facts. You can think it as of using Where clause in SQL to filter the resultset.

Let's understand it with the same problem we have used in the previous article, where we created the following Drools Rule.

Categories: Java

Gradle Goodness: Set Default Values with Rule-Based Model Configuration

Java Lobby Announcements - Wed, 2016-11-16 10:01

When we use rule-based model configuration in our Gradle project, we can give Gradle rules on how to manage objects from the model space. These rules are defined in a class that extends RuleSource. When we want to set some default values for properties of a model object (in Gradle terms this is a subject) we can use the @Defaults annotation. Rules annotated with @Defaults are invoked right after the object is created and before any other methods that can mutate the state of the object.

The method, to set the default values, must have the type of the object as the first parameter. Other parameters are considered input parameters and can be used to set a default value based on other model objects.

Categories: Java

Pippo and Jersey (JAX-RS): A Match Made in Heaven

Java Lobby Announcements - Wed, 2016-11-16 08:31

For the last few, days I have been playing with Pippo and Jersey (JAX-RS) and I wanted to share my experience with you. The result (a very good one) and the details of my experiment are materialized in this article — along with a demo application.

To begin with, I would like to say a few words about the main actors:

Categories: Java

Toward More Functional Java: Digging Into Nested Data Structures

Java Lobby Announcements - Wed, 2016-11-16 07:31

In the last post, we saw an example that used a generator combined with a filter to find the first available port in a specific range. It returned an Optional to model the case when no open ports are found, as opposed to returning null. In this example, we'll look at how to use Java 8 streams to dig into a nested data structure and find objects of a specific type. We'll use map and filter operations on the stream, and also introduce a new concept, the flat-map.

In the original, pre-Java 8 code that I was working on in a project, the data structure was a three-level nested structure that was marshaled into Java objects from an XML file based on a schema from an external web service. The method needed to find objects of a specific type at the bottom level. For this article, to keep things simple we will work with a simple class structure in which class A contains a collection of class B, and B contains a collection of class C. The C class is a base class, and there are several subclasses C1, C2, and C3. In pseudo-code the classes look like:

Categories: Java


Subscribe to EGJUG aggregator - Java