Showing posts with label network. Show all posts
Showing posts with label network. Show all posts

Monday, March 9, 2015

How we built a Social Network for Productivity on Top of Google Docs Calendar Contacts and Reader

Editor’s note: This is a guest post by Martin Böhringer, Co-Founder and CEO of Hojoki.
-- Steve Bazyl

Honestly, we love Google’s productivity tools. Back in 2010, when I was a computer science researcher at university, I was a heavy user of Google Docs, Google Calendar, Google Contacts and Google Reader. So it was the most natural thing to put these tools to the front for integrations into our startup, Hojoki.

Hojoki integrate productivity cloud apps into one newsfeed and enables sharing and discussions on top of the feed. We’ve integrated 17 apps now and counting, so it’s safe to say that we’re API addicts. Now its Time to share with you what we learned about the Google Apps APIs!

The goal: a newsfeed

Our initial reason for building Hojoki was because of the fragmentation we experience in all of our cloud apps. And all those emails. Still, there was this feeling of “I don’t know what’s going on” in our distributed teamwork. So we decided to build something like a Google+ where streams get automatically filled by activities in the apps you use.

This leads to a comprehensive stream of everything that’s going on in your team combined with comments and microblogging. You can organize your stream into workspaces, which are basically places for discussions and collaboration with your team.

Information needs

To build this, we first need some kind of information on recent events. As we wanted to be able to aggregate similar activities and to provide a search, as well as splitting up the stream in workspaces, we also had to be able to sort events as unique objects like files, calendar entries and contacts.

Further, it’s crucial to not only know what has changed, but who did it. So providing unique identities is important for building federated feeds.

Google APIs

Google’s APIs share some basic architecture and structure, described in their Google Data Protocol. Based on that, application-specific APIs provide access to the application’s data. What we use is the following:

  • Google Docs: Google Documents List API version 3.0
  • Google Calendar: Google Calendar API v2
    Note: there is a new API v3 for Google Calendar
  • Google Contacts: Google Contacts API v2

The basic call for Google Contacts for example looks like this:

https://www.google.com/m8/feeds/contacts/default/full

This responds with a complete list of your contacts. Once we have this list all we have to do is to ask for the delta to our existing knowledge. For such use cases, Google’s APIs support query parameters as well as sorting parameters. So we can set “orderby” to “lastmodified” as well as “updated-min” to the timestamp of our last call. This way we are able to keep the traffic low and get quick results by only asking for things we might have missed.

If you want to develop using those APIs you should definitely have a look at the SDKs for them. We used the Google Docs SDK for an early prototype and loved it. Today, Hojoki uses its own generic connection handler for all our integrated systems so we don’t leverage the SDKs anymore.

Real world problems

If you’re into API development, you’ve probably already realized that our information needs don’t fit into many of the APIs out there. Most of the APIs are object centric. They can tell you what objects are included in a certain folder, but they can’t tell you which object in this folder has been changed recently. They just aren’t built with newsfeeds in mind.

Google Apps APIs support most of our information needs. Complete support of OAuth and very responsive APIs definitely make our lives easier.

However, the APIs are not built with Hojoki-like newsfeeds in mind. For example, ETags may change even if nothing happened to an object because of asynchronous processing on Google’s side (see Google’s comment on this). For us this means that, once we detect an altered ETag, in some cases we still have to check based on our existing data if there really have been relevant activities. Furthermore, we often have trouble with missing actors in our activities. For example, up to now we know when somebody changed a calendar event, but there is no way to find out who this was.

Another issue is the classification of updates. Google’s APIs tell us that something changed with an object. But to build a nice newsfeed you also want to know what exactly has been changed. So you’re looking for a verb like created, updated, shared, commented, moved or deleted. While Hojoki calls itself an aggregator for activities, technically we’re primarily an activity detector.

Final solution

You can think of Hojoki as a multi-layer platform. First of all, we try to get a complete overview on your meta-data of the connected app. In Google Docs, this means files and collections, and we retrieve URI and name as well as some additional information (not the content itself). This information fills a graph-based data storage (we use RDF, read more about it here).

At the moment, we subscribe to events in the integrated apps. If detected, they create a changeset for the existing data graph. This changeset is an activity for our newsfeed and related to the object representation. This allows us to provide a very flexible aggregation and filtering on the client side. See the following screenshot. You can filter the stream for a certain collection (“Analytics”) or only for the file history or for the Hojoki workspace where this file is added (“Hojoki Marketing”).

What’s really important in terms of such heavy API processing is to use asynchronous calls. We use the great Open Source project async-http-client for this task.

A wishlist

When I wrote that “we subscribe to events” this is a very nice euphemism for “we’re polling every 30s to see if something changed”. This is not really optimal and we’d love to change it. If Google Apps APIs would support a feed of user events modelled in a common standard like ActivityStrea.ms, combined with reliable ETags and maybe even a push API (e.g. Webhooks) this would also make life easier for lots of developers syncing their local files with Google and help to reduce traffic on both sides.


Martin Böhringer

Martin is Co-Founder and CEO of Hojoki. Hojoki integrates Google Docs, Calendar, Contacts and Reader next to other apps like Dropbox and Evernote into one newsfeed, showing changes by co-workers in one central place. Martin holds a PhD in information systems and likes to perform on stage at Tech Events.

Thursday, February 12, 2015

Apple may be planning to announce a new mobile ad network


By Ian Paul

Apple is reportedly gearing up to introduce a new mobile advertising program on Thursday as part of the companys iPhone OS 4.0 event. Ever since January, when Apple purchased Quattro Wireless, a mobile advertising platform, there has been speculation about how Apple would integrate its services. On Thursday, we may get our answer, according to Media Memos Peter Kafka.

But its unclear whether Apples ad platform would be similar to Googles AdSense program and use simple text and visual ads, or be an entirely new strategy. So if the rumors are true, and Apples iAds (or whatever the ad network will be called) are on their way, what will the new ad platform look like? And what does this mean for users?

Here are five questions that are at the top of my mind.

What does this mean for privacy?

If you have an iPhone, then Apple has a lot of information about your buying habits. Even if youve never paid money for anything from the iTunes Store, and exclusively download free iPhone applications, Apple still knows what your preferences are. With me, for example, they know I like to play games like Air Hockey and Chess, I follow Major League Baseball, and have a hardcore addiction to political news.

Thats all juicy information for targeted advertising, and with Apple running its own advertising network, thats information they can use to maximise profits. Thats not necessarily a bad thing, but any time my buying habits are being used to for targeted advertising I want to know exactly how my information is being handled. Hopefully, Apple will come out with a clear privacy policy if the rumored ad network becomes reality.

Will the ad network be Apple only?

Will Apples mobile advertising network reach across device platforms, or will this network be for Apple devices only? Kafka is guessing the new platform will reach across other mobile platforms, but I have to wonder about that. It would certainly make sense to want an advertising network to reach as many people as possible, but Apple thrives on the exclusivity of its products. So why not extend that philosophy to its ad network? If Apple ads have a level of interactivity or some other unique feature, you can bet Cupertino will try to leverage its network as an exclusive means to reach iPhone, iPod Touch, and iPad users.

Will other ads be allowed?

The other question is whether or not Apple will allow competing advertising networks to continue on existing iPhone applications, or if developers will have to switch over to Apples network. Google already has a beta program called Google AdSense for Mobile Applications that is used by iPhone app development companies like Flipside 5. Smaller ad networks like The Deck also have popped up to fill the iPhone app advertising void.

Its unlikely that Apple would get away with limiting advertising platforms on the iPhone, since that would, as Kafka points out, be "a red flag for regulators." But we wont know for sure until Apple makes its rumoured announcement.

What about those patents?

Patently Apple has uncovered two interesting patents that may shed some light on how advertising will work on Apple devices. In October, the blog uncovered a patent that would force users to watch advertising by having them interact with the ads as a test to make sure they were paying attention to the commercial. The tests could include functions like pressing a button on the screen. Thats similar to what some iPhone ads already do by requiring you to press a "continue" button. If you dont respond appropriately to the ad, your device would be shut down or impaired until you complied with the ads interactive element. It should be pointed out that this scheme is for subsidised devices only, and would not include devices for which you paid full price.

A similar patent again uncovered by Patently Apple in early March shows a scheme that would require you to watch a commercial or several commercials as part of a television episode, film, or other video. As you watch the commercials, the next segment of the video would be unlocked. This plan would make it impossible to skip ads, since you couldnt watch the next video segment until youve seen the commercials.
Do these patents reflect what Apples rumored ad network will look like? Force feeding commercials while I watch a video isnt so uncommon, and is somewhat similar to Hulu, which also stops you from skipping ads when you watch a TV show online. But Im not too thrilled about the idea of being forced to interact with regularly scheduled ads on an iPad or iPhone. Id rather pay full price.

Will "iAds" change the mobile device business?

If, and this is a big if, Apples advertising platform is similar to the first patent uncovered by Patently Apple, this could mark a significant change in the mobile device business. The idea that you could get a dirt cheap iPhone, iPad, Mac Mini, or even MacBook in return for interacting with a few ads might be very attractive to some people. It would certainly be annoying to have to listen to an ad every time you wanted to make a phone call, but maybe thats an annoyance some people could live with.

Before Google launched the Nexus One, there were also rumors about the search giant releasing an ad-supported device. That didnt happen, and Im not sure that Apple would be willing to go this route. But if Apple did try selling ad-supported devices as part of its mobile strategy that would certainly put its handsets in the hands of more people. And if it works for Apple, it wouldnt take long for competitors to follow Cupertinos lead.

What do you think? Would you sign up for a free or almost free Apple device if it meant interacting with ads?