Thank you all for your advice and information provided. It's clear to me now that a message based solution is a good option. I'm still unsure on which messaging framework I should start with. Actually it was Jim's screencast, which got me into thinking in the messaging solution using TorqueBox and Immutant. They look like brilliant mature tools, and might be the way to go.
My only consideration regarding TorqueBox is having to play with JRuby. In my research a stumbled upon Allen Rohner's talk, "The Good, The Bad & The Ugly (Clojure & JRuby)<http://www.infoq.com/presentations/Good-Bad-Ugly-Clojure-JRuby>", and got me thinking that this hybrid scenario can as well introduce unwanted complexity. The whole reason of using Clojure instead of pure RoR, is dodge complexity in customizing the Rails framework to my needs. What happens to the RoR database migration model, now that the backend is encharge of it? Of course Allen's case wasn't targeting a messaging scenario, but a much complex and messier Clojure-Ruby interaction, which I think isn't in my outlook. But still he pointed out many obstacles of clashing two very different paradigms. But how and what should each, the RoR frontend and Clojure backend, encapsulate. Which are the good practices in this scenarios? For instance, I was thinking in delegating to Clojure the database records manipulation, while still letting the RoR frontend, have it's independent connection to the DB in a read-only fashion, for managing session logins. Is this encapsulation violation an atrocious idea? Should all interactions be abstracted into the messaging framework? Does anyone know of any opensource project which has this kind of model? It would be very illustrative to look at how people have actually implemented it. On Monday, September 9, 2013 11:14:54 AM UTC-5, Jim Crossley wrote: > > Hi Rodrigo, > > I'm one of the developers of TorqueBox and Immutant. Your email prompted > me to re-watch a screencast [1] I made in March showing how to use them > together. I realized things have changed a little since then, so I added a > few annotations to the video highlighting the differences. Hopefully enough > to get you up and experimenting. > > As you've probably figured out, both TorqueBox and Immutant are integrated > stacks, bundling some commodity services that most non-trivial applications > need, e.g. scheduling, caching, and messaging. The intent of any integrated > platform is to relieve administration burden. But that only works for you > if the inherent choices within that stack fit the needs of your app. We > think/hope default Immutant configuration and abstractions (e.g. queues, > topics, request/respond) offers a good balance to fit a wide variety of > apps. > > If simple integration between Ruby and Clojure apps is your chief goal, I > think Immutant/TorqueBox is compelling, but I'm biased. I would definitely > recommend using some sort of messaging broker, though, i.e. don't mix > Clojure and Ruby in the same source file or project. > > Performance and security concerns are so application-specific I hate to > make any generic statements about them other than, "be fast and secure". ;-) > > But do feel free to bother us in #torquebox or #immutant on freenode with > any questions about your particular app/needs. > > Thanks, > Jim > > [1] http://immutant.org/news/2013/03/07/overlay-screencast/ > > > > On Sun, Sep 8, 2013 at 10:25 PM, rdelcueto <rdel...@gmail.com<javascript:> > > wrote: > >> Hi everyone, >> I'm about to start working on building a site for a startup company. >> >> We are a small team, and currently they've been coding the site using RoR >> (Ruby on Rails). I was thinking Clojure might be better suited for the >> task, specially because we'll need to implement a backend which is robust, >> scalable and secure, but also we'll need flexibility, which I think the RoR >> framework won't shine at all. >> >> At our team, we are two coders, non of us are proficient in Web >> Developing, and we have little experience with RoR, and I thought (I'm >> sure) maybe investing time learning Clojure will provide us with better >> tools. >> >> PROBLEM/QUESTION >> >> While searching for alternative solutions, I stumbled upon the >> Flightcaster case, we're they are using RoR to implement the site's >> frontend and Clojure for the system backend. I thought this was a very >> elegant solution, using each tool for what it's good at. Plus this way we >> can reuse what they've already implemented. >> >> I found a way to do this is by using Torquebox and Immutant, and using >> the messaging systems to communicate between Jruby and Clojure. Still I >> have no idea of how this works, and the performance and security >> implications it brings to the table. I found little information on the >> subject. >> >> I would appreciate if anyone could provide guidance, examples or >> documentation on the subject. >> >> Any reference to open source projects which use this hybrid language >> solutions on the JVM would be great to have. >> >> Is this the best way to solve the RoR interactions? Is there any other >> way? >> >> Thanks in advance and best regards, >> >> Rodrigo >> >> -- >> -- >> You received this message because you are subscribed to the Google >> Groups "Clojure" group. >> To post to this group, send email to clo...@googlegroups.com<javascript:> >> Note that posts from new members are moderated - please be patient with >> your first post. >> To unsubscribe from this group, send email to >> clojure+u...@googlegroups.com <javascript:> >> For more options, visit this group at >> http://groups.google.com/group/clojure?hl=en >> --- >> You received this message because you are subscribed to the Google Groups >> "Clojure" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to clojure+u...@googlegroups.com <javascript:>. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.