Blog Archives

16: Coding Scala Way – Scala concurrency styles

This extends Scala concurrency & closure vs function definition. This post looks at Scala concurrency styles – blocking & non-blocking. onComplete – non-blocking

Output:

onSuccess – non-blocking The above “onComplete” call is highly nested. “onSuccess” to the rescue.

Output:

for-comprehension non-blocking The for-comprehension to extract values…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Companion, 90-Day-Java-JEE-Career-Companion, 180-Day-Java-JEE-Career-Companion, 365-Day-Java-JEE-Career-Companion and 2-Year-Java-JEE-Career-Companion Log In | Register | Try free FAQs | Home
Posted in member-paid, Scala way of coding

15: Coding Scala Way – Scala concurrency & closure vs function definition

This post not only covers “onSuccess” method on a “Future”, but also clarifies the difference between executing a closure and a function definition. Is anything wrong with the following Scala concurrency code?

Output:

“futureInc” is a closure, and the closed over value is “1” as it is executed…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Companion, 90-Day-Java-JEE-Career-Companion, 180-Day-Java-JEE-Career-Companion, 365-Day-Java-JEE-Career-Companion and 2-Year-Java-JEE-Career-Companion Log In | Register | Try free FAQs | Home
Posted in member-paid, Scala way of coding

14: ♥ Coding Scala Way – Scala concurrency with Future

Scala concurrency with Future explains step by step blocking vs unblocking calls and how implicit and apply concepts work under the covers. Scala extends the Java programming language and runtime in many ways, including concurrency where Scala version of Future<T> is more flexible than the Java version as you can

Read more ›

Posted in Scala way of coding

12: Coding Scala Way – Actors with Akka “Ask Pattern” – Part 2

Actors with Akka “Ask Pattern” is for getting a reply or a response to a message that was sent by a sender. Use ? or ask method. We saw earlier how to send or tell a message to an actor. The Akka Actor Asking for a reply or response The…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Companion, 90-Day-Java-JEE-Career-Companion, 180-Day-Java-JEE-Career-Companion, 365-Day-Java-JEE-Career-Companion and 2-Year-Java-JEE-Career-Companion Log In | Register | Try free FAQs | Home
Posted in member-paid, Scala way of coding

13: Coding Scala Way – 2 Actors with Akka – part 3

This extends Actors with Akka – part 1. This “Akka with actors” shows how messages passed among actors in the system. This is known as the reactor pattern based on the event-driven architecture. Orderplacement.scala with Actors

Output:

The system keeps running until you stop the JVM process....

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Companion, 90-Day-Java-JEE-Career-Companion, 180-Day-Java-JEE-Career-Companion, 365-Day-Java-JEE-Career-Companion and 2-Year-Java-JEE-Career-Companion Log In | Register | Try free FAQs | Home
Posted in member-paid, Scala way of coding

11: ♥ Coding Scala Way – Actors with Akka – part 1

We already saw in Java: Producer and Consumer Java Multi-threading code. This extends the tutorial “Simple Akka tutorial in Scala step by step” for setting up the environment with right plugins and libraries with Eclipse & Maven. The Akka Actors sending & receiving messages Akka Actors conceptually each have their

Read more ›

Posted in Scala way of coding

10: ♥ Coding Scala Way – groupBy, mapValues & identity

Java developers need to learn Coding Scala Way. Scala way of coding is quite different & you need to unlearn Java way of coding Question: Given a list of numbers, how will you group the numbers by how many times they occur? for example output for “List(3, 3, 4, 5,

Read more ›

Posted in Scala way of coding

19: Q109 – Q113 Scala ADT (Algebraic Data Types) Interview Q&As

Q109 How do you model data in functional programming (i.e. FP)? A109 Using ADT (i.e. Algebraic Data Types), you can model data with logical ORs and logical ANDs. “OR” is also known as the “Sum” type, and the “AND” is also known as the “Product” type. OR (i.e. Sum type)…...

Members Only Content

This content is for the members with any one of the following paid subscriptions:

30-Day-Java-JEE-Career-Companion, 90-Day-Java-JEE-Career-Companion, 180-Day-Java-JEE-Career-Companion, 365-Day-Java-JEE-Career-Companion and 2-Year-Java-JEE-Career-Companion Log In | Register | Try free FAQs | Home
Posted in member-paid, Scala Interview Q&As
Page 1 of 512345

800+ Interview Q&As – ♥ Free | ♦ FAQs

open all | close all

Pressed for time? 200+ Quick Prep

open all | close all

16 Technical Key Areas to be a top-notch

open all | close all

100+ Java Tutorials – Step by step

open all | close all

100+ Java Coding Exercises

open all | close all

How good are your

open all | close all