Automatic Reference Counting (ARC) and Memory Management in Swift

Get ARC to work for you

Memory management is a key factor when we develop apps. If a program is using a lot of memory, it can make apps run slowly or even cause crashes. To handle this in Swift, you can work with Automatic Reference Counting (ARC) to keep your apps memory usage minimal. This doesn’t mean you can completely forget about the memory in your app, but it does take care of most things for you.

It’s important to note that ARC only works when working with classes. Structs and enums are value types and therefore are stored differently in memory than classes, which are stored and passed by reference.

Microservices and the Saga Pattern, Part 2

Welcome back! If you missed Part 1, you can check it out here.

I hope that by now you are pretty much clear about what a microservice is and have started analyzing the strengths and weaknesses of it. I tried to keep it simple by giving just an overview of what a microservice should look like, but there’s a lot more to it that I won’t be covering in this series. Though I would like to mention a key difference between microservices and SOA (Service Oriented Architecture). Yes, the two are not the same and that is because SOA does not talk about the service deployment and it is the reason that when we build a system using SOA we end up building it in a monolithic style, where all the services are deployed altogether as one application. On the other hand, microservices are a subset of SOA, but they require that each of the services is independently deployed, meaning that they can be put on many different machines and any number of copies of the individual services could be deployed.

Microservices and the Saga Pattern, Part 1

Microservices are not new in the market, they have been a part of our day to day life for a while now, so here in this post, I would like to share with you my understanding of what microservices are and what the Saga Pattern is, which is widely used with the microservices. We will start with what exactly we mean when we say: (i) we need a microservice, (ii) what it means to be reactive, and then (iii) dig into the concept of Saga patterns, with respect to a distributed system along with an easy to understand real-life example.

So let’s get started.