| From | Sent On | Attachments |
|---|---|---|
| Magnus Lynch | Apr 25, 2010 1:57 am | |
| agentzh | Apr 25, 2010 2:35 am | |
| zhicheng | Apr 25, 2010 3:28 am | |
| agentzh | Apr 25, 2010 3:43 am | |
| agentzh | Apr 25, 2010 3:43 am | |
| zhicheng | Apr 25, 2010 8:35 am | |
| Magnus Lynch | Apr 26, 2010 3:32 am | |
| agentzh | Apr 26, 2010 4:42 am | |
| agentzh | May 4, 2010 7:11 pm |
| Subject: | Communications Sequence with Upstream | |
|---|---|---|
| From: | Magnus Lynch (mag...@gmail.com) | |
| Date: | Apr 25, 2010 1:57:52 am | |
| List: | ru.sysoev.nginx | |
I have been studying the nginx source code and read through Emiller's guides and I'm interested in doing something more general than I have learned about so far.
Say I have a location /url that I want to construct responses to based on a sequence of communications with an upstream, host:port. To be specific, the upstream would be a database, and the sequence of communications would comprise commands and responses. A simple example of what I'd like to do would be: 1. client communicates message to /url meaning "if key foo exists, add 1 to bar" 2. module handling /url sends first database command to check if foo exists, if not reply "failed" to client, or it does and 3. module sends database command to increment bar, replies "succeeded".
The details are arbitrary, but I would think there are myriad examples where you'd want a module to construct a reply based on back and forth communications.
I'm hoping there's some nice way of handling this case, but from I've gathered looking at the code it seems oriented to "1 message to module, filter as desired, send to upstream, get response, filter again, then response back to client."
Thanks
_______________________________________________ nginx mailing list ngi...@nginx.org http://nginx.org/mailman/listinfo/nginx





