Nginx-perl 1.1.11.1

Hello, everyone.

I’m happy to announce the first release of nginx-perl,
version 1.1.11.1:

http://zzzcpan.github.com/nginx-perl/

Nginx-perl provides asynchronous functions for original
embedded perl to resolve domain names, connect to external
hosts, exchange data and most importantly respond to HTTP
clients. Code sample can be found on the web page above.

Features

  • full official nginx perl API
  • asynchronous connections (ngx_connector, ngx_reader, ngx_writer)
  • timer (ngx_timer)
  • SSL (ngx_ssl_handshaker)
  • resolver (ngx_resolver)
  • access handlers (perl_access)
  • app handlers (perl_app)
  • configuration level eval (perl_eval)
  • init_worker, exit_worker handlers (perl_init_worker,
    perl_exit_worker)
  • logging functions (ngx_log_*)
  • client connection takeover for websockets, etc.

In many ways it is an actual asynchronous framework.

You can install it from sources manually with your favorite
nginx addons:

% perl Makefile.PL --with-http_ssl_module
% make
% make test
% make install
  # or to try without installation
% ./objs/nginx-perl -p eg/helloworld

Or from CPAN:

% cpan Nginx::Perl

Documentation is far from perfect, but should be enough for
people already familiar with embedded perl.

If you have a question, add an issue on github.

Github:
https://github.com/zzzcpan/nginx-perl

Hi,

Troll: Will the next version be numbered 1.1.11.1.1 ?

:oP

B. R.

On Thu, Dec 22, 2011 at 11:48 PM, B.R. [email protected] wrote:

Troll: Will the next version be numbered 1.1.11.1.1 ?

At least someone is interested :slight_smile:

On Fri, Dec 23, 2011 at 3:33 AM, Alexandr G. [email protected]
wrote:

In many ways it is an actual asynchronous framework.

Thank you for your amazing work! :smiley:

BTW, is it possible to make it also a synchronous but still
nonblocking framework just like the ngx_lua module’s cosocket
mechanism based on the Nginx event model and Lua coroutines?

https://github.com/chaoslawful/lua-nginx-module/blob/cosocket/t/058-tcp-socket.t#L17

Many people hate the “callback nightmare” but still love to embrace C10K
:slight_smile:

Thanks for your efforts!
-agentzh

On 22.12.11 22:33, Alexandr G. wrote:

I’m happy to announce the first release of nginx-perl,
Can you make some examples, use cases, etc. and include it in the future
documentation?

On 12/22/2011 08:33 PM, Alexandr G. wrote:

  • resolver (ngx_resolver)
  • access handlers (perl_access)
  • app handlers (perl_app)
  • configuration level eval (perl_eval)
  • init_worker, exit_worker handlers (perl_init_worker, perl_exit_worker)
  • logging functions (ngx_log_*)
  • client connection takeover for websockets, etc.

In many ways it is an actual asynchronous framework.

Sounds hilarious!!!

AnyEvent::Impl::Nginx adapter for Nginx::Perl would really really great!

Best regards, Brane

On 12/23/2011 04:10 AM, agentzh wrote:

https://github.com/chaoslawful/lua-nginx-module/blob/cosocket/t/058-tcp-socket.t#L17

Many people hate the “callback nightmare” but still love to embrace C10K :slight_smile:

True, true :slight_smile:

AnyEvent supports so called Coros, that’s why i’m so interested about
anyevent support in Nginx::Perl implementation in AnyEvent :slight_smile:

Best regards, Brane

Hm… Am I only one who is confused by this project and did not find any
good in having separate nginx tree to see couple more perl functions?

Why not to create/compile an XS that links itself properly to nginx.so
and other libs? Why not to create add-on ngx_http_superperl module if
you really want it your way?

Alex.

On 12/27/11, Alex S. [email protected] wrote:

Hm… Am I only one who is confused by this project and did not find any
good in having separate nginx tree to see couple more perl functions?

Why not to create/compile an XS that links itself properly to nginx.so
and other libs? Why not to create add-on ngx_http_superperl module if
you really want it your way?

I didn’t think that blindly applying patches from an add-on was a good
idea. So I never even considered it.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs