Scala

Become a pro with detailed Scala basic & advanced articles.

Apache Spark: Bucketing and Partitioning.
Apache Spark., Scala

Apache Spark: Bucketing and Partitioning.

Overview of how you can accomplish more by Worrying less about infrOverview of partitioning and bucketing strategy to maximize the benefits while minimizing adverse effects. if you can reduce the overhead of shuffling, need for serialization, and network traffic, then why not. in the end Performance, better cluster utilization, and cost-efficiency beat it all.If you are to make full use of a dataset in a large-scale solution, you need to know the dataset better.with a better understanding of the dataset, optimizations can yield greater results.Cardinality: refers to the uniqueness of data contained in a column.deciding which strategy to choose depends purely on cardinality. if the cardinality ratio of your dataset is constant or limited then the best strategy is-...
What are Monoids and Semigroups: explained with Type Classes[Scala].
How-To, Scala

What are Monoids and Semigroups: explained with Type Classes[Scala].

Learn how to attain ad-hoc polymorphism with Type classes in a functional way.Scala is one of the best programming languages❤.you can choose to treat everything as function in Scala with referential transparency, modularity, maintainability and tons of syntactic sugars.Functional approach is the best, to overcome shared and mutable state and to focus on results.Type Classes do not have native support in Scala, so you can use built-in features like traits and implicit classes to achieve ad-hoc polymorphism.What is ad-hoc polymorhism?function with same name acts differently for different declared types.lets understand the concept first and transition towards the how-to,i believe that, if you are aware of the problem, then you can imp...
Introduction to Actor Supervision- Akka Typed with Scala for beginners.
Akka, Scala

Introduction to Actor Supervision- Akka Typed with Scala for beginners.

Distributed systems are imperative standard to improve resiliency, adopt and compete in today’s everchanging virtual world. entire system can be built on different nodes or maintained under a single node by making them into smaller units. Building Distributed systems is state of art and can be complicated by nature. Preventing the systems from failure/exceptions should be one of the goals when implementing the logic, which can be tedious and can be a penalty to business if not taken care.Today you are going to understand how to oversee and supervise actors.I hope you are already aware of what is Akka and how to initialize the project. if not then i recommended to check Introduction. When an actor throws an unexpected exception or a failure or crash’s while processing a messag...
Scala Futures – Concurrency Interpreted!
Scala

Scala Futures – Concurrency Interpreted!

Think - Parallel , multi threaded, distributed, Asynchronous, non-blocking programming.first thing that comes to your mind for short-lived concurrent processes is “Scala Futures” .Future’s allow you to run values off main thread ,and handle values which are running in the background /yet to be executed by mapping them with callbacks .if you are from Java background , you might be aware of java.util.concurrent.Future yes?there are several challenges in using this,1- threads are always blocked while retrieving values.2- wait time for the completion of computation.3- get method is the only way to retrieve values.Weary andantagonistic way of writing concurrent code.we have Future’s in Scala(Better one’s)-scala.concurrent.Futurewith Scala Futures you can achi...
Throttling made easy- Back pressure in Akka streams.
Akka, Scala

Throttling made easy- Back pressure in Akka streams.

Built-in protocol to attain overflow and underflow in fast data systems.Big data is the buzz word all over lately, but Fast data is also gaining traction now days. if you are into Data Streaming , then you know it can be tedious if not done right and may result in data leaks / OutOfMemory exceptions. if you are building a service or product today, users are willing to pay high bucks to those who provide content with milliseconds latency.Akka Streamsis a streaming module which is a part of Akka toolkit, and is designed to work with data streams to achieve concurrency by leveraging Akka toolkit power without defining actor behaviors and methods explicitly and helps to conceal the abstraction by ignoring what is going under the hood and help you focus on the logic needed for ...
Introduction to Akka Typed with Scala for beginners.
Akka, Scala

Introduction to Akka Typed with Scala for beginners.

Learn to Build distributed and fault tolerant systems with me and Dead-pool.Learn best in class technology upon which many cutting edge frameworks are build(Play Framework, lagom, cloudFlow, etc …) the list goes on…I would like to share my insights on how to get there. when i started my journey to learn Scala and Akka, i had to refer numerous articles and videos to get where i am today, i don't want the beginners to go through the same pain, these articles are created by keeping complete get go stuff in mind.What is Akka and why you should learn it with Scala?ever wondered how to build highly distributed and complex systems with ease and type safety? continue reading…Akka is a “toolkit” for building highly concurrent( ability of different parts or units of a program, algor...