Forum: JRuby Integrating jruby with Shindig

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
snacktime (Guest)
on 2008-12-26 00:24
(Received via mailing list)
I've been researching the best way to integrate ruby into the Shindig
opensocial container, so you can run your own opensocial container and
do
all your integration using ruby.  Jruby is one option but I'm not sure
if
it's the best.    There are a few different ways I can tackle this.
Shindig
provides a number of services, and it's only the parts that retrieve
data
via rest and rpc that you need to implement on your own.   There are
basically two ways of doing it.  You can use the stubs in shindig and
write
java or php to  do direct sql queries for your data, or you can
implement
the entire rpc/rest interface yourself.   I'll probably open source
this,
and I want the end user to be able to integrate with their system using
ruby,not java or php.

So anyways I was looking to see if jruby would be a good option.
Basically
I have a java stub, so I would need to use jruby inside java.  I've read
the
wiki on how to do this using the java scripting stuff, it doesn't seem
that
difficult.  Assuming the new activerecord in rails 2.2 is really
threadsafe
I could use that.   But I'm not sure about how stable the jruby inside
java
stuff is, how well it performs, and if I can rely on activercord in this
type of setup.

The other thing I have to consider though is that if I open source it,
which
implementation would people actually want to use.  If I implement the
rcp/rest interfaces entirely in ruby, you would still need to run
shindig to
provide metadata services, but it wouldn't be something you would have
to
worry about scaling or knowing much about.  You would only need to hit
it
when developers add/delete/update their opensocial applications.  If I
use
shindig the way it was designed to work and just implement it's stubs,
then
shindig would be taking all the traffic.

Anyways, for this group my main question is about the jruby integration.
Is
the java scripting stuff the best approach?  Is activerecord the only
option
for database stuff or is there a lower level jdbc interface I could use
but
still do it all in ruby?

Chris
Charles Oliver N. (Guest)
on 2008-12-28 23:47
(Received via mailing list)
snacktime wrote:
> Anyways, for this group my main question is about the jruby
> integration.  Is the java scripting stuff the best approach?  Is
> activerecord the only option for database stuff or is there a lower
> level jdbc interface I could use but still do it all in ruby?

The Java scripting stuff is probably the best approach, and either
AR-JDBC or Sequel (another DB library for Ruby, lower-level) would be
your best bets right now (or use JDBC directly from Ruby code).

Sounds like a good application for JRuby, I hope you'll keep us updated
on your progress. And feel free to hang out in #jruby on freenode IRC.

- Charlie

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Raphaël Valyi (Guest)
on 2009-01-02 02:08
(Received via mailing list)
snacktime,

I'm very interested in that too. Actually I just discovered Google
Friend
Connect which makes it a piece of cake to turn any website into an
opensocial container, so it just re-encourage me to go OpenSocial. I'm
on
Jruby too (because I'm running some complex algorithms that can't afford
to
be as slow as Ruby), I hope to release a web2 site soon, but that's late
evening job, so...

So why would you bother with the full blown Shinding after all?
I found this I thought I would use:
http://rails.elctech.com/2007/12/17/opensocial-on-...
There are a few demo, the code seems advanced, but the official site
doesn't
seems to be really maintained actively unfortunately. Seems that last
commits are back form January 2008. See SVN here:
http://rubyforge.org/projects/opensocial/

But that was until I just discovered that plugin made by Google himself
I
think:
http://code.google.com/p/opensocial-ruby-client/

Any idea about it? Does it runs on JRuby (I can't see why it would'nt
and
I'm trying it).

I'm not sure at which rate I'll make progresses. But embracing
Openscocial
could actually leverage half of my social network work, so I hope to
give it
a nice seed up. Let's keep in touch.

And yes, JRuby is definitely the way to Ruby IMHO.

Best regards,

Raphaël Valyi.


On Sun, Dec 28, 2008 at 10:46 PM, Charles Oliver N. <
Johnny C. (Guest)
on 2009-02-02 06:06
snacktime wrote:
> Anyways, for this group my main question is about the jruby integration.
> Is
> the java scripting stuff the best approach?  Is activerecord the only
> option
> for database stuff or is there a lower level jdbc interface I could use
> but
> still do it all in ruby?

Hey Chris,

I'm facing similar questions right now. What approach did you end up
taking? Are you able to share any learnings?

Cheers,
Johnny
This topic is locked and can not be replied to.