Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-1177

IPC interoperability problems with handshake

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.7.2
    • 1.7.3
    • ruby

    Description

      I tried to get a simple echo service working using Java (client) to Ruby (server).

      The service should be called repeatedly in a loop. I tried several things, but the best result I got was that it would work once, then raising this exception on the ruby side:

      lib/ruby/gems/1.9.1/gems/avro-1.7.2/lib/avro/io.rb:46:in `byte!': undefined method `unpack' for nil:NilClass (NoMethodError)
      from lib/ruby/gems/1.9.1/gems/avro-1.7.2/lib/avro/io.rb:63:in `read_long'
      from lib/ruby/gems/1.9.1/gems/avro-1.7.2/lib/avro/io.rb:380:in `read_union'
      from lib/ruby/gems/1.9.1/gems/avro-1.7.2/lib/avro/io.rb:316:in `read_data'
      from lib/ruby/gems/1.9.1/gems/avro-1.7.2/lib/avro/io.rb:391:in `block in read_record'
      from lib/ruby/gems/1.9.1/gems/avro-1.7.2/lib/avro/io.rb:389:in `each'
      from lib/ruby/gems/1.9.1/gems/avro-1.7.2/lib/avro/io.rb:389:in `read_record'
      from lib/ruby/gems/1.9.1/gems/avro-1.7.2/lib/avro/io.rb:317:in `read_data'
      from lib/ruby/gems/1.9.1/gems/avro-1.7.2/lib/avro/io.rb:282:in `read'
      from lib/ruby/gems/1.9.1/gems/avro-1.7.2/lib/avro/ipc.rb:309:in `process_handshake'
      from lib/ruby/gems/1.9.1/gems/avro-1.7.2/lib/avro/ipc.rb:253:in `respond'
      

      On investigation, I found out that the ruby Responder expects a handshake on every request whereas the Java Requestor just sends a handshake the first time around.

      I quickly hacked up Ruby support for multiple calls on the same connection similar to what the Java code does.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            mintman Georg Franz Assign to me
            mintman Georg Franz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment