article thumbnail

A guide to UDP in Scala with FS2

Rock the JVM

The UDP header is fixed at 8 bytes and contains a source port, destination port, the checksum used to verify packet integrity by the receiving device, and the length of the packet which equates to the sum of the payload and header. Setting Up Let’s create a new Scala 3 project and add the following to your build.sbt file. isOpen ()) {.

Scala 90
article thumbnail

A Functional Load Balancer with Scala, Http4s and Cats Effect

Rock the JVM

Project Structure We will use Scala 3.3.0, values :+ Url ( "url1" )) assertEquals ( obtained , expected ) } } Let’s run tests in SBT: sbt:loadbalancer> test [ info] compiling 1 Scala source to ~/loadbalancer/target/scala-3.3.0/test-classes. info] compiling 2 Scala sources to ~/loadbalancer/target/scala-3.3.0/test-classes.

Scala 105
Insiders

Sign Up for our Newsletter

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

article thumbnail

Two-Factor Authentication in Scala with Http4s

Rock the JVM

If you want to master the Typelevel Scala libraries (including Http4s) with real-life practice, check out the Typelevel Rite of Passage course, a full-stack project-based course. HOTP scala implementation HOTP generation is quite tedious, therefore for simplicity, we will use a java library, otp-java by Bastiaan Jansen.

Scala 92
article thumbnail

Modern Data Engineering: Free Spark to Snowpark Migration Accelerator for Faster, Cheaper Pipelines in Snowflake

Snowflake

The assessment is built by scanning any codebase written in Python or Scala and outputting a readiness score for conversion to Snowpark. As a result, the tool can take in both code files and notebooks with multiple languages (such as Scala, Python and SQL) at the same time.

article thumbnail

Why We Do Scala in Zalando

Zalando Engineering

Leveraging the full power of a functional programming language In Zalando Dublin, you will find that most engineering teams are writing their applications using Scala. We will try to explain why that is the case and the reasons we love Scala. How I came to use Scala I have been working with JVM for the last 18 years.

Scala 40
article thumbnail

Apache Spark vs MapReduce: A Detailed Comparison

Knowledge Hut

quintillion bytes of data are created every single day, and it’s only going to grow from there. Also, there is no interactive mode available in MapReduce Spark has APIs in Scala, Java, Python, and R for all basic transformations and actions. It also supports multiple languages and has APIs for Java, Scala, Python, and R.

Hadoop 96
article thumbnail

ZIO Streams: A Long-Form Introduction

Rock the JVM

He’s a senior developer, who has been working with Scala for a number of years. scala> ll.tail.head val res3: Int = 2 scala> ll val res4: scala.collection.immutable.LazyList[Int] = LazyList ( 1, 2, ) We can see that the first two elements now clearly show! Mark has a lot to share, and this article is a comprehensive piece.

Scala 40