Implementing a domain model using functional programming in Scala.

It’s been a long time since I was thinking about writing such an article. The final enlightenment occurred when after a few projects with non-trivial domains I read Domain Modeling Made Functional by Scott Wlaschin. This is where I made several observations I’d like to share.

Scala is a perfect match for modeling complex domains. Its advanced type system allows expressing business concepts and rules more precisely and directly. What we gain with it is the code that is more type-safe, descriptive, and easier to understand. …

An FAQ about preparing and taking the AWS Solutions Architect Associate exam.

I passed the AWS Solutions Architect Associate exam in January 2021 with a score of 94%. In this article, I’d like to quickly summarize why I chose this certification program and how I prepared. I’ll answer multiple frequently asked questions and discuss if it’s a good choice for Backend/Frontend Engineers, Data Engineers/Scientists, DevOps/Sysops, and Engineering Managers. Let’s get started!

AWS Solutions Architect Associate (SAA-C02) FAQ

Why should I choose the Solutions Architect Associate among the other AWS certifications?

That’s because attending this certification program will teach you how to design reliable, secure, performant, and cost-efficient systems using AWS. You’ll find out how to map business requirements into a robust architecture and how to guide it through the project. …

A story about safe and compositional resource management in vanilla Scala and cats-effect.

We’re all using resources on a daily basis. You turn on the water tap, wash your hands for at least 20–30 seconds, and turn it off. You switch the light on if it’s dark, and off when you no longer need it.

Resources have a lifecycle. You open them, use them, and close them afterward. Not only light and water taps fall in that category, but also all kinds of database connections, HTTP servers, clients, files, or streams.

What’s interesting about resources is that they often depend on each other, so we care about the ordering of their acquisition and…

A short read about being careful with error handling in stream design.

Akka Streams is a reasonable choice when it comes to event processing. A wide variety of connectors and integrations makes it easy to assemble a working pipeline and get up to speed quickly.

On the other hand, we have a long list of predefined operators, GraphDSL, support for error handling, a possibility of rolling out custom stages and more. It means, that having a rough idea of what do we want to achieve, there is always a number of ways to approach the stream design. It’s quite easy to assemble a working graph. But to make the code scalable, maintainable…

Using ngrep and nginx to debug HTTPS like a pro!

Imagine you’re investigating a strange issue with a web service that talks to other services using HTTP over TLS. You want to inspect the HTTP calls it makes and what responses it gets back.

…and it’s 2018, so you’re running the service in a shiny container!

The first obvious approach would be to increase logging. That’s nice if the service you’re debugging allows you to do it. But what if it does not? What if it’s 3rd party and you can’t modify the source to add it? …

Using Akka Streams to stream data from Amazon S3 to MongoDB.

This is part two of the Crafting production-ready Backup as a Service solution using Akka Streams series. I highly encourage you to read the first part first if you didn’t, since it gives an overall context.

In the first part, we saw how to perform a data backup from MongoDB to S3 by composing a stream with encryption and compression using Akka Streams and Alpakka.

In this part, we’ll focus on doing the restore. We’ll again use Akka Streams and Alpakka to stream the data stored in S3 to MongoDB. We’ll also face new interesting challenges, as doing the opposite…

Using Akka Streams to backup MongoDB to Amazon S3.

Edit: both parts of this article are up to date as of 16 Jan 2019.

Imagine you’re developing a database as a service solution like Compose or mLab. You’re hosting a horde of database instances/containers which are used by your customers. One of the key features of your solution is performing backups since no one is willing to lose data. You are already doing backups in form of e.g. volume snapshots, just in case of a disaster in your infrastructure (and you obviously test your automated recovery procedure frequently to prove it’s up to date ;)).

What if you wanted…

Bartłomiej Szwej

Software Engineer @MOIAmobility

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