Docker Mastery

Posted on Posted in Java, Technologies

Below are more detailed notes on various aspects of Docker, and somewhat more advanced topics with dealing with container/image management. Docker commands are now separated into main modules. previously when you wanted to run a command, you would do docker <command> In the newer version you can say: docker <module> <module_command> Modules config – Manage […]

Akka Ask

Posted on Leave a commentPosted in Akka, Java

On all our previous example we have been using Tell method to send messages to actors, in Akka this is known as fire-and-forget. Which means you send a message and there is no blocking, Actors, handle a separate thread to handle the actual work. But what happens when you need a return value? you pass a […]

Akka Immutable Messages

Posted on Leave a commentPosted in Akka, Java

By default Akka does not make your variables immutables, so if you are passing around message/objects with mutable variables there is still a case where you can experience a deadlock. That is why it is highly recommended to use immutable messages when integrating with Akka Actors. What are immutable messages? Basically these are variables that […]

Actor Hierarchy

Posted on Leave a commentPosted in Architect, Java

Akka Architecture by default supports parent-child Actor structures. On startup Akka already creates several actors for you: http://doc.akka.io/docs/akka/current/java/guide/tutorial_1.html Root guardian – to handle all the actors System guardian – Akka System guardian User guardian – user in this case is you, user guardian manages all the actors created by the developer. Usually you can only […]

Akka Actor Model

Posted on Leave a commentPosted in Architect, Java

Akka Actor Model  Dealing with highconcurrency, highly scalable applications. Again, just want to emphasize this site does not aim to give a complete comprehension of given topic, but rather an overview, or review of certain topics. It is still recommended to do a reading on the actual documentation. Recommended Reading: http://doc.akka.io/docs/akka/current/java/guide/tutorial_1.html What is Actor Architecture? In […]

Static vs Instance variables

Posted on Leave a commentPosted in Java

Static vs Instance variables When you declare a variable static, there is only one copy of that variable per class. Consider the following example (bad encapsulation code do not copy): when we use static, there is only one copy per class, so no matter how many Humans objects we have, there is only one PLANET, […]

Set vs List vs Map

Posted on Leave a commentPosted in Architect, Java

Basic Question in Java is usually what is the difference between Set/List/Map. Set – is used usually used when you want to keep a collection of items that have no duplicates. Plain and simple. So think set when you want a unique collection of items. Variations TreeSet (interface: SortedSet) – sorts the value in the […]

Docker Introduction

Posted on Leave a commentPosted in Architect, Java

What is Docker?  “Docker is the world’s leading software container platform. Developers use Docker to eliminate “works on my machine” problems when collaborating on code with co-workers. Operators use Docker to run and manage apps side-by-side in isolated containers to get better compute density. Enterprises use Docker to build agile software delivery pipelines to ship […]

Completable Future – Futures Library

Posted on Leave a commentPosted in Architect, Java

Writing Async calls with Java 8 Say hello to Java 8 asynchronous library. This enables us to prepare calls that do not immediately return a response. CompletableFuture works like a promise, saying that this process will eventually end, but do not wait on it. Let’s dive in to the details, below is the most basic […]