Recent Posts

More Posts

Hello there! Almost eight years back Tomas Petricek wrote a blog post introducing BlockingQueueAgent and followed it up with another blog post on how to apply it to solve an Image Processing problem using the pipeline concurrency pattern. In this blog post, we are going to learn how to port this example using Hopac's BoundedMb abstraction, aka Bounded Mailbox. Image processing pipeline As defined by Tomas in his blog post, the image processing pipeline works as depicted in the below image.

CONTINUE READING

Hi there! Welcome back to the sixth part of my blog series on concurrent programming in fsharp. In this part, we are going to learn how to deal with state changes while doing concurrent programming through a fun example. Time Bomb Simulator The example that we are going to see is a time bomb simulator. The time bomb transitions through different states as shown below during its lifecycle. The associated fsharp type TimeBomb will have the following signature

CONTINUE READING

Hi, In the last blog post, we learned how Alt in Hopac works and its applications. In this blog post, we are going to apply what we learned so far by creating a Ticker. Using ticker we can do something repeatedly at regular intervals. To implement a Ticker in Hopac, we have to know one more abstraction in Hopac called IVar. So, in the first section, we are going to learn IVar and then we'll use it to implement Ticker.

CONTINUE READING

Hi, Welcome back to the fourth part of Concurrent Programming in fsharp blog post series. In part-2, we just learned that Alt<'a> is a subclass of Job<'a>. In this blog post, we are doing to dive deep into this abstraction and learn what it brings to the table. An Example Before diving into the definition of Alt<'a>, let's figure out why we need it in the first place. Assume that we have a function delayedPrintn which prints a given message after n milliseconds

CONTINUE READING

Two years back, I wrote a blog post on how to implement the API Gateway pattern using Reactive Extensions(Rx). In this third part of concurrent programming in fsharp using Hopac blog series, we are going to revisit that blog post and port it to use Hopac instead of Reactive Extensions. Rx vs Hopac The critical difference between Rx and Hopac is their communication model. Rx is primarily a system for querying data in motion asynchronously, and systems built using Rx rely on asynchronous message-passing.

CONTINUE READING

Books

F# Applied

An in-depth understanding of Web development in F# using Suave

F# Applied II

It helps you to learn how to build a real-world, production-ready, end-to-end web application in F# using the functional programming principles by developing a Twitter clone from scratch.