08 November 2015
November 6-7, 2015 I visited Java Day Kyiv conference. This report is for myself just to keep track talks I've attended.
Get Past the Syntax, the Real Scare's in the Semantics by Venkat Subramaniam
We often hear programmers complain about the syntax, especially when learning a new language. It turns out that, while syntax plays a role in our ability to learn and use languages, the real force we have to deal with is in the semantics. Once we get past the syntax, the semantics is where the real power and the real scare is. Curious to learn more?
Data exchanges between companies increase a lot. Hence, the number of applications, which must be integrated increases, too. The realization of these integration scenarios is a complex and time-consuming task because different applications and services do not use the same concepts, interfaces, data formats and technologies. Originated and published over ten years ago by Gregor Hohpe and Bobby Woolf, Enterprise Integration Patterns (EIP) became the world wide de facto standard for describing integration problems. They offer a standardized way to split huge, complex integration scenarios into smaller recurring problems. This session revisits EIPs and gives an overview about the status quo and its relevance regarding modern concepts such as Big Data, Internet of Things or Microservices. Fortunately, EIPs offer more possibilities than just being used for modeling integration problems in a standardized way. Several frameworks and tools already implement these patterns. The developer does not have to implement EIPs on his own. Therefore, the end of the session shows different open source frameworks and proprietary tools available, which can be used for modeling and implementing complex integration scenarios by using the EIPs.
At a major telco company in Belgium we have designed and implemented a cutting-edge architecture using microservices and hypermedia (REST level 3 / hateoas) for the entire customer- and business-facing web portfolio. Throughout this session you will learn what the microservices hype is all about, including its benefits and pitfalls based on our experiences of running microservices (including the Netflix OSS) in production at a major company in Belgium. To manage hundreds of microservices you need to apply certain patterns such as circuit breakers, gateways, service registries and so on. You will learn how these patterns work, how they are applied through the Netflix stack and how easy it is to use them in your architecture through code examples and demos. The contracts between these microservices should be well defined and loosely coupled. Using hypermedia as the engine of application state (hateoas), we can benefit from independent evolution and decoupled implementation. How we can implement these using Spring Hateoas, correctly document using Spring Restdocs, integrate with the HAL browser and version using JsonViews will become clear in the second part of this session.
Java is often criticized for hard parsing CSV datasets, poor matrix and vectors manipulations. This makes it hard to easy and efficiently implement certain types of machine learning algorithms. In many cases data scientists choose R or Python languages for modeling and problem solution and you as a Java developer should rewrite R algorithms in Java or integrate many small Python scripts in Java application. But why so many highload tools like Cassandra, Hadoop, Giraph, Spark are written in Java or executed on JVM? What the secret of successful implementation and running? Maybe we should forget old manufacturing approach of dividing on developers and research engineers in production projects? During the report, we will discuss how to build full Java-stack Data Mining application, deploy it, make charts, integrate with databases, how to improve performance with JVM tuning and etc. Attendees of my talk will become familiar with the development and deploy of research Java projects, Hadoop/Spark — based Data Mining tools and will get useful tips about possible integration ways.
How Java developers should test their applications by Mikalai Alimenkou It was a real code sharing session where were demoed and discussed different testing approaches
The Future [Java] Developer by Bruno Souza. Keynote
What kind of developer do you want to be? The kind that plans, organizes, prepares, and prepares... and prepares... Or the kind that focus on delivering and on transforming your customers' lives? Software development is a creative and complex work. It is trully "Meaningful Work". But... If we do it right! Java has allowed us to adventure into all kinds of new technologies, while improving our core knowledge. But how does the ever changing technology landscape and things like Cloud Computing, Internet of Things, BigData and DevOps impact our ability to deliver? This talk will take a look at the abilities of the Future [Java] Developer, and how open source, startups and containers play a role into our future careers.
20 Years of Java by Marcus Lagergren. Keynote
This keynote will be a historical trip down memory lane - going through 20 years of Java and JVM implementations. This will be partly from Marcus’s own perspective as one of the architects behind JRockit, with plenty of stories from the trenches, like the benchmarking competitions between BEA/Oracle, Sun and IBM. We will see how Java and the JVM turned into the robust high performance server side platform that it is today, partly through personal observations and partly through a more objective “what a long strange trip this has been”. He will take you back to 1995 in a time machine and slowly bring you to 2014, going over the major Java releases and the runtime innovations made in the JVM side to get us here. Finally, we will do a short trip into the future, even though the future is always fuzzy, to explore what might be coming next. With Java 8, the biggest release in Java history, Java is more vibrant and alive than ever before. This is an evolution that won’t be stopped.
At a major telco company in Belgium we have designed and implemented a cutting-edge architecture using microservices and hypermedia (REST level 3 / hateoas) for the entire customer- and business-facing web portfolio. During this talk we will shed a light on the migration path we went through to get Spring Cloud microservices based on Netflix deployed to production. Migrating from a monolith to containerized microservices doesn't always go smoothly in a rigid regulated enterprise. This is not your regular microservice talk. This is a journey through our struggles to reform both technically and culturally (reverse Conway's law) towards a devops distributed architecture which actually runs on production. E.g. gradually evolving from a manual infrastructure deploying on JBoss and using dedicated apache load balancers, to a PaaS private cloud solution.
Running a multitude of programming languages is a common requirement for large scale applications. This talk presents a virtual machine architecture that allows to handle different programming languages and their interoperability while not sacrificing performance. It bases on partial evaluation of AST interpreters to automatically derive compiled code. A prototype of this architecture has been developed as part of the Graal OpenJDK project (http://openjdk.java.net/projects/graal/) as well as the TruffleRuby, ZipPy, and FastR open source projects. The talk will be about the general principles behind our VM, special aspects of the Ruby, Python, and R implementations, and our vision for making language interoperability work efficiently.
Microservices allow to decompose a monolithic application into cohesive and multiple decoupled services. Each service is running in its own process and communicate using lightweight mechanisms, such as HTTP API. These services are built around business capabilities or functional decomposition. Microservice also enables true polyglot architecture – both in terms of language and data. It truly allows you to employ the right tool for the right job. Each service is independently deployable and lends very well to fully automated deployment machinery. Can you take an existing Java EE application and decompose it into microservices? What tools are required to enable CI/CD? What are different design patterns for microservices? What tools do you need to manage such services? Is the complexity being pushed around from service implementation to orchestration? This talk will explain some of these concerns and provide guidance on how to leverage microservices in your Java applications.
Many small startups build their systems on top of a traditional toolset like Tomcat, Hibernate, and MySQL. These systems are used because they facilitate easy development and fast progress, but many of them are monolithic and have limited scalability. So as a startup grows, the team is confronted with the problem of how to evolve the system and make it scalable. Facing the same dilemma, Wix.com grew from 0 to 70 million users in just a few years. Facing some interesting challenges, like performance and availability. Traditional performance solutions, such as caching, would not help due to a very long tail problem which causes caching to be highly inefficient. And because every minute of downtime means customers lose money, the product needed to have near 100% availability. Solving these issues required some interesting and out-of-the-box thinking, and this talk will discuss some of these strategies: building a highly preformant, highly available and highly scalable system; and leveraging microservices architecture and multi-cloud platforms to help build a very efficient and cost-effective system.
From CRUD to Hypermedia APIs with Spring by Vladimir Tsukur
Typical way to design and expose HTTP API today is a so called CRUD approach: come up with URL templates for resources, map create-read-update-delete operations to HTTP verbs and serialize domain model as JSON. Nice and easy, isn't it? This talk will present limitations of CRUD style APIs and how to address them using "real" REST and hypermedia, HAL and ALPS. We'll take a look how a set of libraries and tools from Spring helps building these APIs. All the talking is not worth it without an example, so Spring-based application will be our guide. Amazon, PayPal, GitHub and other API providers have already started embracing hypermedia and linking by enhancing their HTTP interfaces. Are you next? #rest #hypermedia #http #api #design #spring #spring-hateoas #java #hal #alps
20 October 2015
Some time ago I had to run Netflix Eureka server (to be more specific itwas version 1.1.151) not using Spring Boot.
There were several ways:
use Jetty runner.
The idea of the jetty-runner is extremely simple – run a webapp directly from the command line using a single jar and as much default configuration as possible. Of course, if your webapp is not so straightforward, the jetty-runner has command line options which allow you to customize the execution environment.
use Webapp Runner.
Webapp runner is designed to allow you to launch an exploded or compressed war that is on your filesystem into a tomcat container with a simple java -jar command.
I decided to go with Webapp Runner.
So, here is the list of steps:
$ cat runme.bat java -jar webapp-runner-184.108.40.206.jar eureka.war --path /eureka --port 4000
Local directory should have the next files/folders:
$ dir /b eureka-server-1.1.151.war eureka.war runme.bat target/ webapp-runner-220.127.116.11.jar
25 September 2015
Some time ago I had a pleasure to implement Ruby-based tool which theoretically must be easy to install and have no or limited dependencies.
JRuby and packed/distribute the application as a
jar. I.e. JRE was the single dependency I had. In general it was very nice distribution model despite the fact that non-Java users must install JRE (Java SE Runtime Environment) to run the application.
All other approaches like Ruby, Python, Perl, etc. were not acceptable as they requires additional user's efforts for tool installation and/or package distribution.
The idea was/is to have single native binary for all major platforms which requires no dependencies. Simply copy and run.
Now, the question: did I have other alternatives to implement this tool? Could it be implemented as native static binary? - Answer - YES. But, at that time there were only two mature solutions (acceptable for me): C and C++. And neither of them were very good for tool implementation and prototyping at the same time. Also, as far as I know, it's not a simple task to implement really cross-platform app, at least for Windows/Linux/OSX in C/C++. It adds additional maintenance efforts which I tried to avoid.
Looking now at this task I can say that this king of application is nice to implement in Go. Go has everything I need for really cross-platform application development and single static binary output which is awesome for tools/utilities writers.
I decided to look around and understand which other popular languages support compilation/packaging to native (semi-)single static binary. The term "semi-single" static binary will be explained later.
Quick googling give us the next languages:
Haskell, OCaml and Lisp are not widely used. And these langs should be picked carefully due to language specific learning curve.
D language is not young and has small community. But it's much simpler and clean compared to C++, IMHO.
Rust is the new hype along with Go. I guess it will be good alternative to C/C++. Also, the language is much more powerful compared to Go, it might be additional selling point.
There is no direct compilation from interpret/dynamic language to native static binary. But, it's possible to pack application with language runtime into "archive"/executable to behave like static native binary.
Based on the list above, Python has many alternatives to accomplish single distribution artifact task. I.e. it's better to pick Python than other alternatives. Also, it looks like Ruby has limited and poor choices, i.e. it's not suitable for this kind of task.
IMHO, Go has the most appealing tool chain for accomplish this task.
20 September 2015
September 19, 2015 I visited JDay Lviv Java conference. This report is for myself just to keep track talks I've attended.
Consistency, availability and partition tolerance: these seemingly innocuous concepts have been giving engineers and researchers of distributed systems headaches for over 15 years. But despite how important they are to the design and architecture of modern software, they are still poorly understood by many engineers. This session covers the definition and practical ramifications of the CAP theorem; you may think that this has nothing to do with you because you "don't work on distributed systems", or possibly that it doesn't matter because you "run over a local network." Yet even traditional enterprise CRUD applications must obey the laws of physics, which are exactly what the CAP theorem describes. Know the rules of the game and they'll serve you well, or ignore them at your own peril...
Everyone is talking about microservices these days! So the question is should you also jump on that bandwagon and why those somewhat older colleagues of yours (yep, those that still remember the EJB 2 revolution) are not that enthusiastic? To help you make the right decisions, this talk will first focus on explaining complexity - the problem microservices claim to solve. It then will concentrate on modular architecture and how it compares to what most people understand by microservices! Live demo will present multiple ways to modularize existing JEE application going from "monolithic" Glassfish EJB/JSF style app through SpringBoot and OSGi to reach a distributed system with a portal as front-end.
Almost every developer heard about design patterns. They was introduced long time ago to solve particular set of repeating problems in systems of different complexity level and size. But there is an opinion that many design patters just filled holes in the OOP languages of that time. Java as one of them has transformed and improved significantly in the last 10 years. So may be we could review design patterns implementation in modern Java world? Some of them are now may be easily replaced with language idioms, some others may be covered with existing libraries and frameworks. I'm sure you know some design patterns that are dead now or became anti-patterns in their initial implementation. Lets make this fun and useful review together!
The aim of this presentation is to introduce listener to a functional programming concepts that were introduced in Java 8. Presentation covers lambda expressions, an imperative-programmer-friendly definition of a monad and an application of Java 8 monads in everyday java developer life.
Handling 10k req/sec with 1 core or how you could get even more? by Dmitriy Dumanskiy
For the past 5 years I have been working on highly-loaded systems, solving problems and optimizing them. In my talk I will explain how the IoT has changed the understanding of high-load and why this trend changes the rules. What are asynchronous sockets and how they work. What are the solutions up to date and why Netty has no competitors? How does Netty work, what are its strengths, weaknesses, pitfalls? How to get the most, out of your code, where to look and what to do? And many other tips and advices on how to optimize your code ranging from simple cases up to choosing a JDBC pool.
Older posts are available in the archive.