[jdev] parsing xml (xmpp) with ruby

Jonathan Dickinson jonathan.dickinson at k2.com
Fri Oct 3 07:00:37 CDT 2008


> -----Original Message-----
> From: jdev-bounces at jabber.org [mailto:jdev-bounces at jabber.org] On
> Behalf Of Eric Will
> Sent: Friday, October 03, 2008 1:49 PM
> To: Jabber/XMPP software development list
> Subject: Re: [jdev] parsing xml (xmpp) with ruby
>
> ...
>
> Like I said, I don't really know anything about threading. From what I
> understand, doing a blocking read() call in a Ruby thread is going to
> block the entire program anyway, because Ruby doesn't do "real"
> threads. The only threading I do in xmppd is with the timers, and
> those are really simple. I'm guessing it would take a lot of work to
> thread it.
>

IIRC the new Ruby runtime (2.0) has real threads. If you don't use multiple threads your server will only run on one CPU/Core. You should really take a look into it, threading is really a must know these days.

>From Wikipedia:

Ruby 2.0 aims to address some of the aforementioned problems:

* Native threads will be used instead of green threads.
* Full support for Unicode strings.

I am not sure if you can get hold of it somewhere. Also I would assume that things such as sockets would use native threads (i.e. special case), but that is a complete assumption.

>
> By the way, my JID is the same as my email.
>
> > Stephan
>
> -- Eric Will // rakaur
> _______________________________________________
> JDev mailing list
> FAQ: http://www.jabber.org/discussion-lists/jdev-faq
> Forum: http://www.jabberforum.org/forumdisplay.php?f=20
> Info: http://mail.jabber.org/mailman/listinfo/jdev
> Unsubscribe: JDev-unsubscribe at jabber.org
> _______________________________________________



More information about the JDev mailing list