From 0fb517107621961f08437f845cca9eabe7177ea8 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 12 Oct 2009 14:43:07 -0700 Subject: vs Unicorn: use diagrams for concurrency models A picture is worth a thousand words, even in ASCII art. --- vs_Unicorn | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'vs_Unicorn') diff --git a/vs_Unicorn b/vs_Unicorn index 827bdb8..00bac64 100644 --- a/vs_Unicorn +++ b/vs_Unicorn @@ -3,6 +3,55 @@ While \Rainbows! depends on Unicorn for its process/socket management, HTTP parser and configuration language; \Rainbows! is more ambitious. +== Architectural Diagrams + +=== Unicorn uses a 1:1 mapping of clients to processes + + unicorn master + \_ unicorn worker[0] + | \_ client[0] + \_ unicorn worker[1] + | \_ client[1] + \_ unicorn worker[2] + | \_ client[2] + ... + \_ unicorn worker[M] + \_ client[M] + +=== \Rainbows! uses a M:N mapping of clients to processes + + rainbows master + \_ rainbows worker[0] + | \_ client[0,0] + | \_ client[0,1] + | \_ client[0,2] + | ... + | \_ client[0,N] + \_ rainbows worker[1] + | \_ client[1,0] + | \_ client[1,1] + | \_ client[1,2] + | \_ client[1,3] + | ... + | \_ client[0,N] + \_ rainbows worker[2] + | \_ client[2,0] + | \_ client[2,1] + | \_ client[2,2] + | ... + | \_ client[0,N] + ... + \_ rainbows worker[M] + \_ client[3,0] + \_ client[3,1] + \_ client[3,2] + ... + \_ client[0,N] + +In both cases, workers share common listen sockets with the master and +pull connections off the listen queue only if the worker has resources +available. + == Differences from Unicorn * log rotation is handled immediately in \Rainbows! whereas Unicorn has -- cgit v1.2.3-24-ge0c7