6 Real-time event streams: functional reactive programming
This chapter covers
- Understanding queryable event streams
- Working with Reactive Extensions (Rx)
- Combining F# and C# to make events first-class values
- Processing high-rate data streams
- Implementing a Publisher-Subscriber pattern
We’re used to responding to events in our lives daily. If it starts to rain, we get an umbrella. If the daylight in a room begins to dim, we flip the switch to turn on the electric light. The same is true in our applications, where a program must react to (or handle) events caused by something else happening in the application or a user interacting with it. Almost every program must handle events, whether they’re the receipt of an HTTP request for a web page on a server, a notification from your favorite social media platform, a change in your filesystem, or a simple click of a button.