Enterprise grade Java.
You'll read about Conferences, Java User Groups, Java, Integration, Reactive, Microservices and other technologies.

Friday, September 16, 2016

Replacing legacy Java EE application servers with microservices and containers

18:39 Friday, September 16, 2016 Posted by Markus Eisele
, ,
Lightbend recently ran a survey with more than 2000 JVM developers and the results just got published. The survey was launched to discover:  correlations between development trends and IT infrastructure trends, how organizations at the forefront of digital transformation are modernizing their applications, and real production usage break-downs of today’s most buzzed about emerging developer technologies. While you can download the complete results from the official website, I would love to highlight some particular things that I found very interesting. Especially around containers and microservices.

Lightweight Containers Are Democratising Infrastructure and Challenging the Old Guard Java EE App Servers
The momentum around containers has gone much more quickly than many anticipated. People are looking at containers as that great hope for infrastructure portability that they’ve been chasing for a long time. And I was always interested in learning about how containers are actually used by developers in the wild. And bottom line is, that containers are really happening in production right now. What types of applications are people putting in containers is the million dollar question. Today it’s primarily greenfield applications, with far fewer examples of legacy applications being modernized for containers in production. This is the reason, that everybody is looking for more leightweight approaches to run their applications on the JVM without the overhead of Java EE servers. The survey has more details around which kind of containers and orchestration models.

Microservices and Fast Data Are Driving Application Modernization Efforts
Microservices-Based Architectures advocate the creation for a system build from a collection of small, isolated services, each of which owns their data, and is independently isolated, scalable and resilient to failure. Services integrate with other services in order to form a cohesive system that’s far more flexible than legacy monolithic applications. But how is this taken into production? Are people already building those systems or is this just a hype? Almost three third of the respondents run a microservice based system in production. And as I've been talking about in my talks before, the driver is mostly the need for real time data handling and streaming requirements.

The survey reveals a lot more details and I strongly suggest, that you look at the details of it. One thing is for sure, the changing requirements put on today's architectures can't be easily meet by just creating new applications on old platforms. And even Java EE is starting to adopt those new principles as JavaOne will hopefully how in a couple of days. I keep you posted.

Wednesday, August 31, 2016

Join me for the Reactive Microservices Roadshow

10:00 Wednesday, August 31, 2016 Posted by Markus Eisele
, ,
What are the benefits of the Reactive Manifesto and the Microservices approach, especially for those who want to fundamentally modernize their business? I will discuss this at the free event „Reactive Microservices Roadshow“, on 28th September in Berlin. The event is hosted by codecentric AG and Lightbend. There will be three talks which walk you through the most important parts.

Reaktive Mircroservices with Akka (Heiko Seeberger)
The Reactive Manifesto defines essential qualities which modern systems need to have in order to cope with today's requirements: Responsiveness, which is the cornerstone of usability and utility, requires resilience and elasticity; all of these are based upon asynchronous messaging. In this talk we look at the meaning of "Reactive" for a microservice architecture, for individual services and for their collaboration.

AutoScout24 goes Microservices (Christian Deger)
Fed up with stop and go in your data center? Why not shift into overdrive and pull into the fast lane? Learn how AutoScout24, the largest online car marketplace Europe-wide, are building their Autobahn in the cloud.
Reinventing themselves by making a radical transition from monoliths to microservices, from .NET on Windows to Scala on Linux, from data center to AWS and from built by devs and run by ops to a DevOps mindset.

One microservice is no microservice—they come in systems! (Markus Eisele)
Building a complete system out of individual Microservices is not as simple as we're being told. While Microservices-based Architecture continues to draw more and more attention we're also starting to learn about the trade-offs and drawbacks. Individual Microservices are fairly easy to understand and implement, but they only make sense as systems, and it is in-between the services that the most challenging (and interesting) problems arise—here we are entering the world of distributed systems.

Find a German event description on the codecentric.de website. Looking forward to interesting discussions! Make sure to REGISTER for FREE TODAY!

Lightbender at JavaOne 2016

07:20 Wednesday, August 31, 2016 Posted by Markus Eisele
It's only short 16 days until the Java community is starting to travel to San Francisco again. The annual family gathering at JavaOne is the place to be and it's time to get a little excited about attending once again. This year, Lightbend is a bronze sponsor and I am excited to be one of the featured speakers! A lot is going to happen during the week and you have to plan your schedule accordingly to get the most out of it.

A must attend are the sessions by Lightbend engineers.

Monitoring Reactive Microservices [CON1091] with Henrik Engström (@h3nk3)
Tuesday, Sep 20, 4:00 p.m. - 5:00 p.m. | Parc 55—Market Street
Reactive applications are the next major evolution of the internet. They allow for applications to be responsive, scalable, and resilient by building on a fully event-driven foundation. However, at the same time, this way of architecting systems introduces some new issues. One of these issues is how to monitor this type of system. This session covers the traditional monitoring approach and different ways to monitor asynchronous applications and finally looks at the way Lightbend has chosen to build a monitoring tool for reactive applications. After this presentation, developers will have a better understanding of how to monitor microservices in a reactive architecture.

End-to-End Reactive Streams, from Socket to Business [CON1852] with Konrad Malawski (@ktosopl)
Thursday, Sep 22, 11:30 a.m. - 12:30 p.m. | Hilton—Continental Ballroom 1/2/3
The Reactive Streams specification, along with its TCK and various implementations such as Akka Streams, is coming closer and closer with the inclusion of the RS types in JDK 9. Using an example Twitter-like streaming service implementation, this session shows why this is a game changer in terms of how you can design reactive streaming applications by connecting pipelines of back-pressured asynchronous processing stages. The presentation looks at the example from two perspectives: a raw implementation and an implementation addressing a high-level business need.

Stay Productive While Slicing Up the Monolith [CON6472] with myself (@myfear)
Tuesday, Sep 20, 11:00 a.m. - 12:00 p.m. | Parc 55—Mission
With microservices-based architectures, developers are left alone with provisioning and continuous delivery systems, containers and resource schedulers, frameworks and patterns to slice monoliths. How to efficiently develop them without having to provision complete production-like environments locally by hand? How to run microservices-based systems on local development machines, managing provisioning and orchestration of hundreds of services from a command-line tool without sacrificing productivity enablers. New buzzwords, frameworks, and hyped tools have made Java developers forget what it means to be productive. This session shows how much fun it can be to develop large-scale microservices-based systems. Understand the power of a fully integrated microservices development environment.

One Microservice Is No Microservice: They Come in Systems [CON6471] with myself (@myfear)
Wednesday, Sep 21, 1:00 p.m. - 2:00 p.m. | Parc 55—Embarcadero
Building a complete system out of individual microservices is hard. Microservices-based architecture is gaining attention, but there are trade-offs and drawbacks. Individual microservices are fairly easy to understand and implement, but they make sense only as systems; it’s between services that the most-challenging problems arise—in distributed systems. Slicing a system into REST services and wiring them back together with synchronous protocols and traditional enterprise tools means failure. This session distills the essence of microservices-based systems and covers a new development approach to microservices that gets you started quickly with a guided, minimalistic approach on your machine and takes you to a productive scaled-out microservices-based on the Oracle Cloud system with hundreds of services.

The Cloud-Natives Are RESTless [CON2514] Panel session with Konrad Malawski (@ktosopl)
Wednesday, Sep 21, 8:30 a.m. - 9:30 a.m. | Parc 55—Powell I/II
Representational State Transfer—the REST architecture—has served us well for the past 15 years as a style of cross-language distributed computing that is web-friendly. REST is simple and cacheable and is implemented over the original protocol for the web, good ole HTTP. For many use cases, the synchronous, request/response nature of REST fits perfectly. What are the alternatives to REST for event-based Java microservices? What reactive frameworks should Java developers learn and use in their services and overall application architecture? What synchronous cross-language alternatives should Java engineers use for high-performance, non-HTTP distributed computing in 2016 and beyond? Attend this session to find out.

I am looking forward to meet all the amazing peers from the Java Community! Find more information on the official JavaOne website and on the JavaOne blog and make also sure to follow @JavaOneConf on Twitter. And also don't forget to follow @myfear and @lightbend for more fun and games and raffles and stuff during JavaOne!

Friday, August 5, 2016

Remote JMS with WildFly Swarm

09:16 Friday, August 5, 2016 Posted by Markus Eisele
, ,
I'm blogging about WildFly swarm again? Short version is: I needed a test for remote JMS access and refused to setup something complex like a complete application server. The idea was to have a simple WildFly Swarm application which has a queue and a topic configured. Both should be accessible remotely from a standalone Java application. While the topic receives messages a Message Driven Bean (MDB) dumps the output to the console. The queue is filled with random text+timestamp messages by a singleton timer bean.
Turned out, that WildFly Swarm can do it, but for now only in the snapshot release.

The code
Find the complete code on my GitHub repository. It's not the most beautiful thing I have written but it actually shows you the complete configuration of Swarm with the relevant security settings, and the construction of the queue and the topic. In short the MessagingFraction needs the relevant security settings with remote access enabled and it also needs to define the remote topic. The NamingFraction needs to enable the remote naming service and finally the ManagamentFraction needs to define authorization handler.

How to run the example
To run the server, you can just use 'mvn wildfly-swarm:run' after the startup, you see the timer bean starting to emit messages to the queue:

2016-08-05 08:44:48,003 INFO  [sample.SampleQueueTimer] (EJB default - 5) Send: Test 1470379488003
2016-08-05 08:44:49,005 INFO  [sample.SampleQueueTimer] (EJB default - 6) Send: Test 1470379489005

If you point your browser to http://localhost:8080/ you can trigger a single message being send to the topic. This also get's logged to the console:

2016-08-05 08:44:36,220 INFO  [sample.SampleTopicMDB] (Thread-250 (ActiveMQ-client-global-threads-859113460)) received: something

The real magic happens, when you look at the standalone Java client. It performs the relevant JNDI lookups and creates the JMS connection with user and password, the session and the producer and finally produces and sends a text message.
More about the "why the hell does he needs Java EE again" in some upcoming blog posts ;)

A super big thank you goes out to Ken Finnigan who fixed the issue I ran into literally over night!

Monday, August 1, 2016

Build and deploy microservices the modern way

15:53 Monday, August 1, 2016 Posted by Markus Eisele
, ,
There's been a lot of buzz from me lately around microservices and containers. And all the efforts were directed towards today's public announcement by Lightbend and Mesosphere. If you are interested in learning more about how traditional architectures are beginning to evolve very quickly to embrace microservices architecture and various cloud and hybrid-cloud deployment models, I would love to invite you to listen to the recording of my recent webinar with Aaron Williams from Mesosphere. Find the slides on slideshare, the recording is embedded below.

The traditional model that enterprises run their businesses on has typically been delivered as monolithic applications running in a virtualized, on-premise infrastructure. We’ve seen how public and private cloud technologies have changed everything, but if the applications are not designed, or re-designed, appropriately, then it is impossible to take advantage of the advances in both distributed application services and hybrid infrastructure. Consequently, we will show how enterprise architects are looking to microservices architecture and technologies like Mesosphere DC/OS as a means to modernize their legacy applications.

This webinar introduces Lagom, a new framework specifically designed to help developers modernize legacy Java EE applications into systems of microservices and then discuss exactly what is required to run these distributed systems at enterprise scale with DC/OS.

Friday, July 15, 2016

CQRS with Java and Lagom

14:36 Friday, July 15, 2016 Posted by Markus Eisele
, , ,
I've had the pleasure to talk at the Chicago Java User Group and talk about how Lagom implements CQRS, the Command Query Responsibility Segregation pattern. Thankfully, there is a recording and I also published the slides on slideshare.

As soon as an application becomes even moderately complex, CQRS and an Event Sourced architecture start making a lot of sense. The talk is focused on: - the challenges and tactics of separating the write model from the query model in a complex domain - how commands naturally lead to events and to an event based system, and - how events get projected into useful, eventually consistent views. Event Sourcing is one of those things that you really need to push through at the beginning (much like TDD) and that - once understood and internalized, will change the way you architect a system. This talk introduces you to the basic concepts and problem spaces to solve.

Thanks again for hosting me, CJUG! It was a real pleasure!

Tuesday, June 7, 2016

How Cloud, Containers, Microservices and you can help Charity!

14:01 Tuesday, June 7, 2016 Posted by Markus Eisele
, , ,
No, this isn't a customer success story. And this isn't the typical post about some awesome stuff that you can do with technology. This time it is actually about knowledge in a different kind. Lightbend would love to know how you use the Cloud, Containers and Microservices in your daily work. How Enterprises are adopting these technologies and last but not least, how influential are the decisions that are made in development to the final system architecture choices being made.

Take the quick ten minute survey and don't forget to share the link with friends, colleagues and your contacts.

The results will be published next month (July) on the Lightbend tech blog!
Lightbend is donating to Charity for each completed survey! It's going to be either #yeswecode, SeniorNet or Mouse and you can select the cause at the end of the survey.  Make you voice heard and your answers count! We are aiming to break 3000 respondents, which unlocks a total donation of $1500!

Share the link

Sunday, May 15, 2016

Modern Architecture with Containers, Microservices, and NoSQL

14:19 Sunday, May 15, 2016 Posted by Markus Eisele
, ,
On Tuesday, May 10, 2016 I had the pleasure to join Arun Gupta (Couchbase), Mano Marks (Docker) and Shane Johnson (Couchbase) for a great webinar with ADTMag. You can watch the complete replay for free after registration. This blog highlights some of the most prominent findings and provides a brief writeup.

After a short introduction of the main business drivers behind the new architectures and the panel by Arun Gupta, it was time for Mano Marks (@manomarks) from Docker to give an overview of the container hype. With applications changing from centralised server installations which very rarely got updated to loosely coupled services with a high update frequency running on my small servers, containers provide a standard format which is easily portable between environments. Docker provides a great ecosystem around their products and is a solid foundation for applications following the new principles.

After Mano, it was my part. I did an overview from where we came from in terms of monolithic applications and why they survived so long including their advantages. With the introduction of microservices or better "right-sized" services we finally start to build systems for flexibility
and resiliency, not just efficiency and robustness. The relevant aspects for a successful microservices architecture are plenty and not easily to be achieved by using a single framework. You also have to respect the architecture, software design, methodology and organisation and also embrace the distributed systems thinking. I introduced the audience to some available decomposition strategies and also gave a very quick rundown about the Lightbend microservice framework Lagom.

Shane finished the presentation part of the webinar with an overview about the capabilities of the Couchbase server and how it supports application modernisation and microservice base architectures. The following FaQ with all the panelists tried to answer some of the most pressuring audience questions.

The whole webinar runs for an hour and it is packed with all the latest information around modern architectures. With the additional minutes spend on an hour, this is pretty much the most recent information you can get on the topic by the top speakers in the field. If you have nothing to do on this rainy weekend I highly recommend to watch it!

Wednesday, May 11, 2016

Developing Reactive Microservices with Java - My new free mini-book!

20:26 Wednesday, May 11, 2016 Posted by Markus Eisele
, ,
I am very happy to announce, that I finished another O'Reilly Mini-Book a couple of weeks ago. After the success of the very first edition which introduced you to the overall problem space of microservices and the amazing book by Jonas Bonér about the architecture of reactive microservice systems, it was about time to share a little more about how to implement them in Java. I am very proud to had Jonas write the foreword for this one and that I was able to write another 50+ pages in such a short time. The book uses Lagom as a framework to walk you through the service API, persistence API and how to work with Lagom-Services. Can't wait to hear your feedback and get you to try out Lagom. Here is the complete abstract and you'll find some further readings and links at the very bottom of the post. Did I mention, it is free to download? It is!

With microservices taking the software industry by storm, traditional enterprises running large, monolithic Java EE applications have been forced to rethink what they’ve been doing for nearly two decades. But how can microservices built upon reactive principles make a difference?

In this O’Reilly report, author Markus Eisele walks Java developers through the creation of a complete reactive microservices-based system. You’ll learn that while microservices are not new, the way in which these independent services can be distributed and connected back together certainly is. The result? A system that’s easier to deploy, manage, and scale than a typical Java EE-based infrastructure.

With this report, you will:

  • Get an overview of the Reactive Programming model and basic requirements for developing reactive microservices
  • Learn how to create base services, expose endpoints, and then connect them with a simple, web-based user interface
  • Understand how to deal with persistence, state, and clients
  • Use integration technologies to start a successful migration away from legacy systems
  • The detailed example in this report is based on Lagom, a new framework that helps you follow the requirements for building distributed, reactive systems. Available on GitHub as an Apache-licensed open source project, this example is freely available for download.

Markus Eisele is a Developer Advocate at Lightbend. He has worked with monolithic Java EE applications for more than 16 years, and now gives presentations at leading international tech conferences on how to evolve these applications into microservices-based architectures. Markus is the author of Modern Java EE Design Patterns (O’Reilly).

Tuesday, April 12, 2016

Integration Architecture with Java EE and Spring

14:27 Tuesday, April 12, 2016 Posted by Markus Eisele
, , ,
The O'Reilly Software Architecture Conference in New York happens this week. And I had the pleasure to give a tutorial together with Josh Long about how to integrate Java EE and Spring. We've been joking about this one since a while. The super stupid biased view onto both technologies which some people have in mind was something that bugged both of us since a while. Another important reason for this talk was, that we both are caring about modernisation of old applications. There is so much legacy software out there that is easy 10+ years old. And you find those legacy applications in both technologies. This is, why we wanted to help people to understand how to modernise them and survive the transition phase.

A little history about Spring and Java EE
The first part of the talk caught up on a little historical background of both technologies. Where they came from and how they evolved and lead into the state they are in today. Both evolved significantly since their inception and asking the question about what to chose today can easily be answered with a single sentence: "Chose the right tool for the right job". But you can even mix and match for many reasons.

Spring on Java EE
There is a broad space of problems where you might think about using Spring on top of Java EE. While EE has been around and evolved a lot, we had to learn that you can't really innovate in a standard body. This lead to more than just a handful of features that are to be desired if you build a reasonable modern application. Some of those gaps include the security space (social logins), NoSQL integration, enterprise integration in general. And while you are free to pick from Java EE open or closed source offerings to close them, Spring most often has an answer in the family which makes it easy to use the same programming model and have an integrated offering. Plus, the Spring framework has a very long tail: Spring framework 4 runs on Servlet 2.5+ (2006!!), Java EE 6 (2009) and Java 6+. Which makes it very easy to use modern features even on the most outdated base platform. Find the demo code in my github repository and enjoy how easy it is to deploy a spring war to a Java EE server and just use the APIs.

Java EE on Spring
But you can also turn this around and use Java EE APIs with Spring. The reasons you might want to do this are plenty: It can be a first migration step towards Spring while simply re-using some of your old code. Plus you want to use standards where standards make sense and where everything else would be to invasive. Examples include JTA, JPA, JSR303, JSR 330, JCA, JDBC, JMS, Servlets, etc.
And there is also an example app which you can run as a Spring Boot based fat-jar while using (mostly) Java EE APIs in it.

Technical Integration and Microservices
The last part of the presentation touched on technical integration between two systems and the technologies supported in both worlds. We also talked about microservices designs and answered a bunch of questions over the turn of the three hours.
I really enjoyed it and have to admit that Josh is an amazing presenter and I learned a hell lot over the last couple of days working with him! It's a pleasure to know you, Josh! Make sure to follow him on Twitter @starbuxman.