Welcome! Log In Create A New Profile

Advanced

Re: Make ngx_http_v2_push_resource api public

Maxim Dounin
November 13, 2018 12:12PM
Hello!

On Mon, Nov 12, 2018 at 10:29:50PM -0500, Cubic wrote:

> I am intend to write an Nginx module which support downstream message push
> through http2 protocol.
>
> The main process is as below.
> 1. Client connect to Nginx and use http2 protocol to send a long polling
> request stream.
> 2. Nginx hold this long polling request stream and wait downstream
> messages.
> 3. If a message arrival, Nginx could send a push promise through the long
> polling stream and put the message in another stream associated with the
> push promise
>
> There is an ngx_http_v2_push_resource api in ngx_http_v2_filter_module.c
> which assemble push promise frame and create another stream to invoke an
> internal request by the specific path to send data, so i can register an
> content handler with that path to send the message.
> But sadly, this api is static somehow.
>
> Would you make this amazing api public?

Similar request was previously rejected, see this thread for
details:

http://mailman.nginx.org/pipermail/nginx-devel/2018-February/010847.html

In short: this API is not going to be public. If you want to push
resources from your module, consider using the "http2_push"
directive with a variable, or using the "Link: rel=preload" header.

As for the design you describe, it looks unnecessarily
HTTP/2-centric. You may want to consider returning an actual
response to the long polling request instead of trying to maintain
a fake request and return associated pushed resources.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Make ngx_http_v2_push_resource api public

Cubic November 12, 2018 10:29PM

Re: Make ngx_http_v2_push_resource api public

Maxim Dounin November 13, 2018 12:12PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 246
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