Skip to main content

Java2Days 2014: From JavaSpaces, JINI and GigaSpaces to SpringBoot, Akka – reactive and microservice pitfalls

This my 5-th year in a row where together with jugmk attend Java2days, a conference in Sofia, Bulgaria. While not so obvious from the name it is a 2-day java conference and currently the biggest one near us that we can take a bus to go to.
This year I had a talk titled "From JavaSpaces, JINI and GigaSpaces to SpringBoot, Akka – reactive and microservice pitfalls."
or buzz words and hate words all in one.

About the topic 


My talk this year was about microservices even though it had a long title with lots of strange words it was more of a concepts talk.
I gave a basic introduction into what reactive programming means for different people, the reactive manifesto and of course Microsoft Excel.
Long title = crowds of attendees
Next part was to define what microservies are and what they can be for different organization.
The Unix aspect of microservices had to be covered so I did just that.

My goal with the talks was not really to compare frameworks for this or that, but I just gave a short overview of what ideas are behind the development of some libraries.

The last major section was the real conclusion phase called how not to fail at microservices.
I gave some  recommendations from my personal experience as well as references to important books on the subject.
One of them available on early access:


And also the famous Release It book which covers some of the scenarios that are essential for microservice development.
My main take out from the talk was:
 Don't fall for the hype and make sure you start small and then grow. If your team and operations can  handle it then increase the granularity. 

Here are the full slides of the talk:



Microservice pitfalls from Mite Mitreski


The conference 


As for the full conference it was great  to meet up with BG-JUG folks like Ivan St. Ivanov, Mihail Stoynov, Martin Tosev  and improve the cooperation between JUGMK and BG-JUG.
 There were also the  standard visitor's Josh Long and Andrew Lombardi who are there to stay :


I got to meet with John Davis and learn how others use archaic tuple space technologies and how the banking world functions. Overall it was a great experience and even though at time some of the conference topics were overly light or outdated for my taste but the social aspect of it was more than sufficient to cover any shortcomings on the technical side.
For example Mani Sarkar had a great talk on "Learning the two Ts", it was great to meet up with him as well.


One other positive trend that is happening this year is we had record number of JUGMK speakers and participants on Java2Days. The same trend is also on other conferences and is a great thing to see.




The JUG Factor


I know I'm forgetting someone to mentions, but overall an interesting social experience and a great meetup. 

Popular posts from this blog

HTML 5 data-* attributes, how to use them and why

It is always tempting to add custom attributes in HTML so that you can use the data stored there to do X. But if you do that there is no way of knowing if your HTML attribute will not be overridden in the future and used for something else and additionally you will not be writing valid HTML markup that can pass HTML 5 validator and with that you can create some very bad side effects. That is why there is a spec in HTML 5 called custom data attributes that enable number of useful features.

You may go around and read the specs, but the basic idea is very simple, you can add any attribute that starts with "data-" and that attribute will be treated as non-visible data for that attribute. By non-visible I mean that it is not something that gets rendered to the client so it does not affect the layout or style of the page, but it is there in the HTML so in no way this is private.
So let's get right into it, the following snippet is a valid HTML5 markup

<div id="aweso…

Temporary files and directories in Java 7 and before

Sometimes we want to create a temporary file, whether to save some data that gets written by some other application or just to temporary store stuff. Well, usually applications have their own temporary folder where they do this and it gets somehow configured. But why not use the underlying OS specific file like "/tmp/" in Linux so there must be some system property that has this info and there is. The key is "java.io.tmpdir" resulting in "/tmp" in my case or by code:
String tempDir = System.getProperty("java.io.tmpdir"); We can use tempDir  folder as a temporary place to store files, but there are a lot nicer ways to work with files like this even in JDK6 not just in JDK7:
import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; public class TempFile { public static void main(String[] args) { try { // create a temp file File tempFile = File.createTempFile("old-file",…

Basic Authentication with RestTemplate

Spring Rest Templates are very good way of writing REST clients. By default they work with basic HTTP so if we need to use Basic Authorization we would need to init the rest template with custom HttpClient. This way the Rest Template will automatically use Basic Auth and append to the HTTP headers "Authorization: Basic BASE64ENCODED_USER_PASS".

HttpClient client = new HttpClient(); UsernamePasswordCredentials credentials = new UsernamePasswordCredentials("USERNAME","PASS"); client.getState().setCredentials( new AuthScope("www.example.com", 9090, AuthScope.ANY_REALM), credentials); CommonsClientHttpRequestFactory commons = new CommonsClientHttpRequestFactory(client); RestTemplate template = new RestTemplate(commons); SomeObject result = template.getForObject( "http://www.example.com:9090/",SomeObject.class );

In EE application this would probably be managed by DI framework like Spring Core and only initialized once sin…