Social	  Media	  Programming	  	                         Khanderao	  Kand	  	                                     CTO	    ...
Khanderao	  Kand	    CTO	  of	  Glomantra	  and	  myBantu	  in	  Silicon	  Valley,	  CA,	  USA	        AI	  based	  Releva...
Agenda	    Business	  Case:	  Social	  Media	  for	  Businesses	    Social	  Media	  Apps:	  Social	  CRM	  and	  Social	 ...
Data	  Point	  	  1	  
Data	  Point	  2:	  Facebook	  Crossed	                    Google	  
Explosion	  of	  Social	  Media	  Valuation	                         	      Social	  Media	  Valuations	           Faceboo...
Revenues	  and	  Valuations	    Revenues	        Facebook	  2010	  (6th	  year)	  $2	  billion	        Zynga	  	  	  2010(...
Future	    Gartner	  predicts	  40%	  of	  fortune	  1000	  would	  use	  Social	    Media	  Apps	  in	  2012-­‐13	  
Big	  Brands	  on	  Facebook	    JC	  Penny	       We	  go	  where	  customers	  are	    GNC	       You	  do	  not	  need	...
How	  does	  your	  Social	  relationship	                 work	  on	  SMNs?	    Facebook	  has	  brought	  your	  social	...
Usages	  of	  consumers	  social	  behavior	                     on	  businesses….	             Consumers	  get	  informat...
Social	  CRM	  frenzy…	  Recent	  Activities	  ……	     Radian6	  got	  acquired	  by	  Salesforce	  at	  $350	  million	  ...
Social	  Media	  Business	  Apps	  	  
Types	  of	  Social	  Media	  Business	  Apps	    Business	  Apps	  on	  Social	  Media	    Enabling	  Social	  Media	  Wi...
CRM	  /	  Commerce	  Use	  Cases	  for	    businesses	  for	  using	  Social	  Media	  …	    Ability	  to	  quickly	  spre...
IBM’s	  Social	  Commerce	  Initiative	    IBM’s	  “Smart	  Commerce”	  initiative	  started	  with	  $2.5	  billion	    a...
Social	  CRM	  Architecture	                                                                   OAuth	                     ...
Infograph	  of	  F-­‐Commerce	  
Facebook	  Widgets	  
IBM	  Smart	  Commerce	  WebSphere	  Platform	                Social	  Commerce	                                          ...
gloMantra	  MyBantu	  Social	  Commerce	                            Widgets	  on	  An	  Apparel	  Site	  Find	  Similar	  
Interfacing	  with	  Key	  Social	  Media	    Foundation	  Protocols	  /	  Interfaces	  	       HTTP	  	  REST	       JSON...
Foundational	  Protocols	  and	  Standards	  for	  Social	  Media	  
OAuth	    OAuth	  is	  open	  standard	  for	  Authorizing	  Access	  (typically	  data	  access	  	  /	  actions)	    Oau...
Open	  ID	    Open	  ID	  is	  open	  source	  standard	  for	  multi-­‐site	  authentication	    	  OpenId	  is	  for	  a...
REST	    Representational	  State	  Transfer	  (Roy	  Fielding’s	  paper	  for	    Architectural	  Style	  over	  HTTP)	  ...
JSON	    Javascript	  Simple	  Object	  Notation	  as	  lightweight	  data	    interchange	  format	    Lighter	  than	  X...
RSS	    Really	  Simple	  Syndication	  (originally	  RDF	  Site	  Summary)	    Started	  with	  news,	  site,	  blogs	  u...
APIs	  of	  Popular	  Social	  Media	  
Facebook	  Graph	  API	    Representing	  objects	  and	  relationships	  in	  Facebook’s	  social	    network	  	    Simp...
Facebook	  Graph	  API:	  Access	      Friends:	  https://graph.facebook...
Facebook	  Search	  using	  Graph	  API	    All	  public	  objects
Facebook:	  Publishing	  on	  Wall	  	    HTTP	  Post	    Access	  token	    curl	  -­‐F	  access_token=...	  	  https://g...
 	  	         Example	  	  	  	  	  	  	  String	  url	  =	  "h3ps://"+facebook	  ID+"/feed";	  String	...
Twitter	           Twitter	  is	  ranked	  as	  one	  of	  the	  ten-­‐most-­‐visited	  websites	           worldwide	  by...
Twitter	  Usage	    "Twitter	  Revolutions"	  and	  which	  include	  the	    2011	  Egyptian	  revolution,	  2010–2011	  ...
3rd	  party	  Twitter	  Java	  APIs	    Twitter4J	  :	  Open	  Source	  BSD	    Java-­‐Twitter	  	    Jtwitter	  :	  Open	...
Twitter	  	    Twitter	  API	  allows	  to	  	         Tweet	         Direct	  message	         Search	  	         Get	  t...
Twitter4J	  API	     Twitter4J	  	  (third	  party	  –	  open	  source)	     Access	  token	  /	  consumer	  key	  in	  tw...
Twitter	  Fire	  hose	    GNIP	  	  50%	  at	  approximately	  360K	  per	  year	       For	  analysis	  but	  not	  for	 ...
Open	  Social	  Project	  	    "For	  the	  question	  about	  Google	  plans	  to	  allow	  developers	  to	    create	  ...
Developing	  Social	  Network	  	    Apache	  Opensource	  project	  in	  incubation	      Shindig	  
Open	  Social	  Great	  initiative	  with	  huge	  promise	     A	  common	  “open	  source”	  API	  for	  social	  media	...
Google	  Social	  Graph	  API	    By	  supporting	  open	  Web	  standards	    for	  describing	  connections	  between	  ...
Google’s	  Public	  Social	  Graph	      The	  Social	  Graph	  API	  looks	  for	  two	      types	  of	  publicly	  decl...
Google+	  API	  Searching	  Public	  posts	  	  GET	  https://www.googleapis...
Spring	  Social	  	    An	  extensible	  service	  provider	  framework	  that	  greatly	  simplifies	  the	    process	  o...
Spring	  Social	  Spring	  Social	  provides	  templates	  for	               	  REST	  based	  API	  handling	  OAUth	  a...
Technologies	  for	  Building	  Applications	  on	  Social	  Media	  
Social	  Media	  Data	  Often	  Needs	                  Different	  Type	  of	  Database	     Social	  Media	  Contains:	  ...
CouchDB	                         MongoDB	  Data	  Model	          Document	  Oriented	            Document	  Oriented	  Da...
Dealing	  with	  Big	  Data	                             Cassandra	              HBase	  Type	                     Column	...
Text	  Processing	  and	  ML	    Text	  Processing	  Frameworks:	    GATE:	  General	  Architecture	  for	  Text	  Enginee...
Algorithms	  in	  Apache	  Mahout	  	      Collaborative	  Filtering	  	      User	  and	  Item	  based	  recommenders	  	...
Social	  Media	  Apps	  and	  Cloud	    Synonymous	    Most	  of	  the	  Social	  Media	  Apps	  are	  built	  for	  Cloud...
Disclaimer	  and	  Request	      1.	  The	  presentation	  though	  quotes	  examples	  of	  my	  Company	  and	  products...
Q	  &	  A	  
Java Tech & Tools | Social Media in Programming in Java | Khanderao Kand
Java Tech & Tools | Social Media in Programming in Java | Khanderao Kand
Java Tech & Tools | Social Media in Programming in Java | Khanderao Kand
Java Tech & Tools | Social Media in Programming in Java | Khanderao Kand
Upcoming SlideShare
Loading in …5

Java Tech & Tools | Social Media in Programming in Java | Khanderao Kand


Published on

2011-11-02 | 10:00 AM - 11:00 AM
With the popularity of Social media, businesses require to integrate ERP, CRM and Commerce apps with Social media for consumer monitoring, engagement, analytics, marketing, brand monitoring as well as influencing their purchases. This session covers Java tools, protocols, and frameworks for social media for Social CRM and Social Commerce. Covers: Oauth2, Social Graph, REST, JSON, Facebook & Twitter.

Published in: Technology, Business
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Java Tech & Tools | Social Media in Programming in Java | Khanderao Kand

  1. 1. Social  Media  Programming     Khanderao  Kand     CTO   GloMantra  Inc   mybantu  virtual  personalized  Assistance     @khanderao   Nov  2,  2011  at  JAX  Conference,  London  
  2. 2. Khanderao  Kand    CTO  of  Glomantra  and  myBantu  in  Silicon  Valley,  CA,  USA     AI  based  Relevance  Engine  /  recommendation  technology  with  Social  Intelligence     Mybantu  is  for  your  daily  needs    available  on  Android,  iPhone,  Facebook  and     Projects  on  Social  Commerce  and  Social  CRM    BIO:     20  years  in  Industry  (currently  AI,  SOA,  Social,  Mobile  and  Cloud  Technologies)     Lead  Oracle’s  SOA  and  BPM  Architecture     Chief  Consultanting  Architect  for  SOA  and  BPM  to  50+  architects  &  hundreds  of   developers  of  Oracle’s  next  Generation  Fusion  Apps       Lead  Architect  of  Peopletools     Architect  in  CRM,  Online  Dialog  Marketing,  OLAP  Hyperion     Participated  in  Standards  of  BPEL  and  SCA  at  OASIS     9  Patents  filled     Frequent  Speaker  in  conferences     Authored  articles  in  JDJ,  WSJ,  Cloud  Computing     Upcoming  books:  SOA  with  Java,  Social  Media  Programming  on  Java  
  3. 3. Agenda    Business  Case:  Social  Media  for  Businesses    Social  Media  Apps:  Social  CRM  and  Social  Commerce    Higher  Level  Architectures  of  S-­‐CRM    and  S-­‐ Commerce    APIs,  Frameworks  and  Tools:     Key  Technologies,  APIs  Interfacing  with  Popular  Social   media     Storage       Social  Media  Data  Processing  
  4. 4. Data  Point    1  
  5. 5. Data  Point  2:  Facebook  Crossed   Google  
  6. 6. Explosion  of  Social  Media  Valuation       Social  Media  Valuations     Facebook  65Billion,       Twitter    $7billion  (April  $4.4b  in  Jan)  ,      Groupon  $10  ?billion  Zynga  $9billion     LinkedIN  $8.5B   Is  it  a  Hype?  
  7. 7. Revenues  and  Valuations    Revenues     Facebook  2010  (6th  year)  $2  billion     Zynga      2010(3rd  year)  :  $850  million     Groupon  2010  (2nd  year)    750million     Twitter  (7th  year)  $100  million     Compare  with       Novell,  took  three  years  for  $50million.       Microsoft  crossed  the  $50  million  barrier  in  eight  years;       Oracle,  10  years.     Market  Caps:  Compare  with:       Amazon  82billion,  Google  186Billion,  eBay  $40billion,   Dell  28B,  IBM  200  billion,     Ford  56B,  GM  47B,    
  8. 8. Future    Gartner  predicts  40%  of  fortune  1000  would  use  Social   Media  Apps  in  2012-­‐13  
  9. 9. Big  Brands  on  Facebook    JC  Penny     We  go  where  customers  are    GNC     You  do  not  need  to  leave  your  favorite  site  for  doing  shopping    Gap    1-­‐800-­‐flowers    Delta  airline    Nike    Dexter    Coca-­‐cola    Starbucks    Apple  Apps  Stores  
  10. 10. How  does  your  Social  relationship   work  on  SMNs?    Facebook  has  brought  your  social  world  online  with  real   identities    Social  Media  enables  how  you  interact  with  leverage  your  social   world     For  example,  you  share  …    ,  you  ask  …    before  deciding,  you   provide  feedback,  you  express  approvals/disapprovals  and  you   learn  about  others,  learn  from  others     See  how  it  correlates  to  your  Social  Media  Activities:     Share  :                                    Photos,  Video,  News,  Thoughts,  Personal  Updates     Ask:                                                                                Get  opinions  /  get  recommendations     Feedback:                                                        Comment  FB/LinkedIn,  tweet,  Shoutouts     (Dis)  Approval:                                      Like  /  Dislike  on  anything       Observe  get  influenced  :  Follow  popular  tweets,  become  Fan  
  11. 11. Usages  of  consumers  social  behavior   on  businesses….     Consumers  get  information  about  products  and  services  from  Social   Media  Network                                                Marketing       Consumer  decide  based  to  buy  or  use  service  on  friends  and  social   buzz                                                Peer  influence  generating  sales  /  social  commerce       Consumers  buy/usage  experience  action  is  shared  and  kicks  in  virality                                                  Viral  growth  /  cross  sale       Consumers  rate,  review,  shoutout/like/dislike  influences  decisions  of   others  as  well  as  image  /  brand  of  product  /  company  /  service                                          Positive  /  negative  branding  affects  future  sales  /  revenue  
  12. 12. Social  CRM  frenzy…  Recent  Activities  ……     Radian6  got  acquired  by  Salesforce  at  $350  million     Overtone  got  acquired  by  eGain  (not  disclosed)     Google  Acquired  Y-­‐Combinator  startup  TalkBean  at $35m     BEA  founder  started  Magnet  for  Social  Media  with   15m  infusion     Many  startups  getting  funded  in  the  space  
  13. 13. Social  Media  Business  Apps    
  14. 14. Types  of  Social  Media  Business  Apps    Business  Apps  on  Social  Media    Enabling  Social  Media  Widgets  on  Business  Apps    Processing  Social  Media  Data  for  Businesses  
  15. 15. CRM  /  Commerce  Use  Cases  for   businesses  for  using  Social  Media  …    Ability  to  quickly  spread  awareness  about  product,  events,  services,  news  at   a  low  cost    (Social  Media  Marketing)    Ability  to  get  insight  of  customers  reactions,  and  views  (Social  Media   Market  Research  /    Media  Monitoring)    Monitor  Trend  (Social  Media  Market  Research  /    Media  Monitoring)    Monitor  Brand  (Social  Media  Market  Research  /    Media  Monitoring)    Ability  to  engage  customers  to  develop  loyalty  or  minimize  damage  (Social   CRM  /  Social  Media  Engagement)    Sales:  Increase  revenue  by  influencing  decisions  and  taking  transactions   where  customers  are  (Social  Commerce    )    Social  CRM  /  Marketing  :  Social  Analytics:       Better  Understanding  of    customer  and  market       Competitive  analysis    Actionable  Social  Intelligence:  Crowd  Intelligence,  New  ideas,  feature   enhancement  request  
  16. 16. IBM’s  Social  Commerce  Initiative    IBM’s  “Smart  Commerce”  initiative  started  with  $2.5  billion   acquisitions:       Sterling  Commerce  (connect  online  and  offline  networks  of  suppliers  and   customers)     Unica  (customer  preferences  in  marketing  campaigns)  and       Coremetrics  (real-­‐time  analysis  of  customer  comments  and  behavior)    Goal:      New  approach  to  buying,  selling,  and  marketing.     Insight  into  how  customers  feel  about  and  use  products,  and  influence   their  &  their  social  circles’  buy  decisions    Addressable  market  $70billion  (Software,  &  services)    Deploying  1200  salesmen  and  about  1000  services  people      Launched  “Smarter  Commerce  University”  
  17. 17. Social  CRM  Architecture   OAuth   OID   Marketing   Community      Case   Campaigns   Content   Management        CRM     Marketing      Contact   Sales   Reviews   Content   Management   Case  Mgmt   Content   REST  /  RSS   JSON  /  XML      Social      Community     Monitoring     ETL   Social      BI/  DW   Manager   Relevance  /   Analytics   NLP/  AI        CRM  Agent  Sentiment,   Interest   Unstructured   Brand,   Graph   Text  Process   Marketing   Analyst                      PR    
  18. 18. Infograph  of  F-­‐Commerce  
  19. 19. Facebook  Widgets  
  20. 20. IBM  Smart  Commerce  WebSphere  Platform   Social  Commerce   Architecture   Social  Commerce  Widgets:     myBantu  (GloMantra)   getOpinion,  Like/Thrash,  Rate,   Shoutout,  Recommendation,   socialBuzz,  hotmeter     BazarVoice   Reviews,  Ratings,  BrandVoice,   BrandAnswers,  Ask&Answer     Pluck:   Popular  Contents,  Comments,   myBantu   Active  Users,   Recommendation,      
  21. 21. gloMantra  MyBantu  Social  Commerce   Widgets  on  An  Apparel  Site  Find  Similar  
  22. 22. Interfacing  with  Key  Social  Media    Foundation  Protocols  /  Interfaces       HTTP    REST     JSON  XML     RSS     Oauth       OpenId    Social  Media  APIs  and  Interfaces     Open  Social     Facebook  API:  Graph  API  and  Open  Graph  1  and  2     Twitter  API     Google+     Social  Graph  from  Google    Processing  Technologies     Hadoop,  NOSQL,  GraphDB     Unstructured  Processing  /  Text  Processing  /  Text  Analytics     NLP,  Machine  Learning  
  23. 23. Foundational  Protocols  and  Standards  for  Social  Media  
  24. 24. OAuth    OAuth  is  open  standard  for  Authorizing  Access  (typically  data  access    /  actions)    Oauth  hands  over  access  token  and  not  user  credentials    Oauth  is  essential  to  developing  social-­‐ready  applications    OAuth  protocol  (Dance)  involves  series  of  3  party  (consumer  browser,  Service  provider  –   Social  media  Site  and  App).      OAuth,  including  Twitter,  Facebook,  LinkedIn,  TripIt,  and  Foursquare,  as  well  as  the  Google   and  Yahoo  APIs.    Different  SM  supports  either  Oauth  1.0  and  Oauth  2.0      Visit  :    APIs:  Jersery  (JAX-­‐RS),  Spring  Security  API,  Googlecode,    
  25. 25. Open  ID    Open  ID  is  open  source  standard  for  multi-­‐site  authentication     OpenId  is  for  authentication  as  against  Oauth    No  need  of  adhoc  and  site  specific  authentication    Oauth  and  OpenID  can  coexist    Open  ID  providers  :  think  of  Google  login    Providers  pass  ID  attributes  to  the  relying  party  (app)    However,  Oauth  is  more  popular  and  common  in  Social  Media   interfaces    Visit    Java  API:  openid4java,  GAE  supports,    
  26. 26. REST    Representational  State  Transfer  (Roy  Fielding’s  paper  for   Architectural  Style  over  HTTP)    Basic  GET,  PUT,  POST,  DELETE  operations  on  a  resource    Internet  world  REST  is  currently  winning    Google,  Yahoo,  Facebook,  etc  etc.    Java:  Jersey  (JAX-­‐RS),  Restlet,  RestFul  Services,  JAX-­‐WS  
  27. 27. JSON    Javascript  Simple  Object  Notation  as  lightweight  data   interchange  format    Lighter  than  XML    Can  be  manipulated  on  browsers    No  need  for  parsing  into  DOM    Java  API:    GSON,  Jackson,  JSONLib,  FlexJSON    XML  to/from  JSON  conversion:  JSONLib  
  28. 28. RSS    Really  Simple  Syndication  (originally  RDF  Site  Summary)    Started  with  news,  site,  blogs  update    Simple  and  lightweight    Popular  Readers:  Google  Reader,  Feedly  etc      Java  API:  ROME,  Simple  XML  parsing  
  29. 29. APIs  of  Popular  Social  Media  
  30. 30. Facebook  Graph  API    Representing  objects  and  relationships  in  Facebook’s  social   network      Simple,  consistent  and  REST  style  representation    Objects:  People,  events,  pages,  and  photos     People:     Events:     Groups:     Pages:     Applications:     Photo  Albums:    Access  API:  
  31. 31. Facebook  Graph  API:  Access    Friends:    News  feed:    Profile  feed  (Wall):    Likes:    Movies:    Music:    Books:    Notes:    Permissions:    Photo  Tags:    Photo  Albums:    Video  Tags:    Video  Uploads:    Events:    Groups:    Checkins:…  
  32. 32. Facebook  Search  using  Graph  API    All  public  objects      All  public  posts:    People:    Pages:    Events:    Groups:    Places: q=coffee&type=place&center=37.76,122.427&distance=1000    Checkins:  
  33. 33. Facebook:  Publishing  on  Wall      HTTP  Post    Access  token    curl  -­‐F  access_token=... 313449204401/likes    
  34. 34.       Example              String  url  =  "h3ps://"+facebook  ID+"/feed";  String  data  =  URLEncoder.encode("access_token",  "UTF-­‐8")  +  "="  +  URLEncoder.encode( ACCESS  TOKEN  STRING ,  "UTF-­‐8");    data  +=  "&"  +  URLEncoder.encode("message",  "UTF-­‐8")  +  "="  +  URLEncoder.encode( wallMessageText ,  "UTF-­‐8");    data  +=  "&"  +  URLEncoder.encode("picture",  "UTF-­‐8")  +  "="  +  URLEncoder.encode( IMAGE  URL ,  "UTF-­‐8");    data  +=  "&"  +  URLEncoder.encode("name",  "UTF-­‐8")  +  "="  +  URLEncoder.encode( POST  TITLE    STRING ,  "UTF-­‐8");        data  +=  "&"  +  URLEncoder.encode("capOon",  "UTF-­‐8")  +  "="  +  URLEncoder.encode( CAPTION  STRING ,  "UTF-­‐8");    data  +=  "&"  +  URLEncoder.encode("descripOon",  "UTF-­‐8")  +  "="  +  URLEncoder.encode( DESCRIPTION ,  "UTF-­‐8");    data  +=  "&"  +  URLEncoder.encode("acOons",  "UTF-­‐8")  +  "="  +  URLEncoder.encode("{"name":   acOon_name",  "link":    h3p://  url1"}",  "UTF-­‐8");    data  +=  "&"  +  URLEncoder.encode("link",  "UTF-­‐8")  +  "="  +  URLEncoder.encode( LINK  URL ,  "UTF-­‐8");    //  ConstrucNng  acNon  links  JSONObject  obj  =  new  JSONObject();  LinkedHashMap<String,  Object>  m1  =  new  LinkedHashMap<String,  Object>();  m1.put("text , LINK1  TEXT );  m1.put("href",   h3p://  acNon  url1 );  obj.put( LINK1    LABEL ,  m1);      
  35. 35. SAMPLE  POST  ON  YOUR  WALL  
  36. 36. Twitter     Twitter  is  ranked  as  one  of  the  ten-­‐most-­‐visited  websites   worldwide  by  Alexas  web  traffic  analysis.     March  2010  10  billionth  tweet     Twitter  has  a  user  retention  rate  of  forty  percent.       Value:  Conversational  30%,  Pointless  Babble  30%,  Promotion  8%,   News  8%,  news  7-­‐8%    and  spam     Good  source:  news  validation,  trend,  topic  updates  
  37. 37. Twitter  Usage    "Twitter  Revolutions"  and  which  include  the   2011  Egyptian  revolution,  2010–2011  Tunisian  protests,   2009–2010  Iranian  election  protests,  and  2009  Moldova  civil  unrest    Twitter  is  also  increasingly  used  for  making  TV  more  interactive  and   social    Most  of  the  celebrities  are  on  Twitter    President  Obama  and  many  others  effectively  used  Twitter  for   campaigning    Twitter  has  become  a  great  source  for  latest  news      Twitter  is  an  indicator  for  buzz  around  latest  topics  and  trends    Brands  are  using  twitters  for  promotions  of  products  and  spreading   deals  
  38. 38. 3rd  party  Twitter  Java  APIs    Twitter4J  :  Open  Source  BSD    Java-­‐Twitter      Jtwitter  :  Open  Source      Twitter  Client      Streaming  API  
  39. 39. Twitter      Twitter  API  allows  to       Tweet     Direct  message     Search       Get  tweets  
  40. 40. Twitter4J  API     Twitter4J    (third  party  –  open  source)     Access  token  /  consumer  key  in  Twitter  twitter  =  new  TwitterFactory().getInstance();  Query  query  =  new  Query(”mybantu");  QueryResult  result  =;  //  uodate  status    Status  status  =  twitter.updateStatus(latestStatus);  
  41. 41. Twitter  Fire  hose    GNIP    50%  at  approximately  360K  per  year     For  analysis  but  not  for  resale  or  display  tweets    Spritzer  2%  random  for  free  
  42. 42. Open  Social  Project      "For  the  question  about  Google  plans  to  allow  developers  to   create  Google+  apps  deploying  the  OpenSocial  APIs,  a   spokeswoman  of  Google  said  that  by  means  of  email  nowadays   the  Google+  platform  can’t  support  the  OpenSocial  APIs.    She  also  added  that  nevertheless,  they  are  utilizing  many  of  the   technology  which  was  designed  as  part  of  OpenSocial,  along  with   the  gadget  application  packaging  model,  and  power  Google+   games  and  the  Portable  Contacts  JSON  schema.  Because  they   define  the  +Platform  APIs,  they  are  drawing  close  attention  to  the   future  tendency  of  the  OpenSocial  APIs,  as  well  as  converging   everything  possible."  
  43. 43. Developing  Social  Network      Apache  Opensource  project  in  incubation     Shindig  
  44. 44. Open  Social  Great  initiative  with  huge  promise     A  common  “open  source”  API  for  social  media  launched  in  2007       Early  movers  as  open  social  containers:  Google  Orkut,  hi5,  LinkedIn,   MySpace,  Netlog,  Ning,  orkut,  and  Yahoo!     Opensource  OpenSocial  Based  container  :  Apache  Shindig  Bummer…     Except  Facebook     Google+  is  not  yet  committed  to  Open  Social  
  45. 45. Google  Social  Graph  API    By  supporting  open  Web  standards   for  describing  connections  between   people,  web  sites  can  add  to  the   social  infrastructure  of  the  web    The  API  returns  web  addresses  of   public  pages  and  publicly  declared   connections  between  them.    Allows  developers  to  create  a  button   for  a  Web  site  that  would  allow  a   registered  user  to  easily  "add   friends.”    index  the  public  Web  for  Friends  of  A   Friend  (FOAF)  and  Friends  Network       
  46. 46. Google’s  Public  Social  Graph     The  Social  Graph  API  looks  for  two   types  of  publicly  declared   connections:  1.  It  looks  for  all  public  URLs  that   belong  to  you  and  are   interconnected.  This  could  be   your  blog  (a1),  your  LiveJournal   page  (a2),  and  your  Twitter   account  (a3).  2.  It  looks  for  publicly  declared   connections  between  people.   For  example,  a1  may  link  to  bs   blog  while  a1  and  c  link  to  each   other.  
  47. 47. Google+  API  Searching  Public  posts    GET[yourAPIKey]    People  Search    GET[yourAPIKey]    View  People  Interacting  with  Posts  GET{activityId}/people/resharers?key=[yourAPIKey]  GET{activityId}/people/plusoners?key=[yourAPIKey]  
  48. 48. Spring  Social      An  extensible  service  provider  framework  that  greatly  simplifies  the   process  of  connecting  local  user  accounts  to  hosted  provider   accounts.    A  connect  controller  that  handles  the  authorization  flow  between   your  Java/Spring  web  application,  a  service  provider,  and  your  users.    Java  bindings  to  popular  service  provider  APIs  such  as  Facebook,   Twitter,  LinkedIn,  TripIt,  GitHub,  and  Gowalla.    A  sign-­‐in  controller  that  enable  users  to  authenticate  with  your   application  by  signing  through  a  service  provider.  
  49. 49. Spring  Social  Spring  Social  provides  templates  for    REST  based  API  handling  OAUth  and      providing  operations  specific  to  Social  Media       TwitterTemplate     FacebookTemplate     LinkedInTemplate     TripItTemplate­‐spring-­‐ applications/  
  50. 50. Technologies  for  Building  Applications  on  Social  Media  
  51. 51. Social  Media  Data  Often  Needs   Different  Type  of  Database     Social  Media  Contains:  Huge  Data,  Often  available  via  JSON,   XML  ,  RSS    Requires  different  type  of  DBs….       Couch  DB       MongoDB     Cassandra     Hbase     Neo4J     Hadoop  for  Big  Data  Processing  
  52. 52. CouchDB   MongoDB  Data  Model   Document  Oriented   Document  Oriented  Data  Format   JSON   BSON  Interface   REST   TCP/IP  Query   MapReduce  Java  Script   Jmap  Reduce  ava  Script  +   Query    Fault  Tolerance   Master  Master   Master  Slave  Concurrency   MVCC  (Versioning)   Updates  in  place  Performance   Comparatively  lower   Higher  
  53. 53. Dealing  with  Big  Data   Cassandra   HBase  Type   Column  DB   Colletcion-­‐  column  DB  Type     Big  Table   Big  Table  Protoco   Binary  (Thrift)   Binary  (Thrift)  HTTP/REST  Map  Reduce   Via  Hadoop   Via  Hadoop  
  54. 54. Text  Processing  and  ML    Text  Processing  Frameworks:    GATE:  General  Architecture  for  Text  Engineering  -­‐  Java  toolkit    OpenPipeline:  Open  Source  Java  software  for  crawling,  parsing,  analyzing   and  routing  documents.    UIMA:  Unstructured  Information  Management  Architecture  -­‐  Java   framework    Mallet(Machine  Learning  for  Language  Toolkit)     Doc  classification,  clustering    Apache  Mahout:  Scalable  Machine  Learning  and  Data  mining    ML:  Mahout,  LingPipe,  UIMA,  Mallet     NLP:  Apache  OpenNLP,  Gate,  LingPipe,  Stanford  POS,  NLTK    Dictionary  and  entity  databases:     Wordnet,  SentiWordNet    Entity  Recoginition:  Alchemy,  Stanford  NER  
  55. 55. Algorithms  in  Apache  Mahout      Collaborative  Filtering      User  and  Item  based  recommenders      K-­‐Means,  Fuzzy  K-­‐Means  clustering      Mean  Shift  clustering      Dirichlet  process  clustering      Latent  Dirichlet  Allocation      Singular  value  decomposition      Parallel  Frequent  Pattern  mining      Complementary  Naive  Bayes  classifier      Random  forest  decision  tree  based  classifier  
  56. 56. Social  Media  Apps  and  Cloud    Synonymous    Most  of  the  Social  Media  Apps  are  built  for  Cloud  usage      Frameworks:     Amazon  AMI  (many  images  for  Java  stack)     VMWare  SpringSource  CloudFoundry     JBOSS  :  Openshift     Salesforce:  Heroku  for  Java     Oracle:  Java  MW  on  Cloud     Google  App  Engine  
  57. 57. Disclaimer  and  Request    1.  The  presentation  though  quotes  examples  of  my  Company  and  products,  the  presentation  is  based  on  my   knowledge  and  experience  and  my  company  is  not  liable.    2.  Attributed  to  most  of  the  known  source,  if  any  attribution  is  missing,  it  is  not  due  to  intention  but  might  not  have   got  the  information  of  the  original  source  or  might  be  be  negligence  in  my  due  diligence.  It  can  be  corrected  if  you   contact     3.  Feel  free  to  share  some  /  all  content  however  please  attribute  to  Khanderao  Kand    4.  Social  Media  Networks  mentioned  in  the  presentation  are  more  foe  example  but  the  approach  is  applicable  to  most   of  all  other  social  media  and  there  is  no  intention  to  promote  /  discourage  any  media    5.  User  usage  data  and  financial  numbers  are  dated  and  would  be  stale  /  outdated  over  a  period  of  time.  You  may  need   to  look  for  the  latest  data.    6.  APIs  ,  tools  and  libraries  are  third  party  and  not  from  me  /  my  company.  Though  they  are  listed  based  on  my   experience  and  knowledge,  use  them  at  your  risk.    7.  We  have  products  in  Social  Commerce,  Social  CRM,  and  recommendation.  We  also  take  projects  around  the  space   and  can  be  done  outsource  /  jointly  if  interested  in.    Contact  :    or      Twitter  @khanderao    For  original  Slide  deck  (ppt)  feel  free  to  contact.  
  58. 58. Q  &  A