More on DRB & OpenSSL

  • Thread starter Nathaniel Talbott
  • Start date
N

Nathaniel Talbott

OK, I've tracked down my problem with DRb and OpenSSL a bit more; perhaps
someone can help me out now, as I'm quickly getting out of my league. Here
are test client and server scripts that will show the failure. To run them,
you'll need the latest DRb from ruby CVS
(http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/lib/drb) installed (and of
course the OpenSSL extension).

s.rb:

require 'drb'
require 'drb/ssl'

class Front
def small
puts "Called #small"
"Hi!"
end

def large
puts "Called #large"
"a" * 1000 * 500
end
end

url = ARGV[0] or raise "You must supply the url"
config = {
:SSLCertName => [ ["C","US"], ["O","someplace"], ["CN", "Temporary"] ],
:verbose => true
}
DRb.start_service(url, Front::new, config)
puts "Listening on #{url}"
DRb.thread.join

c.rb:

require 'drb'
require 'drb/ssl'

url = ARGV[0] or raise "You must supply the url"
DRb.start_service
front = DRbObject::new(nil, url)
puts "Connected to #{url}"
p front.small.size
p front.large.size

s.rb output:

ntalbott@proxytest:~$ ruby -vw s.rb drbssl://localhost:5777
ruby 1.8.0 (2003-08-04) [i386-linux]
.++++++++++++
....................++++++++++++
Listening on drbssl://localhost:5777
Called #small
Called #large
s.rb:23:in `join': Interrupt from s.rb:23

c.rb output:

ntalbott@proxytest:~$ ruby -vw c.rb drbssl://localhost:5777
ruby 1.8.0 (2003-08-04) [i386-linux]
Connected to drbssl://localhost:5777
3
(Hangs until server is interrupted)
500000

If there's any other information I can provide, or anything else I can do to
help debug this, please let me know. Also, if there are other places I
should ask this question, please let me know that, too.

Thanks,


Nathaniel

<:((><
 
M

Michael Garriss

Nathaniel said:
OK, I've tracked down my problem with DRb and OpenSSL a bit more; perhaps
someone can help me out now, as I'm quickly getting out of my league. Here
are test client and server scripts that will show the failure. To run them,
you'll need the latest DRb from ruby CVS
(http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/lib/drb) installed (and of
course the OpenSSL extension).

s.rb:

require 'drb'
require 'drb/ssl'

class Front
def small
puts "Called #small"
"Hi!"
end

def large
puts "Called #large"
"a" * 1000 * 500
end
end

url = ARGV[0] or raise "You must supply the url"
config = {
:SSLCertName => [ ["C","US"], ["O","someplace"], ["CN", "Temporary"] ],
:verbose => true
}
DRb.start_service(url, Front::new, config)
puts "Listening on #{url}"
DRb.thread.join

c.rb:

require 'drb'
require 'drb/ssl'

url = ARGV[0] or raise "You must supply the url"
DRb.start_service
front = DRbObject::new(nil, url)
puts "Connected to #{url}"
p front.small.size
p front.large.size

s.rb output:

ntalbott@proxytest:~$ ruby -vw s.rb drbssl://localhost:5777
ruby 1.8.0 (2003-08-04) [i386-linux]
.++++++++++++
....................++++++++++++
Listening on drbssl://localhost:5777
Called #small
Called #large
s.rb:23:in `join': Interrupt from s.rb:23

c.rb output:

ntalbott@proxytest:~$ ruby -vw c.rb drbssl://localhost:5777
ruby 1.8.0 (2003-08-04) [i386-linux]
Connected to drbssl://localhost:5777
3
(Hangs until server is interrupted)
500000

If there's any other information I can provide, or anything else I can do to
help debug this, please let me know. Also, if there are other places I
should ask this question, please let me know that, too.

Thanks,


Nathaniel

<:((><

I've noticed that there is always a strange silence on DRb questions. I
wonder how many people really use it. I love it, well, I love what I
know about it. The docs seems a little hard to come by.

Michael
 
H

Hugh Sasse Staff Elec Eng

I've noticed that there is always a strange silence on DRb questions. I
[...]
This is something we should change -- anyone want to work on an
initially wiki-based (english) documentation of dRB with me? It's

I scratched together some notes at:

http://www.eng.cse.dmu.ac.uk/~hgs/ruby/dRuby/

but I don't think I got everything right. Feel free to use this if
it is of any use at all. That's why I wrote it somewhere visible.

I've not got into SSL with this yet, I'm using SHA1's of
(nonce + passwd)s to authenticate messages at the moment.
Hugh
 
G

Gawnsoft

This is something we should change -- anyone want to work on an
initially wiki-based (english) documentation of dRB with me? It's
something I could enjoy delving deeply into, and I think that some
extensions could be useful as well.

I'd host the wiki unless someone else really cares to -- I've a server
on a dual T-1 to offer, and a DS-3 coming in October. Bandwidth and CPU
are cheap ;-)

I think this'd be a very Good Thing, especially if it the DRB homepage
referred to it.

I'm happy to be a wikignome for it.
Cheers,
Euan
Gawnsoft: http://www.gawnsoft.co.sr
Symbian/Epoc wiki: http://html.dnsalias.net:1122
Smalltalk links (harvested from comp.lang.smalltalk) http://html.dnsalias.net/gawnsoft/smalltalk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

DRb & OpenSSL... more info 0
Ruby/OpenSSL... bug? [LONG] 1
DRb and unknown_methods 2
OpenSSL/drb problem 1
DRb and xinetd / inetd 0
OpenSSL & Ruby 1.8 0
DRb Basics 19
Win32OLE + DRb - Windows = Fun 2

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,196
Latest member
ScottChare

Latest Threads

Top