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

Java Basics

Posted on Leave a commentPosted in Uncategorized

Here we discuss basic concepts surrounding Java, they are terms and principles that surround java as a language. JDK vs JRE JRE – Java Runtime Environment – environment to enable java applications to run. JDK – Java Development Toolkit – everything need to develop a java application, which in turns includes a runtime environment (JRE) […]