Skip to content

Commit

Permalink
restart
Browse files Browse the repository at this point in the history
tweaking tests (POSIX still fails after successful compilation)

minorities

import fixes

docs

docs

update facil.io CSTL to latest developer version + minor fixes and adjustments

update lib + fix max-age default value for backwards compatibility

`max-age` should be an integer + docs

possible fix for CI

docs
  • Loading branch information
boazsegev committed Nov 29, 2024
1 parent f755039 commit c5928ba
Show file tree
Hide file tree
Showing 152 changed files with 64,993 additions and 53,979 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/ruby.yml → .github/workflows/Windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,9 @@
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby

name: Building iodine
name: Windows CI

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
on: [push, pull_request]

permissions:
contents: read
Expand All @@ -20,23 +16,27 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby-version: ['2.3', '2.7', '3.0', '3.1', '3.2']
os: [ubuntu-latest, macos-latest] # , windows-latest
ruby-version: ['3.2', '3.3']
os: [windows-2022] # , windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Ruby # see https://github.com/ruby/setup-ruby#versioning)
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Build and Test Iodine
- name: Setup ENV
run: |
echo "CI=false" >> "$GITHUB_ENV"
- name: Install Gems
run: bundle install
- name: Compile and Install Iodine
run: |
echo CFLAGS = $CFLAGS
echo cflags = $cflags
echo HOME = $HOME
ruby -e 'puts Gem.default_dir'
bundle exec rake install
env VERBOSE=1 bundle exec rake install --trace
# env VERBOSE=1 bundle exec rspec --format documentation
# - name: Run tests
# run: bundle exec rake
42 changes: 42 additions & 0 deletions .github/workflows/posix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support documentation.
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby

name: POSIX CI

on: [push, pull_request]

permissions:
contents: read

jobs:
test:
strategy:
fail-fast: false
matrix:
ruby-version: ['3.2', '3.3']
os: [ubuntu-24.04, macos-14] # , windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Ruby # see https://github.com/ruby/setup-ruby#versioning)
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
- name: Setup ENV
run: |
echo "CI=false" >> "$GITHUB_ENV"
- name: Install Gems
run: bundle install
- name: Compile Iodine
run: |
echo CFLAGS = $CFLAGS
echo cflags = $cflags
echo HOME = $HOME
ruby -e 'puts Gem.default_dir'
bundle exec rake compile -v
# env VERBOSE=1 bundle exec rspec --format documentation
# - name: Run tests
# run: bundle exec rake
3 changes: 1 addition & 2 deletions .yardopts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@
LIMITS.md
CHANGELOG.md
LICENSE.txt
SPEC-WebSocket-Draft.md
SPEC-PubSub-Draft.md
mustache.md
45 changes: 34 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,37 @@
# Iodine

[![Gem Version](https://badge.fury.io/rb/iodine.svg)](https://badge.fury.io/rb/iodine)
[![Inline docs](http://inch-ci.org/github/boazsegev/iodine.svg?branch=master)](http://www.rubydoc.info/github/boazsegev/iodine/master/frames)

Please notice that this change log contains changes for upcoming releases as well. Please refer to the current gem version to review the current release.
Please notice that this change log contains updates for upcoming releases as well as previous releases.

Please refer to the current gem version to review the relevant changes for your release.

## Changes

#### Change log v.0.8.0.rc (2024----)

**Update**: updated to facil.io 0.8.0, using the latest version of the [facil.io C STL](https://github.com/facil-io/cstl).

**Update**: totally re-written both the C extension and the Ruby code.

**TODO**: this version is still missing Pub/Sub engines and Redis support, which will be added (hopefully) soon.

------------------------

## Total Rewrite

## Changes:
The new version is a complete rewrite, with a new architecture and a new API. Backwards compatibility was kept where possible.

All previous changes influenced the architecture of the new version.

------------------------

#### Change log v.0.7.58 (2024-04-28)

**Fix**: possible fix for compilation issues on Fedora. Credit to @garytaylor for opening issue #155.

**Fix**: possible fix for an OpenSSL certificate chain import issue that would cause certificate chains to be imported incorrectly. Credit to @dwolrdcojp for opening the facil.io repo PR #151.

#### Change log v.0.7.57 (2023-09-04)

Expand Down Expand Up @@ -142,7 +169,7 @@ Please notice that this change log contains changes for upcoming releases as wel

#### Change log v.0.7.31

**Security**: a heap-overflow vulnerability was fixed in the WebSocket parser. This attack could have been triggered remotely by a maliciously crafted message-header. Credit to Dane (4cad@silvertoque) for exposing this issue and providing a Python script demonstrating the attack.
**Security**: a heap-overflow vulnerability was fixed in the WebSocket parser. This attack could have been triggered remotely by a maliciously crafted message-header. Credit to Dane (4cad@silvertoque) for exposing this issue and providing a Python script demonstrating the attack.

It's recommended that all iodine users update to the latest version.

Expand Down Expand Up @@ -208,7 +235,7 @@ It's recommended that all iodine users update to the latest version.

#### Change log v.0.7.20

**Security**: (`fio`) lower and smarter Slowloris detection limits (backlog limit is now 1,024 responses / messages per client).
**Security**: (`fio`) lower and smarter Slowloris detection limits (backlog limit is now 1,024 responses / messages per client).

**Security**: (`http`) HTTP/1.1 slow client throttling - new requests will not be consumed until pending responses were sent. Since HTTP/1.1 is a response-request protocol, this protocol specific approach should protect the HTTP application against slow clients.

Expand Down Expand Up @@ -392,15 +419,14 @@ It's recommended that all iodine users update to the latest version.

#### Change log v.0.7.0

This version bump is performed because the internal engine changed significantly and might be considered less mature. The public API remains unbroken.
This version bump is performed because the internal engine changed significantly and might be considered less mature. The public API remains unbroken.

**Fix**: Fixed a documentation error. Credit to @Fonsan (Erik Fonselius) for PR #41.

**Feature**: (mustache) Added a bridge to facil.io's mustache template rendering engine. This isn't really a server concern, but [facil.io's C code](http://facil.io) includes this functionality anyway and it offers increased XSS protection by utilizing aggressive HTML escaping (and it's also faster than the Ruby canonical version).

**Update**: (facil.io) Updated to facil.io version 0.7.0 (edge). This could effect memory consumption behavior but otherwise shouldn't effect iodine all that much.


#### Change log v.0.6.5

**Fix**: (facil.io - logging) Fix typo in log output. Credit to @bjeanes (Bo Jeanes) for PR #39.
Expand Down Expand Up @@ -685,7 +711,7 @@ Iodine.start

**Compatibility**: (from `facil.io`) Now checks for HTTP/1.0 clients to determine connection persistence.

**Compatibility**: (from `facil.io`) Added spaces after header names (`:` => `: `), since some parsers don't seem to read the RFC.
**Compatibility**: (from `facil.io`) Added spaces after header names (`:` => `:`), since some parsers don't seem to read the RFC.

---

Expand All @@ -699,7 +725,7 @@ Iodine.start

#### Change log v.0.3.1

**Update**: Follow `facil.io`'s update for healthier thread throttling and energy consumption.
**Update**: Follow `facil.io`'s update for healthier thread throttling and energy consumption
---

#### Change log v.0.3.1
Expand Down Expand Up @@ -792,7 +818,6 @@ Iodine.start

* `bscrypt` random generator (where `dev/random` is unavailable) should now provide more entropy.


---

#### Change log v.0.2.9
Expand Down Expand Up @@ -1091,8 +1116,6 @@ Another example is that real-life deployment preferences were favored over adjus

I tested this new gem during the 0.0.x version releases, and I feel that version 0.1.0 is stable enough to work with. For instance, I left the Iodine server running all night under stress (repeatedly benchmarking it)... millions of requests later, under heavy load, a restart wasn't required and memory consumption didn't show any increase after the warmup period.



## License

The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
11 changes: 4 additions & 7 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
source 'https://rubygems.org'
# frozen_string_literal: true

group :test do
gem 'pry'
gem 'rspec'
gem 'rack'
gem 'http'
end
source "https://rubygems.org"

# Specify your gem's dependencies in iodine.gemspec
gemspec

gem "rake", "~> 13.0"
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2015-2019 Boaz Segev
Copyright (c) 2015-2023 Boaz Segev

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
41 changes: 0 additions & 41 deletions LIMITS.md

This file was deleted.

Loading

0 comments on commit c5928ba

Please sign in to comment.