From c88d33aec132ba83cc05564bf41645c2dc208b42 Mon Sep 17 00:00:00 2001 From: Smaug123 Date: Wed, 17 Feb 2021 19:01:01 +0000 Subject: [PATCH] Add README --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..0a0d2db --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +This is my answer to https://github.com/JerryDot/Webscraping-Webserver . + +It comes in two parts: a small library which supplies the moving parts, and then a whale of an ASP.NET server to demonstrate it. + +# PulsingServer library + +This is a small library that defines two entities based on `MailboxProcessor`s. +One entity (`ServerAgent`) sits ready to serve requests based on the latest information pushed into it. +One entity (`ExternalInfoProvider`) repeatedly calls an `Async` to obtain new information, and pushes it into the `ServerAgent`s. + +This way, we can ensure that only one entity is obtaining new information for the system, with low latency for responses via the `ServerAgent`, and no concurrency issues (because each `ServerAgent` maintains its own copy of the latest state). + +# ASP.NET server + +The server demonstrates the library in the most naive possible way, scraping a web page every 500ms to find the current time. + +This incidentally demonstrates that you can distribute load across multiple `ServerAgent`s, although in fact the example does not do any distributing.