Browse Source

[ruby/roda-sequel] Remove Unicorn variant (#9890)

Unicorn hasn't been updated for 4 years and seems unmaintained.
It isn't the fastest on any of the benchmarks either.
Petrik de Heus 2 months ago
parent
commit
d8d44310b4

+ 0 - 5
frameworks/Ruby/roda-sequel/Gemfile

@@ -23,8 +23,3 @@ end
 group :puma, optional: true do
   gem "puma", "~> 6.2", require: false
 end
-
-group :unicorn, optional: true do
-  gem 'logger' # required by unicorn on Ruby 3.5
-  gem "unicorn", "~> 6.1", platforms: %i[ruby mswin], require: false
-end

+ 0 - 8
frameworks/Ruby/roda-sequel/Gemfile.lock

@@ -6,15 +6,12 @@ GEM
     erubi (1.13.1)
     iodine (0.7.58)
     json (2.11.3)
-    kgio (2.11.4)
-    logger (1.7.0)
     mysql2 (0.5.6)
     nio4r (2.7.4)
     pg (1.5.9)
     puma (6.6.0)
       nio4r (~> 2.0)
     rack (3.1.12)
-    raindrops (0.20.1)
     roda (3.90.0)
       rack
     sequel (5.90.0)
@@ -23,9 +20,6 @@ GEM
       pg (>= 0.18.0, != 1.2.0)
       sequel (>= 4.38.0)
     tilt (2.6.0)
-    unicorn (6.1.0)
-      kgio (~> 2.6)
-      raindrops (~> 0.7)
 
 PLATFORMS
   ruby
@@ -37,7 +31,6 @@ DEPENDENCIES
   erubi (~> 1.12)
   iodine (~> 0.7)
   json (~> 2.8)
-  logger
   mysql2 (~> 0.5)
   pg (~> 1.4)
   puma (~> 6.2)
@@ -45,7 +38,6 @@ DEPENDENCIES
   sequel (~> 5.67)
   sequel_pg (~> 1.17)
   tilt (~> 2.1)
-  unicorn (~> 6.1)
 
 BUNDLED WITH
    2.6.2

+ 0 - 1
frameworks/Ruby/roda-sequel/README.md

@@ -14,7 +14,6 @@ The tests will be run with:
 
 * [Ruby 3.4](http://www.ruby-lang.org)
 * [Puma 6](http://puma.io)
-* [Unicorn 6](https://bogomips.org/unicorn/)
 * [Iodine](https://github.com/boazsegev/iodine)
 * [Roda 3](http://roda.jeremyevans.net)
 * [Sequel 5](http://sequel.jeremyevans.net)

+ 0 - 20
frameworks/Ruby/roda-sequel/benchmark_config.json

@@ -65,26 +65,6 @@
         "display_name": "roda-sequel-postgres-iodine-mri",
         "versus": "rack-sequel-postgres-iodine-mri",
         "notes": ""
-      },
-      "postgres-unicorn-mri": {
-        "db_url": "/db",
-        "query_url": "/queries?queries=",
-        "fortune_url": "/fortunes",
-        "update_url": "/updates?queries=",
-        "port": 8080,
-        "approach": "Realistic",
-        "classification": "Micro",
-        "database": "Postgres",
-        "framework": "roda-sequel",
-        "language": "Ruby",
-        "orm": "Full",
-        "platform": "Rack",
-        "webserver": "Unicorn",
-        "os": "Linux",
-        "database_os": "Linux",
-        "display_name": "roda-sequel-postgres-unicorn-mri",
-        "versus": "rack-sequel-postgres-unicorn-mri",
-        "notes": ""
       }
     }
   ]

+ 1 - 10
frameworks/Ruby/roda-sequel/boot.rb

@@ -8,14 +8,7 @@ QUERIES_MIN = 1
 QUERIES_MAX = 500
 SEQUEL_NO_ASSOCIATIONS = true
 
-SERVER_STRING =
-  if defined?(Iodine)
-    "Iodine"
-  elsif defined?(Puma)
-    "Puma"
-  elsif defined?(Unicorn)
-    "Unicorn"
-  end
+SERVER_STRING = "roda"
 
 Bundler.require(:default) # Load core modules
 
@@ -45,8 +38,6 @@ def connect(dbtype)
         (threads = Puma.cli_config.options.fetch(:max_threads)) > 1
     opts[:max_connections] = (2 * Math.log(threads)).floor
     opts[:pool_timeout] = 10
-  elsif defined?(Unicorn)
-    Sequel.single_threaded = true
   end
 
   Sequel.connect "%{adapter}://%{host}/%{database}?user=%{user}&password=%{password}" %

+ 0 - 68
frameworks/Ruby/roda-sequel/config.toml

@@ -34,71 +34,3 @@ orm = "Full"
 platform = "Rack"
 webserver = "Puma"
 versus = "rack-sequel-puma-mri"
-
-[postgres-passenger-mri]
-urls.plaintext = "/plaintext"
-urls.json = "/json"
-urls.db = "/db"
-urls.query = "/queries?queries="
-urls.update = "/updates?queries="
-urls.fortune = "/fortunes"
-approach = "Realistic"
-classification = "Micro"
-database = "Postgres"
-database_os = "Linux"
-os = "Linux"
-orm = "Full"
-platform = "Rack"
-webserver = "Passenger"
-versus = "rack-sequel-postgres-passenger-mri"
-
-[postgres-unicorn-mri]
-urls.plaintext = "/plaintext"
-urls.json = "/json"
-urls.db = "/db"
-urls.query = "/queries?queries="
-urls.update = "/updates?queries="
-urls.fortune = "/fortunes"
-approach = "Realistic"
-classification = "Micro"
-database = "Postgres"
-database_os = "Linux"
-os = "Linux"
-orm = "Full"
-platform = "Rack"
-webserver = "Unicorn"
-versus = "rack-sequel-postgres-unicorn-mri"
-
-[passenger-mri]
-urls.plaintext = "/plaintext"
-urls.json = "/json"
-urls.db = "/db"
-urls.query = "/queries?queries="
-urls.update = "/updates?queries="
-urls.fortune = "/fortunes"
-approach = "Realistic"
-classification = "Micro"
-database = "MySQL"
-database_os = "Linux"
-os = "Linux"
-orm = "Full"
-platform = "Rack"
-webserver = "Passenger"
-versus = "rack-sequel-passenger-mri"
-
-[unicorn-mri]
-urls.plaintext = "/plaintext"
-urls.json = "/json"
-urls.db = "/db"
-urls.query = "/queries?queries="
-urls.update = "/updates?queries="
-urls.fortune = "/fortunes"
-approach = "Realistic"
-classification = "Micro"
-database = "MySQL"
-database_os = "Linux"
-os = "Linux"
-orm = "Full"
-platform = "Rack"
-webserver = "Unicorn"
-versus = "rack-sequel-unicorn-mri"

+ 0 - 6
frameworks/Ruby/roda-sequel/config/mri_unicorn.rb

@@ -1,6 +0,0 @@
-require_relative 'auto_tune'
-
-# FWBM only...
-num_workers, = auto_tune
-
-worker_processes num_workers

+ 0 - 21
frameworks/Ruby/roda-sequel/roda-sequel-postgres-unicorn-mri.dockerfile

@@ -1,21 +0,0 @@
-FROM ruby:3.5-rc
-
-ADD ./ /roda-sequel
-WORKDIR /roda-sequel
-
-ENV RUBY_YJIT_ENABLE=1
-
-# Use Jemalloc
-RUN apt-get update && \
-    apt-get install -y --no-install-recommends libjemalloc2
-ENV LD_PRELOAD=libjemalloc.so.2
-
-ENV BUNDLE_FORCE_RUBY_PLATFORM=true
-RUN bundle config set with 'postgresql unicorn'
-RUN bundle install --jobs=8
-
-ENV DBTYPE=postgresql
-
-EXPOSE 8080
-
-CMD bundle exec unicorn -c config/mri_unicorn.rb -o 0.0.0.0 -p 8080 -E production