Introduction and Problem Description
In a network we have a situation as portrayed below. Several clients making requests from a server:A happy network is one where the server is available.
This means that replication to handle faults that may occur is a desirable feature. So let's replicate everything a server does in a simple, consistent, practical, and reliable way!
understand and implement Paxos.
Also to make it work more generally, combine it with a deterministic scheduler that can reliably handle many threads coming in asynchronously.
Oh, and of course, pick a cool bird acronym!
Paxos is an island off the west coast of Greece. Leslie Lamport imagined an ancient parliamentary system:
“ Recent archaeological discoveries on the island of Paxos reveal that the parliament functioned despite the peripatetic propensity of its part-time legislators. The legislators maintained consistent copies of the parliamentary record, despite their frequent forays from the chamber and the forgetfulness of their messengers.
Yes!
..ish..
A practical runtime for deterministic, stable and reliable threads.
Hi I'm a client! S'up, client here. Me too. Don't forget me, I'm a client.
...and we are out of sync...
For example: two clients make simultaneous HTTP PUT and GET requests for the same page.
Different arrival times lead to different outcomes!
Enter time-bubbling!
Two parameters for this technique:
Yay! They did it!
diff -ruN httpd-2.2.11/modules/generators/mod_cgid.c httpd-2.2.11-modified/modules/generators/mod_cgid.c
--- httpd-2.2.11/modules/generators/mod_cgid.c 2015-06-23 19:11:58.484786127 +0800
+++ httpd-2.2.11-modified/modules/generators/mod_cgid.c 2015-06-23 19:12:56.676785084 +0800
@@ -564,8 +564,10 @@
ap_log_error(APLOG_MARK, APLOG_ERR, err, r->server, "%s", description);
}
+#include
static int cgid_server(void *data)
{
+ tern_disable_sched_paxos();
struct sockaddr_un unix_addr;
int sd, sd2, rc;
mode_t omask;
an example of a performance hint
Apache | Mongoose |
MediaTomb | ClamAV |
MySQL |