Reactive programming is becoming a popular paradigm for frontend development. In this article, we aim to revisit the key ideas behind this concept, see a way it can be applied to React, and which benefits it can bring.
Adopting reactive programming and RxJs with React can help reduce dependencies, enhance modularity, encourage the sharing of common logic among apps, and improve testability.
“Reactive programming is a declarative programming paradigm concerned with data streams and the propagation of change.” — Wikipedia
Questo articolo è la traduzione dell’originale in inglese pubblicato su InfoQ.
“Dove mettiamo questo (Micro)servizio? E’ meglio una Serverless Function oppure un Container? O magari un Virtual Machine (VM) dedicata?”. Quando si progetta una nuova soluzione “pronta per il cloud”, queste sono domande che gli architetti prima o poi si pongono.
Come spesso accade, per questo tipo di domande c’è solo una risposta valida: “dipende”. Non solo “dipende”, ma “può anche cambiare”. La soluzione ottimale presa in un certo momento può diventare fortemente sub-ottimale nell’arco di pochi mesi. Al lancio di un nuovo prodotto o servizio può essere conveniente optare…
Microservices and Containers are very popular today, even in traditional corporate IT shops. Often though they are implemented using languages, such as Java, born in the early ’90s and designed for a world of monolithical applications. Do you remember the big old Application Servers?
Sometimes this choice is driven by solid reasons: need to integrate legacy systems via libraries present only in the Java ecosystem, convenience to use skills already in house. Often, however, this choice can derive from a not careful evaluation of the alternatives which are available today and the benefits (economic and of performance) they can bring.
Lambda Calculus is a “is a formal system in mathematical logic for expressing computation” based on the concept of functions and defined by Alonzo Church in 1936.
Alan Turing demonstrated that Lambda Calculus and Turing Machine are equivalent, and therefore that Lambda Calculus is Turing complete. This means that any computation can be performed using Lambda Calculus.
Some may feel that approaching Lambda Calculus with pen and paper can be difficult, very much abstract, tedious to work with.
The cool thing is that Lambda Calculus, as we said, is based on the concept of functions, which is something that programmers…
I often happen to stump into posts comparing Java and Go. Almost always, at the center of the comparison is either the speed of execution or the presence/lack of specific features (usually absent in Go and well established in Java).
So if one writes that Go is awesome, there are tens of replies stating that Java is much better because “there is this benchmark that proves Java is much faster” (plus it has Generics and also try-catch). Then you read the “benchmark “that states that Java is faster than Go, and you find another flock of comments sustaining the opposite.
Da qualche anno stiamo assistendo ad una sempre più estesa adozione delle architetture a Microservizi che si appoggiano su containers. In contesti IT di tipo tradizionale, spesso le troviamo utilizzate con un linguaggio di programmazione quale Java, nato nei primi anni ’90 e progettato per un mondo di applicazioni monolitiche (vi ricordate i cari vecchi Application Servers?).
A volte questa scelta è dettata da solide ragioni: necessità di integrare sistemi legacy tramite librerie presenti solo nell’ecosistema Java, convenienza ad utilizzare competenze già esistenti in azienda. …
Prime numbers can be conceived of as an infinite stream of integers: 1, 2, 3, 5, 7, 11…etc.
In this article we will see a couple of different implementations of such logic, one using RxJs and Typescript, the other using Go channels as streams.
To start our calculation we need to generate a stream of all integers, starting from 2, which is going to be the source used by the algorithm. …
Lambda functions and WebSockets can be seen as concepts difficult to reconcile. Lambdas are ephemeral by nature. They appear when invoked and then disappear sometime after they have finished working. WebSockets, on the contrary, maintain stable, long-living connections between one server and many clients.
The AWS APIGateway offers the possibility to bring these two things together, combining the advantages of the Lambda on-demand model with the power of WebSockets’ real-time bidirectional communication.
Suppose you have to add a new major feature to an app. Which of the 2 scenarios is easier?
Well, there is no doubt. The second is a much more challenging task.
But then why do we usually find a more senior experienced team in the first and more junior teams buried in the second?
When I entered the team…
Reactive programming is getting traction and so is the use of ReactiveX libraries. More and more people start using this paradigm and often face similar problems in their learning path. Similar problems call for similar solutions, and this is what patterns are.
An interesting source to understand real-life problems is Stack Overflow. I started looking at the questions around RxJS some time ago, and I’ve noticed some recurring themes and similar situations that people have to deal with.
One popular theme is around asynchronous API calls; in other words, how to deal with HTTP requests in the real world. …