unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* Re: Release 5.5.0?
  2019-03-03 21:48  6% Release 5.5.0? Jeremy Evans
@ 2019-03-04  1:20  0% ` Eric Wong
  0 siblings, 0 replies; 4+ results
From: Eric Wong @ 2019-03-04  1:20 UTC (permalink / raw)
  To: Jeremy Evans; +Cc: unicorn-public

Jeremy Evans <code@jeremyevans.net> wrote:
> It's been a couple of months since the 5.5.0 preview release.  Other the
> the change to use rb_gc_register_mark_object, there haven't been any
> changes since.  I know you don't have much time for Ruby currently, but
> would it be possible for you to release 5.5.0 in the next couple weeks?

Sure, released.  Mainly just writing release notes.

https://bogomips.org/unicorn-public/20190304011502.GA30650@dcvr/

And I hate marketing, so I hate drawing more attention to the
project in the form of releases.

^ permalink raw reply	[relevance 0%]

* [ANN] unicorn 5.5.0 - Rack HTTP server for fast clients and
@ 2019-03-04  1:15  5% Eric Wong
  0 siblings, 0 replies; 4+ results
From: Eric Wong @ 2019-03-04  1:15 UTC (permalink / raw)
  To: ruby-talk, unicorn-public; +Cc: Jeremy Evans

unicorn is an HTTP server for Rack applications designed to only serve
fast clients on low-latency, high-bandwidth connections and take
advantage of features in Unix/Unix-like kernels.  Slow clients should
only be served by placing a reverse proxy capable of fully buffering
both the the request and response in between unicorn and slow clients.

Disclaimer:

Due to its ability to tolerate crashes and isolate clients, unicorn
is unfortunately known to prolong the existence of bugs in applications
and libraries which run on top of it.

* https://bogomips.org/unicorn/
* public list: unicorn-public@bogomips.org
* mail archives: https://bogomips.org/unicorn-public/
* git clone https://bogomips.org/unicorn.git
* https://bogomips.org/unicorn/NEWS.atom.xml
* nntp://news.public-inbox.org/inbox.comp.lang.ruby.unicorn

unicorn 5.5.0

Mostly identical to 5.5.0.pre1, which I didn't hear any feedback
from:

  https://bogomips.org/unicorn-public/20181220222842.GA27382@dcvr/

> Jeremy Evans contributed the "default_middleware" configuration option:
>
>   https://bogomips.org/unicorn-public/20180913192055.GD48926@jeremyevans.local/
>
> Jeremy also contributed the ability to use separate groups for the process
> and log files:
>
>   https://bogomips.org/unicorn-public/20180913192449.GE48926@jeremyevans.local/
>
> There's also a couple of uninteresting minor optimizations and
> documentation additions.

Otherwise, there's one extra change to use
rb_gc_register_mark_object which is finally a documented part of
the Ruby C-API, but has existed since the 1.9 days.

^ permalink raw reply	[relevance 5%]

* Release 5.5.0?
@ 2019-03-03 21:48  6% Jeremy Evans
  2019-03-04  1:20  0% ` Eric Wong
  0 siblings, 1 reply; 4+ results
From: Jeremy Evans @ 2019-03-03 21:48 UTC (permalink / raw)
  To: unicorn-public

Eric,

It's been a couple of months since the 5.5.0 preview release.  Other the
the change to use rb_gc_register_mark_object, there haven't been any
changes since.  I know you don't have much time for Ruby currently, but
would it be possible for you to release 5.5.0 in the next couple weeks?

Thanks,
Jeremy

^ permalink raw reply	[relevance 6%]

* [PATCH] use rb_gc_register_mark_object
@ 2018-12-26  5:08  7% Eric Wong
  0 siblings, 0 replies; 4+ results
From: Eric Wong @ 2018-12-26  5:08 UTC (permalink / raw)
  To: unicorn-public; +Cc: Eric Wong

Since Ruby 2.6, it's a documented part of the API and we may depend
on it: https://bugs.ruby-lang.org/issues/9894

It's been around since the early Ruby 1.9 days, and reduces
overhead compared to relying on rb_global_variable:

  https://bogomips.org/unicorn-public/20170301002854.29198-1-e@80x24.org/
---
 ext/unicorn_http/common_field_optimization.h |  4 ++--
 ext/unicorn_http/global_variables.h          |  4 ++--
 ext/unicorn_http/httpdate.c                  |  4 ++--
 ext/unicorn_http/unicorn_http.rl             | 13 ++++---------
 4 files changed, 10 insertions(+), 15 deletions(-)

diff --git a/ext/unicorn_http/common_field_optimization.h b/ext/unicorn_http/common_field_optimization.h
index 4b9f062..0659fc7 100644
--- a/ext/unicorn_http/common_field_optimization.h
+++ b/ext/unicorn_http/common_field_optimization.h
@@ -77,7 +77,7 @@ static VALUE str_new_dd_freeze(const char *ptr, long len)
 }
 
 /* this function is not performance-critical, called only at load time */
-static void init_common_fields(VALUE mark_ary)
+static void init_common_fields(void)
 {
   int i;
   struct common_field *cf = common_http_fields;
@@ -95,7 +95,7 @@ static void init_common_fields(VALUE mark_ary)
       memcpy(tmp + HTTP_PREFIX_LEN, cf->name, cf->len + 1);
       cf->value = str_new_dd_freeze(tmp, HTTP_PREFIX_LEN + cf->len);
     }
-    rb_ary_push(mark_ary, cf->value);
+    rb_gc_register_mark_object(cf->value);
   }
 }
 
diff --git a/ext/unicorn_http/global_variables.h b/ext/unicorn_http/global_variables.h
index c17ee6a..f8e694c 100644
--- a/ext/unicorn_http/global_variables.h
+++ b/ext/unicorn_http/global_variables.h
@@ -56,7 +56,7 @@ NORETURN(static void parser_raise(VALUE klass, const char *));
 /** Defines global strings in the init method. */
 #define DEF_GLOBAL(N, val) do { \
   g_##N = rb_obj_freeze(rb_str_new(val, sizeof(val) - 1)); \
-  rb_ary_push(mark_ary, g_##N); \
+  rb_gc_register_mark_object(g_##N); \
 } while (0)
 
 /* Defines the maximum allowed lengths for various input elements.*/
@@ -67,7 +67,7 @@ DEF_MAX_LENGTH(FRAGMENT, 1024); /* Don't know if this length is specified somewh
 DEF_MAX_LENGTH(REQUEST_PATH, 4096); /* common PATH_MAX on modern systems */
 DEF_MAX_LENGTH(QUERY_STRING, (1024 * 10));
 
-static void init_globals(VALUE mark_ary)
+static void init_globals(void)
 {
   DEF_GLOBAL(rack_url_scheme, "rack.url_scheme");
   DEF_GLOBAL(request_method, "REQUEST_METHOD");
diff --git a/ext/unicorn_http/httpdate.c b/ext/unicorn_http/httpdate.c
index 2381cff..b59d038 100644
--- a/ext/unicorn_http/httpdate.c
+++ b/ext/unicorn_http/httpdate.c
@@ -64,13 +64,13 @@ static VALUE httpdate(VALUE self)
 	return buf;
 }
 
-void init_unicorn_httpdate(VALUE mark_ary)
+void init_unicorn_httpdate(void)
 {
 	VALUE mod = rb_define_module("Unicorn");
 	mod = rb_define_module_under(mod, "HttpResponse");
 
 	buf = rb_str_new(0, buf_capa - 1);
-	rb_ary_push(mark_ary, buf);
+	rb_gc_register_mark_object(buf);
 	buf_ptr = RSTRING_PTR(buf);
 	httpdate(Qnil);
 
diff --git a/ext/unicorn_http/unicorn_http.rl b/ext/unicorn_http/unicorn_http.rl
index 283bfa2..8ef23bc 100644
--- a/ext/unicorn_http/unicorn_http.rl
+++ b/ext/unicorn_http/unicorn_http.rl
@@ -13,7 +13,7 @@
 #include "global_variables.h"
 #include "c_util.h"
 
-void init_unicorn_httpdate(VALUE mark_ary);
+void init_unicorn_httpdate(void);
 
 #define UH_FL_CHUNKED  0x1
 #define UH_FL_HASBODY  0x2
@@ -931,11 +931,8 @@ static VALUE HttpParser_rssget(VALUE self)
 
 void Init_unicorn_http(void)
 {
-  static VALUE mark_ary;
   VALUE mUnicorn, cHttpParser;
 
-  mark_ary = rb_ary_new();
-  rb_global_variable(&mark_ary);
   mUnicorn = rb_define_module("Unicorn");
   cHttpParser = rb_define_class_under(mUnicorn, "HttpParser", rb_cObject);
   eHttpParserError =
@@ -945,7 +942,7 @@ void Init_unicorn_http(void)
   e414 = rb_define_class_under(mUnicorn, "RequestURITooLongError",
                                eHttpParserError);
 
-  init_globals(mark_ary);
+  init_globals();
   rb_define_alloc_func(cHttpParser, HttpParser_alloc);
   rb_define_method(cHttpParser, "initialize", HttpParser_init, 0);
   rb_define_method(cHttpParser, "clear", HttpParser_clear, 0);
@@ -982,16 +979,14 @@ void Init_unicorn_http(void)
 
   rb_define_singleton_method(cHttpParser, "max_header_len=", set_maxhdrlen, 1);
 
-  init_common_fields(mark_ary);
+  init_common_fields();
   SET_GLOBAL(g_http_host, "HOST");
   SET_GLOBAL(g_http_trailer, "TRAILER");
   SET_GLOBAL(g_http_transfer_encoding, "TRANSFER_ENCODING");
   SET_GLOBAL(g_content_length, "CONTENT_LENGTH");
   SET_GLOBAL(g_http_connection, "CONNECTION");
   id_set_backtrace = rb_intern("set_backtrace");
-  init_unicorn_httpdate(mark_ary);
-
-  OBJ_FREEZE(mark_ary);
+  init_unicorn_httpdate();
 
 #ifndef HAVE_RB_HASH_CLEAR
   id_clear = rb_intern("clear");
-- 
EW


^ permalink raw reply related	[relevance 7%]

Results 1-4 of 4 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2018-12-26  5:08  7% [PATCH] use rb_gc_register_mark_object Eric Wong
2019-03-03 21:48  6% Release 5.5.0? Jeremy Evans
2019-03-04  1:20  0% ` Eric Wong
2019-03-04  1:15  5% [ANN] unicorn 5.5.0 - Rack HTTP server for fast clients and Eric Wong

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).