Manipulating data streams by combining iteratees, enumerators, and enumeratees
Well, that's enough concepts for now. Let's put this in practice by implementing a new feature in our shop application: an auction room.
The idea is to allow multiple users to bid for an item of the shop in a room where all connected users instantly see the bids of others, as depicted in the following screenshot:
Unidirectional streaming with server-sent events
In order to instantly send a notification to all the users of an auction room when one makes a bid, we have to provide an HTTP endpoint streaming these events. We can achieve this using server-sent events. Thus, we have at least two endpoints: one to make a bid and one to get the stream of bid notifications. We actually need a third endpoint to get the HTML page showing an auction room (illustrated...