Java Day - Kiev, 2015 - Report

08 November 2015

blog_post_image

November 6-7, 2015 I visited Java Day Kyiv conference. This report is for myself just to keep track talks I've attended.

Day 1

Day 2

References

How to run Netflix Eureka via Webapp Runner?

20 October 2015

blog_post_image

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:

I decided to go with Webapp Runner.

So, here is the list of steps:

  1. Download eureka-server war from maven central (e.g. http://mvnrepository.com/artifact/com.netflix.eureka/eureka-server/1.1.151). Also, we can clone the Netflix Eureka github repo and perform build locally. But, our intent is just get ready to use war file as quick as possible.
  2. Rename eureka-server-1.1.151.war to eureka-server.war.
  3. Download webapp-runnner jar from maven central (e.g. http://mvnrepository.com/artifact/com.github.jsimone/webapp-runner/8.0.24.0)
  4. I assume that eureka-server.war and webapp-runner-8.0.24.0.jar are located in the same directory. Now we can simply run the eureka-server on port 4000 via runme.bat file:
$ cat runme.bat
java -jar webapp-runner-8.0.24.0.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-8.0.24.0.jar

The server is up and running: check Eureka UI http://localhost:4000/eureka/ or registered apps http://localhost:4000/eureka/v2/apps/ XML output.

References

Distribute application as Native Single binary

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.
I've picked 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.

Compilers

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.

Dynamic Languages

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.

Summary

IMHO, Go has the most appealing tool chain for accomplish this task.

JDay - Lviv, 2015 - Report

20 September 2015

blog_post_image

September 19, 2015 I visited JDay Lviv Java conference. This report is for myself just to keep track talks I've attended.


Older posts are available in the archive.