Multi-Node Distributed Execution Using Hazelcast and Dexecutor

Java Lobby Announcements - Thu, 2016-10-13 06:31

Today, we will try to execute Dexecutor in a distributed mode using Hazelcast. For the demo, we would be setting up multiple Hazelcast nodes on a single machine.

Refer to Introducing Dexecutor to get an introduction to Dexecutor and to understand the problem we'll solve in a distribute fashion. In short:

Categories: Java

How to Create Runtime JUnit Test Cases

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

Sometimes, we have a situation when we need to create the JUnit test-cases at runtime. For example, we do have a file which has n number of test cases with different inputs, so we can create n number of JUnit test cases at runtime. So we have to extend the features of JUnit to provide the reusability of tests. So, for the same piece of test logic, we can have n number of JUnit test cases placed with different inputs. I have introduced the custom runner to achieve the same.

Basically, we need to extend the org.junit.runners.BlockJUnit4ClassRunner concrete class in my JUnitFactoryRunner concrete class. JUnitFactoryRunner is a runner that collects and processes methods. There are two concerns — one is collecting the tests and the second is executing them. JUnitFactoryRunner has the ability to hold the number of tests from our test class.

Categories: Java

How to Position Yourself for Java Success [Video]

Java Lobby Announcements - Wed, 2016-10-12 10:01

Learning Java can be complex, yet simple at the same time. There are a lot of programmers who want to learn Java but don’t know how to start. Java is an awesome programming language that could easily add some spice to your coding skills.

It can be really difficult at first, I know. There are a lot of resources, and it is hard to tell what is the best way to start learning a new programming language. As I’ve said before, learning your first programming language can be difficult. You need to practice a lot and learning a programming language might take some time. You need to invest some time if you’re learning Java for the first time. However, after the first programming language learned, you can easily keep on going.

Categories: Java

Why MVC 1.0 Is Important for Java EE 8

Java Lobby Announcements - Wed, 2016-10-12 09:01

Back in early 2014, Oracle released the results of the Java EE community survey, which was created to gather feedback about what developers want to see in Java EE 8. One of the questions in the survey was whether people would like to see an MVC web framework alongside with JSF in Java EE 8. The result was pretty clear. More than 60% of the participants voted "Yes". As a result, JSR 371 (MVC 1.0) was started to work on the new action-based web framework for Java EE.

Fast forward to 2016. JSR 371 has been doing well. The EG released the second early draft review and got a lot of positive feedback. The JSR was moving forward even after Oracle suddenly stopped all work on the Java EE JSRs.

Categories: Java

20 Years of Java Deprecation

Java Lobby Announcements - Wed, 2016-10-12 07:31

I’m really not sure how I stumbled across this link, but it was a while ago, and I put a reminder in my diary so I’d remember the 20 anniversary of the unveiling of the @deprecated javadoc tag. As such, I thought some reflections on this would make an interesting blog entry.

When Java was first launched, it came with a [fairly limited] set of class libraries. If you search on the Oracle website, you will find archived copies of the JDK going all the way back to JDK 1.1, but it seems they no longer maintain a link to JDK 1.0. After some digging through the vast sea of data I’ve collected over the last 20-plus years, I found a copy of the JDK 1.0.2 source code. Having unpacked it, I found that there were 215 classes and interfaces in the standard class libraries (compare that to over 4,500 in JDK 8!). For your amusement, the table below shows the number of public APIs from each major JDK release (Caveat emptor: I did this with a combination of grep and other commands using mostly the javadocs, so I don’t guarantee that it’s 100% accurate.)

Categories: Java

[slides] Amazon's #IoT Strategy at @ThingsExpo | #BigData #M2M #API #AWS

JDJ - Wed, 2016-10-12 06:45
Amazon has gradually rolled out parts of its IoT offerings, but these are just the tip of the iceberg. In addition to optimizing their backend AWS offerings, Amazon is laying the ground work to be a major force in IoT - especially in the connected home and office. In his session at @ThingsExpo, Chris Kocher, founder and managing director of Grey Heron, explained how Amazon is extending its reach to become a major force in IoT by building on its dominant cloud IoT platform, its Dash Button strategy, Replenishment Services, the Echo/Alexa voice recognition control platform, strategic investments of its Alexa Venture Fund, strategic partnerships with 30+ major consumer package goods companies and the 50-60 million current Prime customers. If you are developing products, services or platforms for IoT, you don't want to miss this session. Amazon does not just want to dominate the backend cloud storage, compute and analysis capabilities for IoT data. This is not an incremental, small potatoes effort. It will use its usual low-cost, market share grabbing approach to stake out a large chunk of the IoT market, especially in the Connected Home and office. This will have significant impacts on Google, Apple, ATT, Comcast and other major and minor IoT players.

read more

Categories: Java

Things I Learned About Fonts While Making a Java Font Library (That You Didn’t Want to Know)

Java Lobby Announcements - Wed, 2016-10-12 06:31

A few months ago, I was working a bit on Pdf2Dom in my free time, which is an open source Java PDF-to-HTML converter. At some point, I bumped into PDFs that were using old and obscure Adobe font formats, which we didn’t support quite yet. So, I started Googling about old Adobe font formats and found out if I wanted a pure Java implementation I was on my own, kid.

I decided to break off the new font features to a project that goes by the catchy name of FontVerter, and I learned a few ugly things about how fonts work.

Categories: Java

[panel] Where Is All the Private Cloud? | @CloudExpo #IoT #BigData #DataCenter

JDJ - Tue, 2016-10-11 23:15
Enterprise IT has been in the era of Hybrid Cloud for some time now. But it seems most conversations about Hybrid are focused on integrating AWS, Microsoft Azure, or Google ECM into existing on-premises systems. Where is all the Private Cloud? What do technology providers need to do to make their offerings more compelling? How should enterprise IT executives and buyers define their focus, needs, and roadmap, and communicate that clearly to the providers?

read more

Categories: Java

IoT = Cloud + Big Data + Analytics | @ThingsExpo #Cloud #IoT #BigData

JDJ - Tue, 2016-10-11 20:15
Two weeks ago (November 3-5), I attended the Cloud Expo Silicon Valley as a speaker, where I presented on the security and privacy due diligence requirements for cloud solutions. Cloud security is a topical issue for every CIO, CISO, and technology buyer. Decision-makers are always looking for insights on how to mitigate the security risks of implementing and using cloud solutions. Based on the presentation topics covered at the conference, as well as the general discussions heard between sessions, I wanted to share some of my observations on emerging trends. As cyber security serves as a foundation and necessary defense for customer and cloud solutions, cyber becomes more and more commoditized. The real impact is how do we deliver a confidence or trust to customers and their customer journey with our organizations.

read more

Categories: Java

[slides] A New Architecture for #IoT | @ThingsExpo #M2M #ML #BigData

JDJ - Tue, 2016-10-11 13:15
Explosive growth in connected devices. Enormous amounts of data for collection and analysis. Critical use of data for split-second decision making and actionable information. All three are factors in making the Internet of Things a reality. Yet, any one factor would have an IT organization pondering its infrastructure strategy. How should your organization enhance its IT framework to enable an Internet of Things implementation? In his session at @ThingsExpo, James Kirkland, Red Hat's Chief Architect for the Internet of Things and Intelligent Systems, described how to revolutionize your architecture and create an integrated, interoperable, reliable system of thousands of devices. He covered the transformative process taken by companies in moving from a two-tier to a three-tier topology for IoT implementations. He also discussed: The benefits of a three-tier approach The emergence of the controller tier as a pivot point for modern enterprise IoT architecture Architecting your IT environment to achieve scalability, reliability and security

read more

Categories: Java

Hello World With JBoss Modules

Java Lobby Announcements - Tue, 2016-10-11 11:31

JBoss Modules is quite an interesting project that powers JBoss application server and some other projects in the JBoss ecosystem. However, I was surprised to find out that there isn't much you can find about Modules on the webs. Documentation is... bad half-done, not that many tutorials exist, and no good examples of how you could use this awesome library in your project. The best you can find is the description on how to apply JBoss Modules within the application server. (sad panda)

I was looking for the simplest "Hello World" example and couldn't find it. Well, why not create one myself then? 

Categories: Java

[slides] WebRTC Reborn | @ThingsExpo #IoT #M2M #RTC #USaaS #WebRTC

JDJ - Tue, 2016-10-11 11:00
WebRTC has had a real tough three or four years, and so have those working with it. Only a few short years ago, the development world were excited about WebRTC and proclaiming how awesome it was. You might have played with the technology a couple of years ago, only to find the extra infrastructure requirements were painful to implement and poorly documented. This probably left a bitter taste in your mouth, especially when things went wrong.

read more

Categories: Java

Multi-Node Distributed Execution Using Ignite and Dexecutor

Java Lobby Announcements - Tue, 2016-10-11 10:01

Today, we will try to execute Dexecutor in a distributed mode using Apache Ignite. For the demo, we would be setting up multiple Ignite nodes on a single machine.

Refer to Introducing Dexecutor, to get an introduction on Dexecutor and to understand the problem we would solve in a distributed fashion. In short:

Categories: Java

Streamplify Your Code

Java Lobby Announcements - Tue, 2016-10-11 09:01

One of the most appealing features of Java 8 streams is the ability to seamlessly parallelize operations. However, failing to understand how stream parallelism works may lead to inefficient code. In this article, we look under the hood of Java 8 streams and learn about the Streamplify library, which offers a series of useful streams (most of them related to combinatorics) and helps you implement your own efficient parallel streams in situations where the standard Java libraries do not provide appropriate solutions.

A key role in enabling parallel operations on streams is played by Spliterators. As the name suggests, a spliterator resembles an iterator and has additionally the ability to split itself. Spliterators cover the elements of a source, which can be, for example, an array, a Collection, an I/O channel, or a generator function. The most important methods declared by the Spliterator interface are: tryAdvance, forEachRemaining and trySplit.

Categories: Java

Java Encapsulation for Adults

Java Lobby Announcements - Tue, 2016-10-11 07:31

For a proper understanding of this article, I'd like you to close your eyes and imagine something. But because having closed eyes and reading at the same time is not an option, we'll skip the "close your eyes" part and jump straight into "imagine."


Imagine you're going to a big dance party with your crush. You're really into him/her, so you don't want to mess up. You want to be sexy, charming and funny. Now, WHAT COULD POSSIBLY GO WRONG?

Categories: Java

Functional Reactive Endpoints With Spring Framework 5.0 [Video]

Java Lobby Announcements - Tue, 2016-10-11 06:31

We're going to have little ado and cut right to the chase. With Spring Framework 5.0's release, one of the cool new features is functional reactive endpoints. Sit down, settle in, and watch as we spend the next 30 minutes detailing how they work and what you can do with them.

Categories: Java

Spring Data Series (Part 4): @Query Annotation

Java Lobby Announcements - Mon, 2016-10-10 11:31

We know that we can delegate query creation to Spring Data. Spring Data is smart enough to derive queries based on the method name. But sometimes, delegation doesn't suit our needs. The way Spring Data creates the query doesn't meet our requirements, so we need to customize the query. Using the @Query annotation, we can customize our query and instruct Spring data to take this customize query, not yours.

When the @Query Annotation Is Needed
  1. Suppose you want to build a query that takes a variety of filtered criteria. Say I want to fetch "Person" based on name, country, gender, and age. We can achieve this via a Spring Data method convention, like findPersonbyNameAndCountryAndGenderAndAge but the readability is pretty bad. So, let's avoid this and use the @Query annotation and create your own query with a suitable method name.

    @Query("select p from Person p where like ?1 and like
    ?2 and gender like ?3 and age=?4  order by country")

    findPerson(String name,String country,String gender,Integer age);

Categories: Java

Hadoop Word Count Program in Scala

Java Lobby Announcements - Mon, 2016-10-10 09:31

You must have seen a Hadoop word count program in Java, Python, or in C/C++ before, but probably not in Scala. So, let's learn how to build a word count program in Scala.

Submitting a job that is written in Scala to Hadoop is not that easy because Hadoop runs on Java so it doesn't understand the functional aspect of Scala.

Categories: Java

Keynote: A New Era of Containers | @CloudExpo #IoT #DevOps #Docker #Kubernetes

JDJ - Mon, 2016-10-10 09:30
In his keynote at 19th Cloud Expo, Sheng Liang, co-founder and CEO of Rancher Labs, will discuss the technological advances and new business opportunities created by the rapid adoption of containers. With the success of Amazon Web Services (AWS) and various open source technologies used to build private clouds, cloud computing has become an essential component of IT strategy. However, users continue to face challenges in implementing clouds, as older technologies evolve and newer ones like Docker containers gain prominence. He’ll explore these challenges and how to address them, while considering how containers will influence the direction of cloud computing.

read more

Categories: Java

Stelligent Bookclub: “Working Effectively with Legacy Code” by Michael Feathers

Java Lobby Announcements - Mon, 2016-10-10 08:01

If you’re a member of the tech industry then you’ve probably had to work with legacy code — those ancient systems that just hold everything together. Not every project is greenfield, thus “Working Effectively with Legacy Code” by Michael Feathers is a book that has a reputation that would provide a good insight into how we could improve our relationships with these necessary systems and provide a better service to our customers. This blog post will share of some the key takeaways from the book.

What Is Legacy Code?

In a world where continuous delivery is on every company’s radar, it’s important to accept that legacy code exists and you’re going to be required to bring it into the fold. One of the key aspects of a successful continuous delivery model is the feedback loop. Your developers and your businesses build confidence in your ability to make changes through testing. Static analysis, unit testing, integration testing, and performance testing are all the difference between having a continuously deployed application and a high risk, rarely changed legacy codebase.

Categories: Java


Subscribe to EGJUG aggregator - Java