Speaking directly to Cassandra over its native protocol using ZIO & Scodec

Most developers will sooner or later need to interact with some database from within the application. We then reach for an established Object Relational mapping or Functional Relational Mapping library of our choice.

Those are frameworks and libraries that help us interact with the database — handle mapping between objects and database’s tables (or graphs, depending on your database), help us with query constructions and so much more.

One such example is (one that many object-oriented programmers are familiar with) a Hibernate. Functional programmers might reach for Slick or Quill.

These usually depend on another layer — some driver —…

Combining Scala functional libraries for fun and productivity

Scala often gets a reputation for how complicated it is to write and setup and how much boilerplate there is. The same goes for functional programming. My goal is to show you the opposite — how even with limited knowledge of the following topics you can productively use competing libraries in the same field, and how well they fit together. How you can easily treat Kafka topics as streams of data, how simply you can compose SQL statements into a bigger transaction, and overall how productive you can be in today's Scala’s ecosystem.

This article relies on some very limited…

Exploring Completion & Context Suggester

In this article, we’ll explore implementing typeahead (or in other words, autocomplete) for a real dataset using Completion Suggester. We’ll then create phrases that map to our completion and ask for some suggestions based on the movie’s title. After that, we’ll use contexts to limit our suggestions to only some genres while applying specific boosts per genre.

The goal is an exploration of this feature, its API, and possible usage.

We will not look at the performance (although the chosen one is supposedly the fastest), go through all the options suggesters give us, or take a look at other alternatives…

We will be looking into ways of accessing your Gmail via Google API, following it up further with a low-level approach — programmatically via SMTP & XOAuth2. This is a rather uncommon way, as the provided client APIs are sufficient in most cases. Next, we’ll approach cases that are not achievable with Gmail library clients.

This blog has educational purposes and is supplemented by code that demonstrates the principles outlined here. All of the code can be found in this repository.

Before proceeding, we need to get our app’s credentials (one that will perform the authorized actions on your…

Marek Kadek

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store