Skip to content

Add simple Ruby server example#17

Merged
ianmcook merged 1 commit into
apache:mainfrom
kou:http-ruby-server
Mar 13, 2024
Merged

Add simple Ruby server example#17
ianmcook merged 1 commit into
apache:mainfrom
kou:http-ruby-server

Conversation

@kou

@kou kou commented Mar 12, 2024

Copy link
Copy Markdown
Member

@ianmcook

Copy link
Copy Markdown
Member

Thanks @kou!

I tested this with all the client examples. The only problem I found was with the C GLib client:

When I run the C GLib client with this this Ruby server, the server prints this message:

::1 - - [12/Mar/2024:09:14:43 -0400] "GET / HTTP/1.1" 200 - 0.8649
[2024-03-12 09:14:44] ERROR Errno::ECONNRESET: Connection reset by peer @ io_fillbuf - fd:18 
	/opt/homebrew/lib/ruby/gems/3.3.0/gems/webrick-1.8.1/lib/webrick/httpserver.rb:82:in `eof?'
	/opt/homebrew/lib/ruby/gems/3.3.0/gems/webrick-1.8.1/lib/webrick/httpserver.rb:82:in `run'
	/opt/homebrew/lib/ruby/gems/3.3.0/gems/webrick-1.8.1/lib/webrick/server.rb:310:in `block in start_thread'

@ianmcook

Copy link
Copy Markdown
Member

Can you add a .gitignore with Gemfile.lock please?

@kou

kou commented Mar 13, 2024

Copy link
Copy Markdown
Member Author

Ah, it's happen because GLib client uses keep-alive and Ruby's HTTP server is sensitive for disconnection check of keep-alive connection.

I'll disable keep-alive of GLib client.

@kou kou force-pushed the http-ruby-server branch from 4652548 to d8c62f8 Compare March 13, 2024 06:01
@kou

kou commented Mar 13, 2024

Copy link
Copy Markdown
Member Author

I've add missing .gitignore. Good catch!

@kou

kou commented Mar 13, 2024

Copy link
Copy Markdown
Member Author

GLib client: #20

@ianmcook ianmcook left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ianmcook ianmcook merged commit d3ef5dc into apache:main Mar 13, 2024
@kou kou deleted the http-ruby-server branch March 14, 2024 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Ruby] Create simple example of Ruby HTTP GET Arrow server

2 participants