get working on JRuby
-
macournoyer
- State changed from new to hold
How many ppl are gonna use this?
I'm reluctant to do to this because it will require maintaining twice more code, in 2 languages. Mongrel already has a Java parser but we need to port all the changes to it. Plus I'm porting some parts of response writing to C. Writing extensions is already painful, writing it in 2 languages will be even more.
If you'd like to use Thin on JRuby in production +1 the ticket. I'm putting on hold until I see lots of interest.
-
Kevin Williams
I'm still trying to get Ruby allowed at work, and JRuby is probably the runtime I'd have to use. Count me a +1 vote.
EM (trunk) has a java version, Rack seems to install OK on JRuby, so I imagine the parser is the only piece not already there. It seems it wouldn't be too much work to port the Mongrel java parser.
I've started playing with this today, but MacPorts has Ragel 6.0, which has breaking changes from older versions, so the *.rl files from Mongrel don't work.
-
macournoyer
- Milestone changed from 1.0 to Future
I''m using Ragel 5.24, which I installed from source.
This is clearly doable and since the parser doesn't change that much.
But I wonder how EM performs on jruby. Anyone did some benchmarks?
-
Kevin Williams
we need EM to release for jruby before we can do anything.
-
macournoyer
- Assigned user set to Kevin Williams
- Milestone changed from Future to 1.0
- State changed from hold to open
-
macournoyer
- Tag set to java, jruby, platform
- Milestone changed from 1.0 to Waiting for EM
I red they are working on it right now
-
Kevin Williams
Yeah, finally!
-
Kevin Williams
I'm working on a java-based backend for Thin. Not sure how it's going to work out because Thin depends on EM for more than just the backend. If we can divorce Thin from EM and constrain EM to backend code, then Thin on JRuby might really rock.
-
macournoyer
Aman sent me this:
fyi, i got the java reactor working
http://github.com/tmm1/eventmach...
ran some of my EM libraries through it and it seems to work without modifications or problems
Aman
===
@kevin: Thin should not depend on EM anymore, only Backends::Base does depend on it. thin-turbo is a non-EM backend and is works fine.
-
Kevin Williams
lib/thin.rb requires EM, and lib/thin/connection.rb has the Connection class extending EventMachine::Connection. Am I not looking at the right branch or something? I admit I haven't tried running Thin on JRuby without EM installed, but I didn't think I could yet. What am I missing?
-
macournoyer
ah right, we can fix that by require all things EM in the Backends::Base, so it it's not loaded EM will not be required.
Hm, but we'll need to tweak the gem to require EM gem only on non-jruby installation.
Any better way to make EM optional?
-
Kevin Williams
Perhaps have a safe alternate backend based on webrick or mongrel? The backend selection code could try to load the EM gem and choose a different backend if not found.
That would probably mean creating an explicit EM backend, rather that putting EM stuff in Backends::Base.
-
Kevin Williams
EM for JRuby isn't formally released, so I haven't tried to do anything yet. I'm continuing to working on getting something based on Mina to work. Almost got it now, just trying to figure out Rack and plugging the two together.
-
Kevin Williams
The latest version of Mina - no, I haven't released it yet.
-
Kevin Williams
- Milestone changed from Waiting for EM to Future
Thanks for the update Aman, it did install into my JRuby 1.2.0 install on my laptop. Unfortunately, http://rubyeventmachine.com/wiki... claims it is not officially released yet.
I'll start working on it now. The first thing I have to do is get the Mongrel parser for Java into Thin and updated with the equivalent code for the ext/thin_parser/thin.c features. This is not familiar ground for me, so it might take a while.
-
Kevin Williams
I've been dabbling with my Mina (now Netty) based server for years now. I rarely have time to work on it, and when I do, it never works quite right.
Something very close to what I've been trying to build is https://github.com/matadon/mizuno which uses Jetty. Mizuno seems to work, which is more than I can say for my server. :)
Now that EventMachine does work on JRuby, perhaps very little is needed to get Thin to work, although the http-parser extension might be a problem. I'd be surprised if it were faster than something more native to Java based on Netty or Jetty, though.
I don't code in Ruby anymore, and I'm worried about the future of Java in general, so of anyone would like to take this over I'll be happy to hand over responsibility.
-
John
Κατά την ταπεινή μου γνώμη, οι άνθρωποι σε όλο τον κόσμο λατρεύουν να παίζουν σε online καζίνοΔεν υπάρχουν πολλά μεγάλα online καζίνο. Αν κοιτάξετε το καζίνο Ice Casino, θα δείτε ότι μπορεί να σας βοηθήσει να τελειώσετε μια δουλειά που μισείτε, είπε. Σύμφωνα με τις στατιστικές, αυτό το online καζίνο έχει την υψηλότερη https://icecasino-gr.com/ RTP
-
Kira
Πριν ξεκινήσετε, επιλέξτε τον αριθμό των ενεργών γραμμών και ορίστε το μέγεθος του πονταρίσματος. Το Super Hot Fruits https://superhotfruits.com/ σας επιτρέπει να προσαρμόσετε αυτές τις παραμέτρους ώστε το παιχνίδι να ταιριάζει στο στυλ σας. Ξεκινήστε με ένα μικρό ποντάρισμα για να κατανοήσετε καλύτερα τους μηχανισμούς του κουλοχέρη.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.