Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions frameworks/Ruby/rails/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,27 @@ gem 'rails', '~> 8.0.0'
gem 'redis', '~> 5.0'
gem 'tzinfo-data'

group :mysql do
group :mysql, optional: true do
gem 'trilogy', '~> 2.8.1'
end

group :postgresql do
group :postgresql, optional: true do
gem 'pg', '~> 1.5'
end

group :falcon do
gem 'falcon', '~> 0.47', require: false
group :agoo, optional: true do
gem 'agoo', require: false
gem 'rackup'
end

group :puma do
gem 'puma', '~> 6.4', require: false
group :iodine, optional: true do
gem 'iodine', '~> 0.7', require: false
end

group :agoo do
gem 'agoo', require: false
gem 'rackup'
group :falcon, optional: true do
gem 'falcon', '~> 0.47', require: false
end

group :puma, optional: true do
gem 'puma', '~> 6.4', require: false
end
2 changes: 2 additions & 0 deletions frameworks/Ruby/rails/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ GEM
io-endpoint (0.14.0)
io-event (1.7.3)
io-stream (0.6.1)
iodine (0.7.58)
irb (1.14.1)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
Expand Down Expand Up @@ -269,6 +270,7 @@ PLATFORMS
DEPENDENCIES
agoo
falcon (~> 0.47)
iodine (~> 0.7)
pg (~> 1.5)
puma (~> 6.4)
rackup
Expand Down
6 changes: 4 additions & 2 deletions frameworks/Ruby/rails/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ comparing a variety of web platforms.

The tests were run with:

- [Ruby 3.3](http://www.ruby-lang.org/)
- [Rails 7.2](http://rubyonrails.org/)
- [Ruby 3.4](http://www.ruby-lang.org/)
- [Rails 8.0](http://rubyonrails.org/)
- [Puma 6.4](http://puma.io/)
- [Iodine](https://github.com/boazsegev/iodine)
- [Falcon](https://github.com/socketry/falcon)
- [MySQL](https://dev.mysql.com/)
- [PostgreSQL](https://www.postgresql.org/)
- [Redis 6](https://redis.io)
Expand Down
25 changes: 24 additions & 1 deletion frameworks/Ruby/rails/benchmark_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,30 @@
"database_os": "Linux",
"display_name": "rails-falcon",
"notes": "",
"versus": "rack-falcon-mri"
"versus": "rack-falcon-mri-sequel-raw"
},
"iodine": {
"db_url": "/db",
"json_url": "/json",
"query_url": "/queries?queries=",
"fortune_url": "/fortunes",
"update_url": "/updates?queries=",
"plaintext_url": "/plaintext",
"cached_query_url": "/cached?queries=",
"port": 8080,
"approach": "Realistic",
"classification": "Fullstack",
"database": "Postgres",
"framework": "rails",
"language": "Ruby",
"orm": "Full",
"platform": "Rack",
"webserver": "Iodine",
"os": "Linux",
"database_os": "Linux",
"display_name": "rails-iodine",
"notes": "",
"versus": "rack-iodine-mri-sequel-raw"
},
"agoo": {
"db_url": "/db",
Expand Down
2 changes: 1 addition & 1 deletion frameworks/Ruby/rails/rails-agoo.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ENV LD_PRELOAD=libjemalloc.so.2
COPY ./Gemfile* /rails/

ENV BUNDLE_FORCE_RUBY_PLATFORM=true
ENV BUNDLE_WITHOUT=mysql:falcon:puma
ENV BUNDLE_WITH=postgresql:agoo
RUN bundle install --jobs=8

COPY . /rails/
Expand Down
2 changes: 1 addition & 1 deletion frameworks/Ruby/rails/rails-falcon.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ENV LD_PRELOAD=libjemalloc.so.2
COPY ./Gemfile* /rails/

ENV BUNDLE_FORCE_RUBY_PLATFORM=true
ENV BUNDLE_WITHOUT=mysql:agoo:puma
ENV BUNDLE_WITH=postgresql:falcon
RUN bundle install --jobs=8

COPY . /rails/
Expand Down
27 changes: 27 additions & 0 deletions frameworks/Ruby/rails/rails-iodine.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM ruby:3.4

RUN apt-get update -yqq && apt-get install -yqq --no-install-recommends redis-server

EXPOSE 8080
WORKDIR /rails

# ENV RUBY_YJIT_ENABLE=1 YJIT is enabled in config/initializers/enable_yjit.rb

# Use Jemalloc
RUN apt-get update && \
apt-get install -y --no-install-recommends libjemalloc2
ENV LD_PRELOAD=libjemalloc.so.2

COPY ./Gemfile* /rails/

ENV BUNDLE_FORCE_RUBY_PLATFORM=true
ENV BUNDLE_WITH=postgresql:iodine
RUN bundle install --jobs=8

COPY . /rails/

ENV RAILS_ENV=production_postgresql
ENV PORT=8080
ENV REDIS_URL=redis://localhost:6379/0
CMD service redis-server start && \
bundle exec iodine
2 changes: 1 addition & 1 deletion frameworks/Ruby/rails/rails-mysql.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ENV LD_PRELOAD=libjemalloc.so.2
COPY ./Gemfile* /rails/

ENV BUNDLE_FORCE_RUBY_PLATFORM=true
ENV BUNDLE_WITHOUT=postgresql:agoo:falcon
ENV BUNDLE_WITH=mysql:puma
RUN bundle install --jobs=8

COPY . /rails/
Expand Down
2 changes: 1 addition & 1 deletion frameworks/Ruby/rails/rails.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ENV LD_PRELOAD=libjemalloc.so.2
COPY ./Gemfile* /rails/

ENV BUNDLE_FORCE_RUBY_PLATFORM=true
ENV BUNDLE_WITHOUT=mysql:agoo:falcon
ENV BUNDLE_WITH=postgresql:puma
RUN bundle install --jobs=8

COPY . /rails/
Expand Down
Loading