small medium large xlarge

Generic-user-small
19 Jul 2016, 21:30
Charles A. Monteiro (11 posts)

I could have sworn that I had read something that made me believe that the book covered using Jruby along with RatPack ? that drove me to purchase the book , not that theres not valuable info in there anyhow

Jruby-conf-profile-mug_pragsmall
19 Jul 2016, 21:59
Joe Kutner (86 posts)

I’m sorry for the confusion. I wrote a blog post recently on using Ratpack with JRuby, and the book was referenced. I suspect it was not clear that the content is directed more toward the Ruby libraries.

The good news is that I’m happy to help answer questions about JRuby+Ratpack. Feel free to continue the discussion here, or reach out to me on IRC, Twitter, etc.

Generic-user-small
20 Jul 2016, 15:37
Charles A. Monteiro (11 posts)

fair enough, and thanks.

frankly I’m more used to deploying with Sinatra , however the Ratpack reference I read was interesting since contrary to my first impressions of Ratpack it unlike Sinatra is from the get-go setup for async non-blocking processing. That’s what I’m interested in doing and as I said I’m used to the Sinatra semantics so any pointers to that extent would be appreciated. On the other hand I don’t mind learning new things so if you think that Ratpack is better suited for those purposes then any other references beyond your blog post are appreciated .

Generic-user-small
20 Jul 2016, 15:42
Charles A. Monteiro (11 posts)

perhaps you will point me to this: https://jkutner.github.io/2015/06/04/async-io-jruby.html :), perhaps there’s more

Generic-user-small
20 Jul 2016, 18:55
Charles A. Monteiro (11 posts)

Joe:

the following code does not seem to be working:

chain.get(“stream”) do |ctx| publisher = Streams.periodically(ctx, Duration.ofMillis(1000)) do |i| i < 10 ? i.to_s : nil end ctx.render(ResponseChunks.stringChunks(publisher)) end

the browser hangs for a bit but eventually generates the first iteration i.e. 0123456789 but then just sits there

let me know if there’s a more appropriate place for this specific type of feedback

Jruby-conf-profile-mug_pragsmall
22 Jul 2016, 19:33
Joe Kutner (86 posts)

Here’s a better post: https://blog.heroku.com/reactive_ruby_building_real_time_apps_with_jruby_and_ratpack

It as the same stream example, and I’m pretty sure that works. Let me know if you still have trouble.

We can keep discussing here. If you hit specific problems with the code, you could also create issues on Github: https://github.com/jkutner/ratpack-jruby-example/issues

I’m ok with either place.

You must be logged in to comment