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 […]

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 […]

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 […]

java.util.function library

Posted on Leave a commentPosted in Architect, Java

As in previous topic, we can use functional interfaces to use in lambda expression see topic on: Java 8 interfaces However Java 8 goes on more to provide us mechanism to easier create lambda expressions. See java.util.function library. No need to create an functional interface and just overwrite existing ones in this library. This library […]

Java 8 Interfaces

Posted on Leave a commentPosted in Architect, Java

There are several changes for interfaces, including the addition of static and default methods. Interfaces in java 8 is more and more similar to abstract method.  Consider the example below: Key notes: static static methods inside interfaces are only accessible inside the interface. No way to access from outside the interface, see initializeTestData() method above. default default […]

Java 8 Lambda Function

Posted on Leave a commentPosted in Java

Lambda functions – enables you to treat functionality as method arguments. The forEach() method for handling a collection of data. In this case, we have a list of Person, instead of doing a for loop we are using lambda syntax: For more complex methods you can wrap it in brackets, acting as anonymous classes. Lambda expressions can […]