Skip to content

Commit 19fa415

Browse files
committed
[rails] Add Iodine server
+-------------+---------+------+------+------+------+-------+------------+--------------+ | name|plaintext|update| json| db| query|fortune|cached-query|weighted_score| +-------------+---------+------+------+------+------+-------+------------+--------------+ | rails| 24599| 10016| 84462| 24975| 15127| 15241| 16647| 1207| | rails-iodine| 176699| 15306|116194| 32006| 25107| 18626| 31326| 1868|
1 parent 2ed435c commit 19fa415

File tree

9 files changed

+74
-16
lines changed

9 files changed

+74
-16
lines changed

frameworks/Ruby/rails/Gemfile

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,27 @@ gem 'rails', '~> 8.0.0'
44
gem 'redis', '~> 5.0'
55
gem 'tzinfo-data'
66

7-
group :mysql do
7+
group :mysql, optional: true do
88
gem 'trilogy', '~> 2.8.1'
99
end
1010

11-
group :postgresql do
11+
group :postgresql, optional: true do
1212
gem 'pg', '~> 1.5'
1313
end
1414

15-
group :falcon do
16-
gem 'falcon', '~> 0.47', require: false
15+
group :agoo, optional: true do
16+
gem 'agoo', require: false
17+
gem 'rackup'
1718
end
1819

19-
group :puma do
20-
gem 'puma', '~> 6.4', require: false
20+
group :iodine, optional: true do
21+
gem 'iodine', '~> 0.7', require: false
2122
end
2223

23-
group :agoo do
24-
gem 'agoo', require: false
25-
gem 'rackup'
24+
group :falcon, optional: true do
25+
gem 'falcon', '~> 0.47', require: false
26+
end
27+
28+
group :puma, optional: true do
29+
gem 'puma', '~> 6.4', require: false
2630
end

frameworks/Ruby/rails/Gemfile.lock

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ GEM
136136
io-endpoint (0.14.0)
137137
io-event (1.7.3)
138138
io-stream (0.6.1)
139+
iodine (0.7.58)
139140
irb (1.14.1)
140141
rdoc (>= 4.0.0)
141142
reline (>= 0.4.2)
@@ -269,6 +270,7 @@ PLATFORMS
269270
DEPENDENCIES
270271
agoo
271272
falcon (~> 0.47)
273+
iodine (~> 0.7)
272274
pg (~> 1.5)
273275
puma (~> 6.4)
274276
rackup

frameworks/Ruby/rails/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ comparing a variety of web platforms.
1212

1313
The tests were run with:
1414

15-
- [Ruby 3.3](http://www.ruby-lang.org/)
16-
- [Rails 7.2](http://rubyonrails.org/)
15+
- [Ruby 3.4](http://www.ruby-lang.org/)
16+
- [Rails 8.0](http://rubyonrails.org/)
1717
- [Puma 6.4](http://puma.io/)
18+
- [Iodine](https://github.com/boazsegev/iodine)
19+
- [Falcon](https://github.com/socketry/falcon)
1820
- [MySQL](https://dev.mysql.com/)
1921
- [PostgreSQL](https://www.postgresql.org/)
2022
- [Redis 6](https://redis.io)

frameworks/Ruby/rails/benchmark_config.json

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,30 @@
6666
"database_os": "Linux",
6767
"display_name": "rails-falcon",
6868
"notes": "",
69-
"versus": "rack-falcon-mri"
69+
"versus": "rack-falcon-mri-sequel-raw"
70+
},
71+
"iodine": {
72+
"db_url": "/db",
73+
"json_url": "/json",
74+
"query_url": "/queries?queries=",
75+
"fortune_url": "/fortunes",
76+
"update_url": "/updates?queries=",
77+
"plaintext_url": "/plaintext",
78+
"cached_query_url": "/cached?queries=",
79+
"port": 8080,
80+
"approach": "Realistic",
81+
"classification": "Fullstack",
82+
"database": "Postgres",
83+
"framework": "rails",
84+
"language": "Ruby",
85+
"orm": "Full",
86+
"platform": "Rack",
87+
"webserver": "Iodine",
88+
"os": "Linux",
89+
"database_os": "Linux",
90+
"display_name": "rails-iodine",
91+
"notes": "",
92+
"versus": "rack-iodine-mri-sequel-raw"
7093
},
7194
"agoo": {
7295
"db_url": "/db",

frameworks/Ruby/rails/rails-agoo.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ENV LD_PRELOAD=libjemalloc.so.2
1515
COPY ./Gemfile* /rails/
1616

1717
ENV BUNDLE_FORCE_RUBY_PLATFORM=true
18-
ENV BUNDLE_WITHOUT=mysql:falcon:puma
18+
ENV BUNDLE_WITH=postgresql:agoo
1919
RUN bundle install --jobs=8
2020

2121
COPY . /rails/

frameworks/Ruby/rails/rails-falcon.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ENV LD_PRELOAD=libjemalloc.so.2
1515
COPY ./Gemfile* /rails/
1616

1717
ENV BUNDLE_FORCE_RUBY_PLATFORM=true
18-
ENV BUNDLE_WITHOUT=mysql:agoo:puma
18+
ENV BUNDLE_WITH=postgresql:falcon
1919
RUN bundle install --jobs=8
2020

2121
COPY . /rails/
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM ruby:3.4
2+
3+
RUN apt-get update -yqq && apt-get install -yqq --no-install-recommends redis-server
4+
5+
EXPOSE 8080
6+
WORKDIR /rails
7+
8+
# ENV RUBY_YJIT_ENABLE=1 YJIT is enabled in config/initializers/enable_yjit.rb
9+
10+
# Use Jemalloc
11+
RUN apt-get update && \
12+
apt-get install -y --no-install-recommends libjemalloc2
13+
ENV LD_PRELOAD=libjemalloc.so.2
14+
15+
COPY ./Gemfile* /rails/
16+
17+
ENV BUNDLE_FORCE_RUBY_PLATFORM=true
18+
ENV BUNDLE_WITH=postgresql:iodine
19+
RUN bundle install --jobs=8
20+
21+
COPY . /rails/
22+
23+
ENV RAILS_ENV=production_postgresql
24+
ENV PORT=8080
25+
ENV REDIS_URL=redis://localhost:6379/0
26+
CMD service redis-server start && \
27+
bundle exec iodine

frameworks/Ruby/rails/rails-mysql.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ENV LD_PRELOAD=libjemalloc.so.2
1515
COPY ./Gemfile* /rails/
1616

1717
ENV BUNDLE_FORCE_RUBY_PLATFORM=true
18-
ENV BUNDLE_WITHOUT=postgresql:agoo:falcon
18+
ENV BUNDLE_WITH=mysql:puma
1919
RUN bundle install --jobs=8
2020

2121
COPY . /rails/

frameworks/Ruby/rails/rails.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ENV LD_PRELOAD=libjemalloc.so.2
1515
COPY ./Gemfile* /rails/
1616

1717
ENV BUNDLE_FORCE_RUBY_PLATFORM=true
18-
ENV BUNDLE_WITHOUT=mysql:agoo:falcon
18+
ENV BUNDLE_WITH=postgresql:puma
1919
RUN bundle install --jobs=8
2020

2121
COPY . /rails/

0 commit comments

Comments
 (0)