Search Results for: future

Scala Futures

Reading Time: 2 minutes We all know that parallel and concurrent applications are need of the hour. To write these applications, multithreading is used. Thread safety is very common problem when working on such applications. So, Futures gives an easy way to run one or more tasks concurrently in Scala. When we create a new future, Scala creates a new thread and executes its code. The result of the Continue Reading

Scala Futures: How to Use

Reading Time: 3 minutes Scala Future gives you a simple way to run an algorithm concurrently. Scala Future: Run and Block By following this approach, first create a future and then block to wait for its result. Future and ExecutionContext A Future[T] is a container that runs a computation concurrently, and at some future time may return either (a) a result of type T or (b) an exception. The Continue Reading

Exceptions and Futures in Zio

Reading Time: 3 minutes ZIO is an open-source library that delivers a better “Future” for asynchronous and concurrent programming in Scala. Similarly, we can’t retry a Future in the event of failure, like we can for ZIO, because a Future isn’t a blueprint for doing something—it’s an executing computation. So if a Future fails, there is nothing else to do. We can only retrieve the failure. The central “type Continue Reading

Welcome to the Future in Scala

Reading Time: 4 minutes You have units of work that you want to run asynchronously, so you don’t block while they’re running. A future gives you a simple way to run an algorithm concurrently. A future starts running concurrently when you create it and returns a result at some point, well, in the future. In Scala, we call that a future returns eventually. The Future instance is a handle Continue Reading

The Future of Functional Programming- ZIO

Reading Time: 3 minutes In the current scenario, lots of companies try to adopt functional programming or some elements of the functional programming paradigm, so they want to choose to take what’s best available in both worlds (functional & object-oriented programming). But, this mindset of people is slowly changing now, with the introduction of ZIO. Big companies like Apple, DHL, and Wix.com are adopting ZIO in their production apps. Let’s dive Continue Reading

Future Type Operation with Scala

Reading Time: 6 minutes Introduction Scala Future represents a result of an asynchronous computation that may or may not be available yet. When we create a new Future, Scala spawns a new thread and executes its code. Once the execution is finished, the result of the computation (value or exception) will be assigned to the Future. Type Future Operations Map When we have a Future instance, we can use the map method to transform its successful result Continue Reading

Futures and Promises: Functional Way of Concurrency

Reading Time: 3 minutes So, from the heading, you must be wondering that what is so special about Futures and Promises and why we are calling it the functional way of concurrency. Well, you all must be aware of the problems that are associated with concurrent programming whether it’s debugging a multithreaded program or shared state concurrency and that’s where Futures and Promises help you so that you don’t Continue Reading

Sustainable Software Engineering: Our Future

Reading Time: 4 minutes Sustainable software engineering (also known as Green Software Engineering) is an emerging field that combines climate science, software techniques and architecture, energy markets, hardware, and data center design. Principles of Sustainable Software Engineering outline the abilities and competencies required to design, construct, and run green, sustainable software solutions (GSE Principles). Many of us think about major topics like the importance of carbon emissions, transitioning to Continue Reading

The Beginner’s Guide to Easy Parallel Programming With Scala Futures

Reading Time: 3 minutes Introduction We can build a Futures API into the Scala programming language, making parallel programming much easier than using threads, locks, and callbacks. The purpose of this blog post is to provide an overview of Scala’s Futures: how they work, how you can use them, and how you can use them to leverage parallelism in your code. Creating Futures We have imported under the name Continue Reading

Scala Future – Their Uses And How To Implement Them

Reading Time: 3 minutes A Scala Future is a place holder (an imaginary waiting box) which hold a value that may become available at some point. Moreover the scala Future API has the following building blocks :1) Future2) Promises3) Execution Context WHY FUTURE ? One of the most important trait of a programming language is to be patient for the code segment to complete their execution asynchronously with maximum Continue Reading

Quality assurance Ops- Is it software industry’s future?

Reading Time: 3 minutes Quality has become a concern when it comes to software development. Quality assurance Ops- integrates the QA processes, automation, and QA Reporting dashboard with the Software Development Lifecycle (SDLC) process. Hence it means giving importance to the testing team in the SDLC process. Thus here in this blog, we will get to know the answer for Quality assurance Ops- Is it the software industry’s future. Continue Reading

Java 8 Futures and Transformations for beginners

Reading Time: 3 minutes In this blog I’m going to talk about Futures in Java. Futures are used when threads in a system are being blocked. This blocking is due to computations that take a long period of time to execute, the most common sources of blocking are accessing a database, accessing a cloud service and reading from a file. Blocking calls also prevents the code following the blocking Continue Reading