-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
84 lines (61 loc) · 2.87 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
NAME
Message::Passing::PSGI - ALPHA QUALITY PSGI adaptor for Message::Passing
SYNOPSIS
# Run the server - note that the -e has to all be on one line!
plackup -E production -s Twiggy -MPlack::App::Message::Passing -e'Plack::App::Message::Passing->new(return_address => "tcp://127.0.0.1:5555", send_address => "tcp://127.0.0.1:5556")->to_app'
# Run your app with the handler
plackup -E production -s Message::Passing testapp.psgi --host 127.0.0.1 --port 5556
# Browse to:
http://localhost:5000/
DESCRIPTION
ALPHA QUALITY EXPERIMENT - YOU HAVE BEEN WARNED!
This module implements a mongrel2 like strategy for web handlers, using
Message::Passing::ZeroMQ.
WHY
Because I could! It's a useful experiment to prove that Message::Passing
can be used for things entirely unlike my initial goals.
NO, REALLY?
Theoretically, this is quite an interesting model - as you've totally
split the front end connection acceptance and the back end request
handling, you can do things which are harder in other server
environments trivially.
Examples of things that 'just work' include:
Adding more handler processes
Totally dynamic, run as many as you want
Adding handler processes on other servers
As long as your send/return sockets are bound to a host that's
network accessible, you can spin up handlers wherever you want.
Upgrade the application in production
You can spin up a new version, verify it appears to be working
correctly etc before shutting down the old version
Profile the application in production
Just run a handler with NYTProf..
NOTE: The properties above _do not_ exist in the current code - you will
drop requests in-flight if you shut handlers down!! (Patches to fix this
should not be that hard, and would be welcome if anyone is interested)
If you're actually interested in using this in production, I'd recommend
you look at the real mongrel2, and Plack::Handler::Mongrel2.
BUGS
Many, and varied. Please do not try to run this in production ;_)
Issues include:
Large responses will use SEVERAL times the response length in RAM
Requests never timeout
App Handler crashes / restarts will lost in-flight requests.
Quite probably leaks RAM.
This has not been tested, which means I quite probably got it wrong
somewhere ;)
SEE ALSO
Plack::App::Message::Passing.
Plack::Handler::Message::Passing.
mongrel2
Message::Passing
Message::Passing::ZeroMQ.
AUTHOR
Tomas Doran (t0m) "<[email protected]>"
COPYRIGHT
Copyright the above author.
LICENSE
GNU Affero General Public License, Version 3
If you feel this is too restrictive to be able to use this software,
please talk to us as we'd be willing to consider re-licensing under less
restrictive terms.