Connecting the dots

Startup Stories Connecting the Dots - Coletiv Blog

From a young age that I am an avid reader. I have read books on technology, design, economic theory, politics or simply biographies about some of the personalities/companies I admire the most.

From all these readings, one of the quotes that keep popping on my head is from Steve Jobs by Walter Isaacson’s book:

You can’t connect the dots looking forward; you can only connect them looking backwards. So you have to trust that the dots will somehow connect in your future.

All these books left dots on my mind, a few of these dots have already connected themselves and others I’m trusting that they will connect in the near future.

Let’s take a look at some of the dots:

World decentralization

The industrial revolution, a huge milestone for Humanity, while solving the production problems at the time has led to the creation of massive enterprises and factories that concentrate most of the World’s production. This leads to a different set of problems like the creation of bottlenecks, single points of failure and to the destruction of diversity.

Think about 20/30 years ago, if you visited any other country or even a different city, people would be dressed differently. Nowadays you can fly to the other side of the world and people will use the exact same pair of sneakers you are wearing at this moment!

We are now seeing attempts to solve some of these problems. Let’s take the example of electricity. We have been dependent on the supply of electricity by big power plants that could easily fail (e.g. due to natural disasters) leaving huge areas without electricity. Now with solutions like Tesla’s Solar Roof, everyone can produce their own electricity and feed the excess to the network increasing the redundancy of the whole system.

Another example that is still in its infancy is the recent attempt to change the financial system. We are tied to a centralized system where a handful of institutions dictate the rules, but recently the community is clearly trying to create alternatives, like bitcoin, to circumvent this problem.

Massive Internet adoption

The Internet has seen an unparalleled adoption since it started to be commercially used in the ’90s. This massive adoption led to the quick exhaustion of the circa 4.3 billion (IPv4) addresses.

Think 15/20 years ago, how many devices did you had connected to the Internet? Probably only your computer right? Fast forward to today and a family of 4 easily has around 10 devices connected: a phone for each, computers, tablets and all the new shiny IoT devices that control the alarm, the water, room temperature and so on.

To mitigate the address exhaustion problem a new protocol (IPv6) started to be developed in 1998 and officially became a standard in 2017, this new protocol supports approximately 4.2×¹⁰³⁷ or 42 undecillion IPv6 addresses, quite a lot!

We are moving towards a server architecture that needs to handle a massive amount of devices that are constantly sending data in near real-time (e.g. temperature sensor).

Hardware and Software evolution

Computers have evolved a lot since they were first built. They went from huge machines taking the full space of a room, only capable of doing simple calculations to being able to fit nicely onto our pockets while being connected to the whole world.

In recent years, because memory has become way cheaper than before and because computers had to become more and more portable, we have seen a change that affects not only how hardware is built but also how software is developed.

Due to the fact that processor units couldn’t increase their clock frequency any higher, computers evolved from machines that execute one instruction or action at any given time, to a structure similar to multi-computer, that could execute code in parallel (multi-core).

This change in computer hardware has lead to a change in programming languages as well. In the past 5 years, major players like Google and Apple started moving away from Object Oriented Programming (OOP) towards Functional Programming (FP). Google is moving from Java to Kotlin, while Apple is moving from Objective-C to Swift.

Object-oriented programming is a programming paradigm based on the concept of objects and pointers, which allow the same object to be used/referenced in multiple functions at the same time. This paradigm is very useful because it saves on the memory footprint but struggles as soon as we start to make use of concurrency, parallelism and the multi-core architecture.

Functional programming treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data. The memory footprint is usually higher than the OOP approach as objects are copied over instead of being passed via pointers, but on the other hand reasoning about the code is really easy even when dealing with code running in parallel.

Reactive interfaces and HTTP2

Unfortunately, users are more and more on a rush in their daily life and they demand tools and apps to respond the same way: they should be fast, with reduced load times, fewer taps to achieve their objective and so on. Problem is you can only optimize so much.

Enter HTTP/2. The primary goals for HTTP/2 are to reduce latency by enabling full request and response multiplexing, minimize protocol overhead via efficient compression of HTTP header fields, and add support for request prioritization and server push.

With our friends from Significa we have been exploring the impact of HTTP/2 and what can we do with it to improve the user experience.

We have been trying to move away from the current request-response based systems towards more near real-time communication API’s and reactive interfaces.

Coletiv’s technology decisions

When we started Coletiv we had a white canvas in front of us which was quite daunting but it allowed us to start fresh & clean and to bet on technologies we think are here for the long run. That was when we started to listen to all the previous dots and started connecting them: decentralization, more and more devices connected at the same time, multi-core processors, HTTP/2 & reactive interfaces.

When it came to frontend development we easily defined our stack with ReactJS (web), Swift (iOS) and Kotlin (Android). These 3 languages are functional, reactive and are being led by technology leaders like Facebook, Apple, and Google which gives us the peace of mind that they will be around and evolve in the next years.

When it came to backend development we were not sure about what to pick. We could go the safe way (e.g. Ruby, Java) and optimize for market reach, but these languages and related frameworks were falling short when it came to connecting the previous dots.

Software development is deeply tied to hardware development. As stated before we can now fit more cores on a CPU, turning what was one processor into many. The problem with this is that programming languages like Java or Ruby haven’t really made taking advantage of these cores particularly easy. You might be able to create a thread, but managing that thread and a handling shared state is really, really tough.

That’s when we found Elixir and Phoenix, which made handling concurrency very simple and recovering from errors possible. Elixir also makes it easy to support multiple connections at the same time while keeping bi-directional communication with the frontend.

Although Elixir is quite a young language, it builds on top of Erlang — a development platform for building scalable and reliable systems that constantly provide service with little or no downtime.

Since our decision in favor of Elixir, we (Coletiv and Significa) have been pushing both the developers and designers to think outside of the request-response paradigm and to push more towards near real-time interfaces which allow better response times and overall user happiness.

Thank you for reading!

This post covered many different and apparently not connected areas that guided us to our current technology and design state. In a few years when we look again at this article (if we even look at it again!) either we will be proud about what we wrote here and shout in every possible social media platform that we did the right decisions or we will shamefully delete the article and pivot our approach.

Thank you so much for reading, it means a lot to us! Also don’t forget to follow Coletiv on Twitter and LinkedIn as we keep posting more and more interesting articles on multiple technologies.

In case you don’t know, Coletiv is a software development studio from Porto specialised in Elixir, iOS, and Android app development. But we do all kinds of stuff. We take care of UX/UI design, web development, and even security for you.

So, let’s craft something together?