JSON is one of those technologies that I learnt to spell…..well… maybe even read about a long time ago when I worked in the Enterprise Application Integration (EAI) space. In EAI, every technology even remotely associated with XML was considered important. While I don’t hear much about EAI these days (especially after nearly a decade in the networking space), I’ve always believed in the power of XML. So, when I saw this article on JSON Activity Streams, I got excited. Why? Because this new avatar of JSON is all about parsing social media traffic and making sense of it. So what this means is that the next time I go to a pub, not only will my friends (tracking me on Google Latitude or Foursquare) know about it, even the darn ADC sitting in the datacenter will!
So what is JSON Activity Streams? Well, for starts, it’s a protocol that serializes social media activity using JSON.
All your “likes”, “dislikes”, “follows”, and much more have been codified in a protocol. But there’s more. The protocol can segregate people, actions, and objects and describe them in human readable form. So, going forward, an innocent “Jake poked Mike” will not only make aunt Betty reach for her smelling salts, it might also cause your trusty ADC to do a double take because it can “understand” this “activity.”
JSON Activity Stream defines an “activity” in terms of “actors”, “verbs”, and “objects”, and “targets.” So and activity stream consists of a series of activities where an “actor” performs an action on or with an “object.” The JSON Activity Streams spec defines a fairly exhaustive metadata for describing activities. This metadata can be read by end-user software and delivered as human-readable messages to end users. Here’s a sample activity stream from the JSON Activity Streams spec. This data can be parsed by social networking applications and displayed to the end user in human-readable form.
Fig 1 – Sample Activity Stream
So how can JSON Activity Streams help ADCs? Well, I’ve made a small list of futuristic features.
Location-based global load balancing
ADCs currently use location databases. As most social networking interactions carry location information, Activity Streams can be parsed for this information. This could potentially reduce load on the ADC’s CPU thus making the ADC more efficient. What’s more, for a device like the NetScaler, this can be done instantaneously using advanced policies.
Trend-based caching anyone?
Ever thought of trend-based caching? ADCs could potentially be configured to cache content pertaining to trending topics on social networks like Twitter. An ADC can could also pre-fetch adjacencies in the social web based on a given query.
Metadata describing media can be used to arrive at compression decisions instead of parsing the HTTP header.
I can go on and on on the possibilities of this cool new protocol, but I’ll let the product managers and software developers size it up and come up with a more sensible list. As for me, I’m going back to following people on my timeline and liking people on my wall until I stumble upon something new.
Until then, ta ta!