SlideShare una empresa de Scribd logo
1 de 21
Acre: Server-side JavaScript
on Freebase.com

San Francisco JavaScript Meetup #9
at CBS Interactive

Will Moffat
The Short Pitch
Freebase: a topic DNS
11M topics - Actresses (37,079)
Cheeses (488)
Football Players (16,568)
TV Programs (33,630)



                       arrested_develop
MQL: a JSON query language
“Russian cosmonauts”
MQL: a JSON query language
“Russian cosmonauts”




 [{
   "type": "/spaceflight/astronaut",
   "name": null,
   "/people/person/nationality": "russia"
 }]
MQL: a JSON query language
“Russian cosmonauts”



 http://api.freebase.com/api/service/mqlread?query=
 [{
    "type": "/spaceflight/astronaut",
    "name": null,
    "/people/person/nationality": "russia"
 }]
MQL: a JSON query language
MQL: a JSON query language
“Russian cosmonauts”
Acre: Server Side JavaScript for Freebase




         Hosted app server: freebaseapps.com
         Runs untrusted user code

         Sandboxed
           instruction counting
           memory, time quotas
Acre: for open data apps


Oauth - talk to flickr, Google, Netflix, etc

Acre Template Language

Client-side widgets: Freebase Suggest
View Source comes to web apps
FreebaseApps.com
Thank you!




           freebase.com

http://www.slideshare.net/tag/freebase

      #freebase on freenode.net
Keys: more examples of web ids


            Will Smith
             (Actor)
Keys: more examples of web ids


  /index.html?curid=154698       Will Smith
                                  (Actor)     /people/s/will_smith

      /name/nm0000226

                                              /RoleDisplay/86971

/BandsAndArtists/S/Smith,_Will

                                               /artist/Will+Smith

        willsmith.com

                                                  /WillSmith

       /artist/Will+Smith

                                              /music/Will+Smith

 /Will-Smith/e/B000APUOJC
Slicing and dicing data using MQL
“Tropical storms in the 90s”




         [{
              "type": "/meteorology/tropical_cyclone",
              "name" : null,
              "formed>=" : "1990",
              "a:formed<=": "2000"
         }]
MQL: sorting
“French actresses born pre-WWII”




         [{
           "type": "/film/actor",
           "name": null,
           "/people/person/gender": "female",
           "/people/person/date_of_birth": null,
           "/people/person/date_of_birth<=": "1939",
           "/people/person/nationality": "France",
           "sort": "/people/person/date_of_birth"
         }]

Más contenido relacionado

Similar a ServerSide Javascript on Freebase - SF JavaScript meetup #9

Similar a ServerSide Javascript on Freebase - SF JavaScript meetup #9 (8)

Vale rda presentation
Vale rda presentationVale rda presentation
Vale rda presentation
 
Bruce Damer's presentation for Larry Lessig's Cyberlaw class at Stanford (Mar...
Bruce Damer's presentation for Larry Lessig's Cyberlaw class at Stanford (Mar...Bruce Damer's presentation for Larry Lessig's Cyberlaw class at Stanford (Mar...
Bruce Damer's presentation for Larry Lessig's Cyberlaw class at Stanford (Mar...
 
yourHistory - entity linking for a personalized timeline of historic events
yourHistory - entity linking for a personalized timeline of historic eventsyourHistory - entity linking for a personalized timeline of historic events
yourHistory - entity linking for a personalized timeline of historic events
 
Index - BFFs vs GraphQL
Index - BFFs vs GraphQLIndex - BFFs vs GraphQL
Index - BFFs vs GraphQL
 
Waves'14 Open Prelims
Waves'14 Open PrelimsWaves'14 Open Prelims
Waves'14 Open Prelims
 
Bruce Damer's talk at Univ Pennsylvania on the Virtual World, its Origins and...
Bruce Damer's talk at Univ Pennsylvania on the Virtual World, its Origins and...Bruce Damer's talk at Univ Pennsylvania on the Virtual World, its Origins and...
Bruce Damer's talk at Univ Pennsylvania on the Virtual World, its Origins and...
 
Hacking data visualisations
Hacking data visualisationsHacking data visualisations
Hacking data visualisations
 
Research Animation and Animators
Research Animation and AnimatorsResearch Animation and Animators
Research Animation and Animators
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

ServerSide Javascript on Freebase - SF JavaScript meetup #9

  • 1. Acre: Server-side JavaScript on Freebase.com San Francisco JavaScript Meetup #9 at CBS Interactive Will Moffat
  • 3. 11M topics - Actresses (37,079)
  • 6. TV Programs (33,630) arrested_develop
  • 7. MQL: a JSON query language “Russian cosmonauts”
  • 8. MQL: a JSON query language “Russian cosmonauts” [{ "type": "/spaceflight/astronaut", "name": null, "/people/person/nationality": "russia" }]
  • 9. MQL: a JSON query language “Russian cosmonauts” http://api.freebase.com/api/service/mqlread?query= [{ "type": "/spaceflight/astronaut", "name": null, "/people/person/nationality": "russia" }]
  • 10. MQL: a JSON query language
  • 11. MQL: a JSON query language “Russian cosmonauts”
  • 12. Acre: Server Side JavaScript for Freebase Hosted app server: freebaseapps.com Runs untrusted user code Sandboxed instruction counting memory, time quotas
  • 13. Acre: for open data apps Oauth - talk to flickr, Google, Netflix, etc Acre Template Language Client-side widgets: Freebase Suggest
  • 14. View Source comes to web apps
  • 15.
  • 17. Thank you! freebase.com http://www.slideshare.net/tag/freebase #freebase on freenode.net
  • 18. Keys: more examples of web ids Will Smith (Actor)
  • 19. Keys: more examples of web ids /index.html?curid=154698 Will Smith (Actor) /people/s/will_smith /name/nm0000226 /RoleDisplay/86971 /BandsAndArtists/S/Smith,_Will /artist/Will+Smith willsmith.com /WillSmith /artist/Will+Smith /music/Will+Smith /Will-Smith/e/B000APUOJC
  • 20. Slicing and dicing data using MQL “Tropical storms in the 90s” [{ "type": "/meteorology/tropical_cyclone", "name" : null, "formed>=" : "1990", "a:formed<=": "2000" }]
  • 21. MQL: sorting “French actresses born pre-WWII” [{ "type": "/film/actor", "name": null, "/people/person/gender": "female", "/people/person/date_of_birth": null, "/people/person/date_of_birth<=": "1939", "/people/person/nationality": "France", "sort": "/people/person/date_of_birth" }]

Notas del editor

  1. 1) topic: people, places, films 2) you&amp;#x2019;ve got a page about something 3) plug into freebase to bring in related content from the web
  2. CC license 11M topics, each with a strong, stable identifier + list of keys to other web sites.
  3. designed to be used in JS
  4. http://www.freebase.com/app/queryeditor?q=[{%22type%22:%22/spaceflight/astronaut%22,%22name%22:null,%22/people/person/nationality%22:%22russia%22}]
  5. http://www.freebase.com/app/queryeditor?q=[{%22type%22:%22/spaceflight/astronaut%22,%22name%22:null,%22/people/person/nationality%22:%22russia%22}]
  6. http://www.freebase.com/app/queryeditor?q=[{%22type%22:%22/spaceflight/astronaut%22,%22name%22:null,%22/people/person/nationality%22:%22russia%22}]
  7. JS powerful language, use it on both client &amp; server. SSJS: write complete apps in HTML, JS &amp; CSS. Rich ecosystem of widgets, libraries. Community. Rhino image from Paul Houle. http://www.mozilla.org/rhino/
  8. put this together to get DEMO: http://solutions.apps.freebase.dev.freebaseapps.com/suggest Auto-complete: musical artists on twitter looks up their username grabs tweets
  9. * all code is BSD licensed * clone to edit your own copy * example of acre template: show actors starring in this film
  10. screencast: * Show google news stories from of top 3 companies in selected industry * gets deep into code
  11. talk to me afterwards - lots of interesting topics. you can use SSJS to extend query language