Interested in a node.js port of Shindig?

261 views
Skip to first unread message

Jonathan Beri

unread,
May 14, 2011, 3:41:51 PM5/14/11
to opensocial...@googlegroups.com
At the OpenSocial State of the Union this week, I mentioned I've been working on a POC for a node.js implementation of Shindig. There seemed to be a lot of interest in adding node.js to the shindig arsenal, so I'd like to round up folks who might be interested in working on it. Paul already said he'd be happy to have it as part of the project.

Some ideas include:
  • NowJS for the data services (write one method for the client & server!)
  • JSDOM or Zombie.js for server-side rendering
  • start with bleeding-edge features like common container, inlined gadgets, OAuth2, etc.
Obviously, the more people on board, the better the implementation will be. It would be great if some of the folks working on the container or renderer would be jump on board.

Chime in with your thoughts, and let's get this going.

Evgeny Bogdanov

unread,
May 15, 2011, 8:24:33 AM5/15/11
to opensocial...@googlegroups.com
Hi Jonathan,

Sounds really cool! I'd be happy to help.
It's the first time I hear about Node.js but after few posts I've read,
I am ready to dive into this world!

Cheers
Evgeny

Peter Dekkers

unread,
May 15, 2011, 6:32:13 AM5/15/11
to opensocial...@googlegroups.com
Just for those interested, I though I let you know if you go to JBaron.com you can download the WidgetPortal that support already much of OpenSocial and uses Node as the underlying engine. It comes with a demo that demonstrates main capabilities. Some of them:

1. Support for multiple widgets: OpenSocial, W3C, Content, Feeds (RSS/Atom) and NetVibes (depends on external render engine).
2. Drag and drop of widgets on pages.
3. Owner/viewer based securitry model (only owner can modify pages and the widgets on the page).

Right now only Linux 32bits is supported due to some native HTML parser dependency. It re-uses the Shindig clientside Javascript libraries, the rest is developed from scratch. Certainly not 100% compliant but already many of gadgets do render correctly (see the demo) on new versions of Firefox, Chrome and Safari.

However just to warn you, the purpose of this product is not just OpenSocial support, it also tries to support other widget technologies like the W3C Widget standard. So if you interested in an OpenSocial only implementation, the WidgetPortal might have a few too many abstractions.


regards,
Peter, JBaron



--
You received this message because you are subscribed to the Google Groups "OpenSocial Community" group.
To post to this group, send email to opensocial...@googlegroups.com.
To unsubscribe from this group, send email to opensocial-commu...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/opensocial-community?hl=en.

Evgeny Bogdanov

unread,
May 16, 2011, 4:17:15 AM5/16/11
to opensocial...@googlegroups.com
Hi Peter,

sounds interesting.
Do you have an idea whether it'll run on Mac OS 10.6 ?

Best
Evgeny

Jonathan Beri

unread,
May 16, 2011, 5:10:40 PM5/16/11
to opensocial...@googlegroups.com
Very cool! I'll check it out tonight. One thing I noticed is that JBaron is licensed under LGPL 3 - not sure if that's going to be a problem if were to include it into Shindig.

Peter Dekkers

unread,
May 17, 2011, 1:45:52 AM5/17/11
to opensocial...@googlegroups.com
It is not yet running on Mac OS yet due to the native HTML parser/scanner. Planning to release the source for that scanner very soon (cleaning up a bit). It should compile on other platforms besides Linux, but that will then have to be tested.

regards,
Peter
JBaron

Mark W.

unread,
May 17, 2011, 10:13:44 AM5/17/11
to opensocial...@googlegroups.com
I was about to mention the licensing issues. @JBaron, would you be willing to contribute this as a starting point under an apache 2 license?


Peter Dekkers

unread,
May 17, 2011, 3:20:53 PM5/17/11
to opensocial...@googlegroups.com
Perhaps parts could be contributed under Apache 2, have to think about that. However when I last checked I used some other libraries that were not compatible with Apache 2. So the whole source could not be easily released under Apache 2 I think, since I couldn't use the other libraries anymore. Need some more investigation. 

If you guys are mostly only interested in the "Shinding on Node" (so basically generating of the iframe url and the iframe content) and not the portal it self with drag and drop and support for other widget technologies, it is actually not so much code. So then it would make it much easier to isolate and check if I can make that available under Apache 2 license.


regards,

Peter 
JBaron

On Tue, May 17, 2011 at 4:13 PM, Mark W. <weitze...@gmail.com> wrote:
I was about to mention the licensing issues. @JBaron, would you be willing to contribute this as a starting point under an apache 2 license?

Jonathan Beri

unread,
May 20, 2011, 4:08:20 PM5/20/11
to opensocial...@googlegroups.com
I've started work on the data services - code forthcoming. The gadget rendering piece is a total blackbox to me. Are there any good docs on the renderer piece or any folks who can give me the 411?

Scott Wilson

unread,
May 21, 2011, 5:02:49 AM5/21/11
to OpenSocial Community
Another piece you can use is the Wave Gadget API implementation in
node.js:

https://github.com/scottbw/wave-node

(Actually, that should work quite nicely with WidgetPortal too...)

Evgeny Bogdanov

unread,
May 25, 2011, 6:53:38 AM5/25/11
to opensocial...@googlegroups.com
Hi Jonathan,

is it possible to upload first parts of code to GitHub or smth else?
I'd like to dive into

Evgeny

Jonathan Beri

unread,
May 27, 2011, 4:15:19 PM5/27/11
to opensocial...@googlegroups.com
I'll pull something together over the weekend and post it on Github.

Jonathan Beri

unread,
Jun 3, 2011, 2:35:53 AM6/3/11
to opensocial...@googlegroups.com
I did *not* get much time to work on it, but I threw something together:


I spent a lot of the time learning the ins and outs of Node.js, refactoring to do things the "Node way."

Expect more commits this weekend.

Jonathan Beri

unread,
Jun 7, 2011, 1:58:16 PM6/7/11
to opensocial...@googlegroups.com
I've been looking at how I can re-use as much of the features as-is. My idea is to create an interface that captures the ajax->json-rpc to be method calls to NowJS. NowJS creates a shared object on the server & client called "now" & I was thinking of attaching OSAPI to it. That way, when and OSAPI method gets called, it will be captured by my ajax "proxy" and passed to the server via Now. From there, its just a simple database query.

Thoughts?

Evgeny Bogdanov

unread,
Jun 9, 2011, 9:29:20 AM6/9/11
to opensocial...@googlegroups.com
I think it's cool to use NowJS. You get real-time updates for free :)

Concerning db, I suggest to give a try to node-db and to have it as in shindig,
JSON database and samples database (could be mysql for example).

Then user can just switch parameter from "JSONDB" to "MYSQL" db for production use.

I also suggest to use standard .html .css files (with ejs inside) instead of .jade, .stylus.

Evgeny Bogdanov

unread,
Jun 9, 2011, 10:28:08 AM6/9/11
to opensocial...@googlegroups.com
Another suggestion is to adapt the node code to the current Shindig structure, so that it will be easier to plug it
into shindig later. We can go in a way which is similar to current php/java scheme.
Common stuff in the root folder, then there is php and java folder. Once node.js is stable
we can add node (or nodejs) there as well.

What do you think?
Reply all
Reply to author
Forward
0 new messages