thecookiezen blog

Building Microservices Awareness

| Comments architecture, best practices, microservices


The idea of microservices is a really old one and the “microservices” buzzword got new life about 2 or 3 years ago. Despite this, it’s still something rather new for many people, who go crazy about using it at work. Because of these facts you should think about building a proper microservices awareness in your company. As you don’t want to build yet another distributed system when you don’t need it.

Top 10 Mistakes Made by Developers on Recruitment Coding Challenge

| Comments best practices, learning, recruitment, self improvement


During the last few months I’ve been doing a lot of code reviews of simple code assignments that candidates get as a first recruitment task. This assignment requires basic programming skills like JAVA Collections API, design and some knowledge about best practices. The main purpose is to filter out developers who don’t fit the company. Getting through such code doesn’t seem entertaining. However, I came up with an idea to list 10 common mistakes. Make sure you avoid them next time when applying for a job position!

Devoxx Poland 2017 - Summary

| Comments conferences, devoxx


After a 6 months break I’m back to blogging. I hope that my motivation will stay as high as it was when I was starting with it. My absence was caused by the operation of moving to Berlin, what was pretty occupying*. Now, when the moving is finally done, I can go back on the trail :)

*After 2 months I still don’t have stable internet connection at home. Don’t ask me why.

Last month I was at a great JVM/Architecture/Cloud/Microservices related conference in Krakow - Devoxx Poland 2017. Not only did I meet my friends from previous companies over there, but I also attended in some rather interesting talks. As a re-warm-up blog post I’ve prepared a summary of some of those.

Data Synchronization - Part 1 : Service Discovery and Leader Election

| Comments curator, data synchronization, nginx, zookeeper


This blog post will be the first part of the bigger proof of concept related to the data replication in distributed environment, which I’m working on. At the beginning, I will show how to separate GET requests from POST having multiple instances of a single application. The goal is to redirect all of the POST requests to the master instance, all GET requests should be distributed across all nodes. Today’s showcase will be focused on three subjects: single master - multiple slaves communication model, leader election between multiple application nodes, and using Service Discovery for automatic load balancer configuration. In this part we’re finding out how to simply use ZooKeeper for Service Discovery and Leader Election, NGINX as a load balancer with dynamically changing configuration by confd. NGINX is a web server, which can act as reverse proxy, load balancer or HTTP cache. In our case NGINX will be responsible for traffic load balancing to the appropriate nodes.

DeltaSpike Data - Alternative for Spring Data JPA

| Comments deltaspike, jpa, payara, persistence, spring, spring data


Sometimes while attending a Java conference or reading some article on the internet, you can find out that many people think that Java EE is dead. It comes mostly from people strongly addicted to Spring Framework and its many cool features. They believe that Java EE is so 90' and Spring is the only right solution. I don’t deny that Spring Framework is a great tool. Java EE is just the same tool which resolves the same problems, so we should have an open mind. One of these cool features of Spring is the ease to use a high level database abstraction called Spring Data JPA.

Take Control of Your Career

| Comments career, job interview, self-improvement


Why should you change your job?

Your motivation is close to 0. You’re a part of IT division that is thought to be just a cost, not an income. Everyone’s quitting. There is a feeling that you’re not learning or growing anymore. It’s not fun anymore. Bad decisions are being made.

Just ask your partner, friend or your parent if you should change your job. They may know what is best for you because they spend so much time with you. Some impressions are not visible for you yourself.

For me the most important things that I’m looking for in the new place are: company culture, great people and possibility for my personal growth. Not the money, location or fancy technologies. Does the company know how to motivate its own developers? It’s also important. Being motivated is rather essential for being productive and just happy.

Don’t you want to be happy?

Best of GeeCON 2016

| Comments conferences, geecon, java, jvm


Last week I had a chance to be for the third time at a Java conference called GeeCON. I really enjoyed this event because of the number of great people and many interesting topics related to the JVM world. By visiting such conferences you can learn new things and get to know the expert’s newest opinions. However, after this event, as always, I have more questions than answers. Some mysterious magic was present there and, as software developer, I feel the need to make this magic disappear. So I have to spend some time reading articles, doing research and experimenting. In this post I want to summarize the best presentations I’ve been by those 3 days in Cracow.

High Availibility of Application Using Wildfly HA Singleton Service

| Comments high availibility, singleton service, wildfly


Why should I provide HA for my application?

If we are creating application for some client or for ourselves we need at some point to deploy our work on production servers and expose to the world. For most cases it’s obvious that our application cannot work as one instance. We need multiple instances of our service in case of failure of one of our servers. Also the network can fail. Also the accidence of high load or some other problems which might suddenly surprise us. Therefore we have to think about High Availability much earlier just not to fail and to be awakened during the weekend.

MemoryImage - Clean Architecture Approach to Storing Data in Your Next Application

| Comments airomem, clean architecture, prevayler


In this post I want to introduce simple solution that allows you to keep your application architecture clean. For those of you who haven’t heard about Clean Architecture approach I recommend to read Uncle Bobs article. The main idea is to defer the decision of selecting storage engine we choose for our application, because the database is only a detail. It’s not important if it will be SQL, NoSQL or graph database. A database in our application is only the detail which should be easy to change. Premature selection of a database can have negative influence for creating our domain model. For example if we use Hibernate which is JPA implementation and we start writing code from creating Hibernate entities, it will lead us then to high coupling between our core elements and ORM framework. Postponing decision about a database can change our point of view on domain model and stop future degradation of code base.

WildFly-Swarm - New Player in Microservices World

| Comments java, javaee, microservices, wildfly


Earlier in 2015 Red Hat made initial release of their new project called WildFly Swarm. This solution allows to run JavaEE based applications as microservices. It’s a competitor for many frameworks like Spring-boot or Dropwizard which are used for creating small application based on microservices architecture very fast. The application server now can be embedded into your application jar with all his dependencies or you can deploy your applications war into standalone WildFly application server instance as before. It’s a big step for JavaEE world and I hope that it will silence all people who were complaining about JavaEE fat application servers.