Welcome! Log In Create A New Profile

Advanced

Communications Sequence with Upstream

Magnus Lynch
April 25, 2010 05:04AM
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
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Communications Sequence with Upstream

Magnus Lynch April 25, 2010 05:04AM

Re: Communications Sequence with Upstream

agentzh April 25, 2010 05:38AM

Re: Communications Sequence with Upstream

zhicheng April 25, 2010 06:29AM

Re: Communications Sequence with Upstream

agentzh April 25, 2010 06:46AM

Re: Communications Sequence with Upstream

agentzh April 25, 2010 06:48AM

Re: Communications Sequence with Upstream

zhicheng April 25, 2010 11:36AM

Re: Communications Sequence with Upstream

Magnus Lynch April 26, 2010 06:40AM

Re: Communications Sequence with Upstream

agentzh April 26, 2010 07:50AM

Re: Communications Sequence with Upstream

agentzh May 04, 2010 10:16PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 200
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready