wandenberg / nginx-push-stream-module

A pure stream http push technology for your Nginx setup. Comet made easy and really scalable.
Other
2.22k stars 295 forks source link

Support queue management from push_stream directives #67

Closed Downchuck closed 4 years ago

Downchuck commented 11 years ago

I'd like to be able to run something like: push_stream_add_message "Arbitrary message"

Similarly (only has value if message storing is enabled): push_stream_get_messages $output_variable;

wandenberg commented 11 years ago

Sorry, I didn't understood what you really want and why. Could you explain better?

Downchuck commented 11 years ago

I'd like to be able to push and pull messages from within nginx directives. This will make it easier to work with other nginx modules. nginx_postgres postgres_set is a good example of the behavior.

push_stream_add_message "Message"; would push a message onto the queue currently set on $push_stream_channel_id. Similar to doing a POST/PUT.

post_stream_get_messages $output_variable; would be similar to doing a GET and putting the results into $output_variable

wandenberg commented 11 years ago

The post_stream_get_messages does not make much sense, this is a stream module, what would be the expected behavior if the connection should be kept? And the module was designed to work alone on the location, so the purpose of push_stream_add_message is against that, sorry.

Downchuck commented 11 years ago

I don't understand what you mean when you say that: "the module was designed to work alone on the location". Is there something in the design that would not allow for adding a message from a variable? This is basically just a simple call to "ngx_http_push_stream_add_msg_to_channel".

post_stream_get_messages would only apply with "push_stream_store_messages on". It would have optional arguments, such as "flush", to flush the stored messages and/or an id for offset.

wandenberg commented 11 years ago

Charles,

the problem isn't if I can or not add a message from a variable. The publisher location was designed to get the content of a post, add a message and finish the connection, returning some information. At this moment I don't see any reason to add complexity changing this.

May be if you explain exactly what you want to do I can help you. But I will not change the module without a good reason, or to achieve a specific case.

On Sat, Apr 13, 2013 at 6:08 PM, Charles Pritchard <notifications@github.com

wrote:

I don't understand what you mean when you say that: "the module was designed to work alone on the location". Is there something in the design that would not allow for adding a message from a variable?

post_stream_get_messages would only apply with "push_stream_store_messages on". It could optional argument, such as "flush", to flush the stored messages and/or an id for offset.

— Reply to this email directly or view it on GitHubhttps://github.com/wandenberg/nginx-push-stream-module/issues/67#issuecomment-16340918 .

Downchuck commented 11 years ago

ok, feel free to mark this issue as closed.