You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Gabor Torok (JIRA)" <ji...@apache.org> on 2010/09/30 22:08:35 UTC

[jira] Commented: (AVRO-537) ruby: keep connection between requests to same client

    [ https://issues.apache.org/jira/browse/AVRO-537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12916632#action_12916632 ] 

Gabor Torok commented on AVRO-537:
----------------------------------

This is esp. a problem when using avro with cassandra (svn trunk). The 1.3 version of avro won't work with cassandra because of this bug. I made the following change to get it to work:

The ruby code creates a new http connection for each call to transceive. Here 
is what I changed to make it work:

gabor$ diff /usr/local/lib/ruby/gems/1.8/gems/avro-1.4.0/lib/avro/ipc.rb 
~/avro-trunk/lang/ruby/lib/avro/ipc.rb 
518d517
<   require "net/http"
525d523
<       @conn = Net::HTTP.start host, port
531c529,531
<       resp = @conn.post('/', writer.to_s, {'Content-Type' => 'avro/binary'})
---
>       resp = Net::HTTP.start(host, port) do |http|
>         http.post('/', writer.to_s, {'Content-Type' => 'avro/binary'})
>       end

Thanks!

> ruby: keep connection between requests to same client
> -----------------------------------------------------
>
>                 Key: AVRO-537
>                 URL: https://issues.apache.org/jira/browse/AVRO-537
>             Project: Avro
>          Issue Type: Bug
>          Components: ruby
>    Affects Versions: 1.3.2
>            Reporter: Jeff Hodges
>            Assignee: Jeff Hodges
>
> Currently, all ruby servers will disconnect (sort of) a client after serving one request to said client.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.