Open Social Primer

andremolnar's picture

This is my book report on information provided by Google. As such I am simply taking Google's word for most of this. At this time there is much information missing, particularly for creating OpenSocial ready services (SPI / Containers). There are also some missing (documented, but not yet implemented) features (for example OpenSocial Data APIs). And none of the high profile partners (from what I can tell) have 'turned on' their OpenSocial services or features.

Links of interest
OpenSocial API documentation
OpenSocial SPI documentation (Hosting OpenSocial apps)

What is OpenSocial all about?

Its about creating a single API that developers can use to build applications for social networking sites.
We're talking about widgets and gadgets that you can add to your profile page on a social networking site, or add to your computer desktop, or add to your mobile phone.
(e.g. a gift giving application, where you can give a digital gift to another member of your social network).

Its also about sites exposing those very same APIs to their users. What they are calling the OpenSocial Service Provider Interface or SPI. However, the documentation for this hasn't been released yet (as of Nov 2, 2007).

What does it mean for application developers?

For the application developer it means that they can write an application once and have it work on any site that supports the OpenSocail API.

What does it mean for site maintainers?

It means that if they support OpenSocial and implement the SPI, all those applications that other people are developing, can work on their site too.
In OpenSocial lingo this is called being a 'container'.

Where do these applications reside? Where do they 'run'?

These are web applications. As such they can run both at the server side (as PHP, Ruby on Rails etc. via REST) and the client side (as javascript or flash).
The OpenSocial API /SPI allows you to write applications that run either on the client side or the server side or both.

What are the core services?

People, Friends, Activities and Persistence.

People (who a person using the application is in the context of the social networking site they are logged into)

-OpenSocial API makes it easy to get at their profile information to make use of it in the application

Friends (who a person using the application has as friends in the context of the social networking they are logged into)

-OpenSocial API makes it easy to get information about those friends to make use of in the application

Activitites (what the person using the application is doing or and how to share that information with users in their social network)

-OpenSocial API makes it easy to propigate information about activities to the Friends of the current user.

Persistence - the web is a stateless environment

-OpenSocial API is made in such a way that a developer never has to build a server side application to simulate state.
They may still do so, but it is possible to create an client side application that has no server side component (besides the API service provider or Container).

Login to post comments

Do you have any early

lyricnz's picture
lyricnz - Sat, 2007-11-03 07:48

Do you have any early opinions about the role Drupal can play within this new framework? Obviously, being able to host OpenSocial applications, and implement the SPIs (once they become available) is really important. The publishing of applications (security anyone?), and perhaps implementing some server-side adapters to provide a more conventional interface for modules?


Early Plans

andremolnar's picture
andremolnar - Sat, 2007-11-03 08:57

Its hard to say at the moment. It will all depend on what the SPI docs tells us as far as providing containers.

We also have to remember that Drupal has no core concept of friends. We certainly have users, and to a certain extent we have the concept of activities (andremolnar has posted a new forum topic, andremolnar has left a comment on lyricnz's comment). So many applications installed wouldn't actually do much - unless they were reporting from activities going on in your OTHER social networking sites. And even that depends on how the OpenSocial Data API actually looks and works once it is released to the wild.

From an application perspective you could write pure client side apps for other social networking sites (e.g. a pure client side javascript app that does something silly). But of course the best apps are ones that go off and do something and return information from an external source (e.g. like say a drupal powered website). That requires services running on that drupal powered website... and that is where this ties in with the services module and Drupal's own internal Data API work.

andre


I guess that means we should

lyricnz's picture
lyricnz - Sat, 2007-11-03 12:21

I guess that means we should start with the "Drupal as Client" part of the equation, since that's the only bit we know much about yet.

How do people feel about Zend GData APIs? (PHP5 only, OSS but not GPL) http://framework.zend.com/download/gdata

vs things like http://code.google.com/p/drupal-google-api/

SimpleXML is the only sane XML-DOM support in PHP, so that's PHP5 already. The alternatives are possible, but somewhat awkward.

Are we targetting D6+ or D5?


Google Apps vs OpenSocial

stevepurkiss's picture
stevepurkiss - Sat, 2007-11-03 12:44

I'm not sure what you mean - the Zend GData APIs look like hooks into existing Google Apps whereas OpenSocial is an "Open" API for Social Networking features. Maybe I just read you wrong.

I'm using 5 so would be interested in assisting where I can on that.


From

lyricnz's picture
lyricnz - Sat, 2007-11-03 13:35

From http://code.google.com/apis/opensocial/docs/index.html

The OpenSocial API is a set of common APIs for building social applications on many websites. There are two ways to access the OpenSocial API: client-side using the JavaScript API and server-side using RESTful data APIs.

I was talking about the second case above (server-side).

OpenSocial Data APIs

The People and Friends data API allows client applications to view and update People Profiles and Friend relationships using AtomPub GData APIs with a Google data schema. Your client application can request a list of a user's Friends and query the content in an existing Profile.

That sounds like GData calls, right? To implement server-side APIs (in Drupal) that modules can use to fetch OpenSocial data (and use server-side). Of course, we should figure out what else is happening in Drupal-land, so we don't reinvent the GData wheel.

My questions were about whether we want to use the non-GPL Zend libraries, and/or SimpleXML, both of which are PHP-5 only. The Zend stuff should save us a lot of work, but... we'll reach a consensus here.


I see what you mean

stevepurkiss's picture
stevepurkiss - Sat, 2007-11-03 14:03

Thanks for pointing me in the right direction, I see what you mean now.


D6 or D5

andremolnar's picture
andremolnar - Mon, 2007-11-05 20:53

I think to start we are going to have to target D5 but be completely aware of where D6 is.

Since there will be dependencies on other modules - the D6 version would be entirely dependent on those modules being D6 ready.

With all that said, the main things that this module would do should be version agnostic.

So - if people are interested in helping with this module's development - we should be prepared to help with the modules we plan on depending on.

andre


Friends API, buddylist, and FOAF

stevepurkiss's picture
stevepurkiss - Sat, 2007-11-03 12:47

I'm presuming that the buddylist module will be an integral part of being able to interface with the friends API of OpenSocial. I'm wondering whether it would be feasible to look at the FOAF module as an intermediary in this - it's not been updated for a long while but would certainly help inject a bit more openness into the whole process.


Screencast, screenshots, and video on OpenSocial

Walt Esquivel's picture
Walt Esquivel - Sat, 2007-11-03 17:12

Screencast and helpful screenshots - http://blog.pmarca.com/2007/10/open-social-scr.html

Video - http://www.cnn.com/video/#/video/business/2007/11/02/janis.uk.google.ass...

Walt Esquivel, MBA; MA; President, Wellness Corps; Captain, USMC (Veteran)
$50 Hosting Discount Helps Projects Needing Financing


Zend Gdata vs Other

andremolnar's picture
andremolnar - Sat, 2007-11-03 17:25

Well, you have to love open source. The fact that there is already so much code that does the heavy lifting required to communicate with google is a blessing.

A review of the code for each is in order. Zend framework is OO code which is fine by me - Haven't look under the hood of the drupal-google-api.

Either way at the heart of the OpenSocial DataAPIs are the AuthSub or Client Login stuff.

Of course if you want your application to make use of other google apps - zend looks pretty complete.

As for friends - chatted a bit about this on IRC last night - we need to investigate the concept of friends and pick our dependency (buddy API?)

andre


It's going to be fun watching this develop!

Walt Esquivel's picture
Walt Esquivel - Sat, 2007-11-03 17:34

I'm not a developer but, rather, I follow developments and this whole "OpenSocial" development, IMO, is quite interesting!

I think it's going to be fun to see how things start getting played out over the coming year. Social networking is where the action currently is, with Facebook getting a valuation of $15 billion due to Microsoft having made a 1.6% investment to the tune of $240 million. Google can't afford to be left behind on social networking because it relies so heavily on advertising, and the advertising dollars are going to really shift, IMO, to social networking sites like Facebook due to the millions of eyeballs on those sites. I expect Google to invest a lot of time and money on OpenSocial.

Walt Esquivel, MBA; MA; President, Wellness Corps; Captain, USMC (Veteran)
$50 Hosting Discount Helps Projects Needing Financing


OpenSocial Slashes that valuation

metaone - Sat, 2007-11-03 19:44

Not to make it a big issue and go off the main and exciting discussion, but the mere announcement of OpenSocial which is promoted and backed by an industry heavyweight (Google) is enough to have slashed the Facebook valuation to about half, IMO.

Google's losing bid for a piece of the Facebook pie to Microsoft has spurred them into action. This Microsoft-action-inspired move puts a lot of air back in the SN space for those wanting to carve out their little piece of the pie. OpenSocial represents a great signal towards platform and social network diversity.

Smooth move on Google's part. And not that I don't appreciate Zuckerberg and Microsoft for what they and Facebook represent, but they are probably now sitting silent with mouths dropped wide open as they hear the air beginning to escape from their bubble and the over-inflated $15B Facebook valuation probably already assessing down to a more reasonable $7B as a result of Google's announcement. MS and Facebook now have the lead, but the Google Gang will move rapidly. Developers are platform agnostic as long as any prospective platform shows big promise. Not only will OpenSocial attract new developers, but it will also encourage those who currently target Facebook platform to also target OpenSocial. Where before the announcement most if not all roads led to Facebook and Facebook Platform, now the roads are free to wind in other directions. Common apps and data sharing among networks will increase familiarity and attractiveness of nearly all networks that engage OpenSocial... advertisers will take note. I suspect that instead of moving towards an IPO in a couple of years, Facebook will now look to sell to the highest bidder before the value deflates too much further, or maybe rush the IPO before the industry makes too much ado about the prospects of the Google-backed OpenSocial platform.

(On other fronts, I'm still counting on the Friendster guy to one day release the IP hounds and do his best to get a big hunk of everyone's pie.)

There's a lot to be excited about regarding OpenSocial. I feel that it increases all of our prospects.


I started experimenting with

lyricnz's picture
lyricnz - Sun, 2007-11-04 05:41

I started experimenting with Zend GData API today, and have a couple of thoughts:

  • Zend is a library that does lots of it's own include_once etc. In order to make that work properly, the Zend library either needs to be installed across all PHP on the server (like PEAR), or we need to fiddle with include_path on the fly or in .htaccess (DONE) This won't work if the server is in safe_mode or doesn't allow that override

  • it requires PHP >= 5.1.4 (18 months old) http://framework.zend.com/download/webservices/

  • it requires DOMDocument which is part of a module DOM http://www.php.net/dom which needs to be installed by the system administrator

I'm starting to think we might be setting too high a bar for compatability here. What do you think?

That being said, once those requirements are met, the Zend API is reasonably easy to use (this is general Gdata, not specifically OpenSocial yet). I haven't played with indirect authentication yet, but I can connect to the service, download my Google Calendars, etc; with no problem.


Drupal 7 to be >= php5.2

andremolnar's picture
andremolnar - Mon, 2007-11-05 17:19

Drupal 7 will be dropping support for php4 - and actually anything less than 5.2.

Lyricnz - did you have a change to try out the other Drupal/Gdata project?

The license (bsd-new) for zend framework is compatible with GPL. We'd just have to include a copyright notice if we 'stole' some of the classes to do the gdata work in anything we create.

So - we don't have to require the ENTIRE framework - we can just take what we need - and write our own bootstrap for it. (I haven't looked too deeply into the code - so I don't know what specific dependencies there may be within each class).

andre


Zend_Gdata

ryan_courtnage's picture
ryan_courtnage - Mon, 2007-11-05 17:41

I've used the excellent Ngeblog previously. It includes just the Zend_Gdata stuff, and not the entire Zend framework. A good place to start in figuring out exactly what's needed:

http://www.phpclasses.org/browse/package/3450.html


Open Social For Drupal 7

sambtaylor - Sat, 2007-11-03 22:37

I am not the best informed about what it might involve, but it would seem like a good idea to try and push for open social compatibility to be on the agenda / wish list of Drupal 7. It seems like over years Open Social could radically restructure the way the web functions, and anyone involved with Drupal should be interested in placing Drupal at the center of that. As Drupal evolves then toward version 7 and beyond, it would seem like the developers should think of gradually (or all at once) restructuring it to maximize compatibility with Open Social, don't you think? (Drupal buddy list module is basically a friends function, and all the other basic SN functions either exist or could easily be created.) I would even like to push for all elements of compatibility with Open Social to be included in Drupal CORE, albeit with many of the options initially turned off so that they don't take up bandwidth/load time unless they are needed and turned on. Given that social networking is already enormous, and that an open social networking web will increase its usage many times over and integrate it with all kinds of things we can't even imagine now, it's hard to see why anyone wouldn't want these functions to be easily available with a switch in Drupal.


As I was discussing in IRC,

lyricnz's picture
lyricnz - Sat, 2007-11-03 23:35

As I was discussing in IRC, I don't see any reason why this needs to be in core. This set of APIs will probably have dependencies on a number of other modules (buddy lists, presence, etc) and libraries (Zend framework), which would make it innappropiate for core anyway (especially given the license and size of the Zend framework).

Yes, this initiative is interesting and somewhat cool, but I don't think it's core-worthy. IMHO of course :)


Considering that OpenSocial

laura s's picture
laura s - Tue, 2007-11-06 03:37

Considering that OpenSocial is not open source, nor even open standards, but rather is an API defined by Google, I wonder why this would be anything but a contrib project. Sorry to be so blunt, but color me skeptical regarding this whole thing. And I am not alone.

http://burningbird.net/technology/thoughts-leopard-and-open-social/
http://www.scripting.com/stories/2007/10/31/aBitAboutOpenSocial.html
http://www.scripting.com/stories/2007/11/03/russellBeattieAsksObviousQ.html
http://techdirt.com/articles/20071101/130111.shtml
http://burningbird.net/technology/terms/
http://dannyayers.com/2007/11/02/open-social-web

We'll work with any API if it's required for the project, but no matter how you interpret the GPL, it's a pretty big challenge to make the case that this is a candidate for Drupal core in any form. Maybe if Google were to GPL the entire thing....

But somehow I don't think that's in the do-no-evil business plan.

Laura
pingVision, LLC


Certainly not for core

andremolnar's picture
andremolnar - Tue, 2007-11-06 05:48

I think we're all pretty clear on this point - this would never be for core.

The only thing that might be a candidate is some core support functions to make the concept of friends more 'standard'.

As for the OPENness of open social: If we write a container app for drupal - it will be open source. If we write applications that use Drupal to provide the web service to populate them - those are open source too.

I think there is going to be a lot of FUD here. Google's the new Microsoft in some people's eyes. We just need to stick to the facts.

Fact is, right now there isn't enough information to judge how open open social will be.

andre


FUD FUD

laura s's picture
laura s - Tue, 2007-11-06 15:14

One person's FUD is another person's distaste of kool-ade. ;)

Laura
pingVision, LLC


If Open Social turns out tto

sambtaylor - Tue, 2007-11-06 06:49

If Open Social turns out tto not be that open, it begs the issue, perhaps already being discussed somewhere here, of whether someone shouldn't create a truly open universal social networking framework that can become the standard and blow all of these proprietary systems out of the water. Is this happening already?


There's some work done here,

catch's picture
catch - Tue, 2007-11-06 17:00

There's some work done here, but doesn't look like it's very far along: http://appleseed.sourceforge.net/


OpenMusic

christopher_skauss's picture
christopher_skauss - Wed, 2007-11-07 12:57

I'm trying to build a Drupal installation profile for music-oriented social communites that interconnect and share information (music charts, profile, friends, logins etc), which I call OpenMusic (sounds a lot like OpenSocial, google must have been spying on me ;) ). Truth is, I am a little stuck at the implementation...

In general, I believe a "social community" installation profile for Drupal would create mass hysteria, especially if the derivative communities connect to each other to comprise a big, opensource universal social network that would have the potential to, to use your words, become the standard and blow all of these proprietary systems out of the water.

And to return to the topic, OpenMusic will definitely support OpenSocial!

more info at groups.drupal.org/openmusic


Container Preparation - out in the open

andremolnar's picture
andremolnar - Tue, 2007-11-06 22:51

There is a discussion going on in the open social container developer's group:

Paul Linder of Hi5 is saying that they will Open Source their container implementation
http://groups.google.com/group/opensocial-container/browse_thread/thread...

That thread also has some tips on preparing for what your container might look like.

This thread has some info on rails development based on Paul's notes.
http://groups.google.com/group/opensocial-container/browse_thread/thread...

Starting to look more open ;-)

andre


There is a BIG difference b/w an exposed api and an

bonobo's picture
bonobo - Wed, 2007-11-07 16:51

There is a BIG difference b/w an exposed api and an open standard and open source code -- all three are very different. Microsoft exposes APIs, but they ain't much in the open source business (unless making veiled threats of a vague lawsuit counts as participation in the open source community ;) ).

This is why, personally, I'm tracking developments like Facebook's API and OpenSocial, but I'm not particularly excited -- they are good to know about, as they indicate a model that the reasonably smart company recognizes as inevitable: people don't want to be tied to one platform. They want to go where they want, when they want.

The Facebook API/OpenSocial (hereinafter referred to as FOpenSocial, pronounced faux-pen social) suffer from the same inherent flaw: they rely on the generosity of a source over which we have no control. Don't get me wrong; I love google, and use their applications when they are a good fit. But, they are a profit generating venture, and their decisions, at some point, will need to lead to profit. And, as we have seen before, they will change their api/terms when they need/want to --

As others in the post indicate, the other option is to develop a social networking framework based on open standards, running on open source code. There is work done in this area (OpenID, attribute exchange, foaf, rss, etc) that make identity and content easily transferrable, and user controlled.

And this could perhaps be the biggest legacy of FOpenSocial: siphoning developer talent away from true open source initiatives toward developing for the FOpenSocial APIs -- because, every hour spent writing code hitting these apis is time that could also be spent developing an open source solution. At a certain point, it raises the question: do we want to eat the scraps offered us (in the form of an API controlled by an external source), or do we want to cook for ourselves?

Personally, I prefer home cooking :)

Cheers,

Bill

FunnyMonkey
Tools for Teachers


big meal

moshe weitzman's picture
moshe weitzman - Wed, 2007-11-07 17:43

i really appreciate the purity of your motivations. unfortunately, what you want is such a massive endeavour that it is effectively impossible. just getting the small pieces in place takes years if you ever succeed. openID is doing well, but FOAF isn't. microformats are doing ok but jabber is not growing. and so on. there are many pieces to this puzzle.

finishing this meal is about as likely as solving world hunger. my .02.


yeah. I know. *sigh*

bonobo's picture
bonobo - Wed, 2007-11-07 19:22

FOAF is dead, and has been for a while. RIP.

The point is less about a specific standard than it is about creating a system that is powered by open standards running on open source code.

RE: "finishing this meal is about as likely as solving world hunger. my .02." -- yeah, agreed here too. But you can only hit what you aim at.

And OpenSocial will have traction, and that's okay. Google didn't get to be Google by accident; they release good, innovative things, and we all have benefited.

But I also think that if we allow our imagination to be circumscribed by the offerings of a large company, we are selling ourselves short -- and I'm not saying/implying that anyone in this thread is doing that, but merely pointing out that the attractiveness of a newer/better mousetrap can be a distraction -- we need to have a certain amount of wariness wrt the Next Great Thing (tm), as they tend to come around every few months, and we can spend all our time chasing that rather than following our own instincts.

Cheers,

Bill

FunnyMonkey
Tools for Teachers


Hi5 releases what they know

andremolnar's picture
andremolnar - Thu, 2007-11-08 17:38

Just an update:
hi5 OpenSocial Developer Sandbox
Its pretty interesting how 'real' these guys are - being very transparent about what's working what isn't and what's making them a bit crazy.

And Hi5's promise to open source their container - they've opened a project but its empty at the moment - I guess we can check back later:
Hi5's OpenSocial container code


Open Social with Open ID?

andremolnar's picture
andremolnar - Thu, 2007-11-08 17:52

This is from the development group mailing list - Paul Lindner again

"Taking a gamble here. We want to implement OAuth/OpenID, period. So
hopefully providing such an implementation can move the standard in
the right direction. Remember the adage "Rough consensus and working code"

the thread with all this


So, people, lots of talk -

lyricnz's picture
lyricnz - Thu, 2007-11-08 23:00

So, people, lots of talk - but nothing concrete yet. Myself, I've been experimenting with the Zend Gdata API, and that's working fine, but we should get together and figure out what should be in this module, and what should be elsewhere. Plus the issue of platform compatability (Zend library, PHP versions, etc) isn't clear to me.

There's still, as far as I've seen, no information on what Dupal needs to implement to be an Open Social container, rather than just a restful client.

I've started a wiki page - we should probably brainstorm into there, rather than filling this thread.

http://groups.drupal.org/node/7009


First Official Bit of OpenSocial Container / SPI News

andremolnar's picture
andremolnar - Sat, 2007-11-10 09:45

Google posted it on the open social developer blog.
Read all about it there.

http://opensocialapis.blogspot.com/2007/11/early-container-sample-availa...

andre