ServerSide Javascript on Freebase - SF JavaScript meetup #9

  • 1,742 views
Uploaded on

Talk by Will Moffat on Acre: the Sever-Side JavaScript environment for Freebase.com

Talk by Will Moffat on Acre: the Sever-Side JavaScript environment for Freebase.com

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
1,742
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
18
Comments
0
Likes
2

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • 1) topic: people, places, films
    2) you’ve got a page about something
    3) plug into freebase to bring in related content from the web
  • CC license
    11M topics, each with a strong, stable identifier + list of keys to other web sites.
  • designed to be used in JS
  • http://www.freebase.com/app/queryeditor?q=[{%22type%22:%22/spaceflight/astronaut%22,%22name%22:null,%22/people/person/nationality%22:%22russia%22}]
  • http://www.freebase.com/app/queryeditor?q=[{%22type%22:%22/spaceflight/astronaut%22,%22name%22:null,%22/people/person/nationality%22:%22russia%22}]
  • http://www.freebase.com/app/queryeditor?q=[{%22type%22:%22/spaceflight/astronaut%22,%22name%22:null,%22/people/person/nationality%22:%22russia%22}]
  • JS powerful language, use it on both client & server.
    SSJS: write complete apps in HTML, JS & CSS.
    Rich ecosystem of widgets, libraries. Community.



    Rhino image from Paul Houle. http://www.mozilla.org/rhino/
  • 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
  • * all code is BSD licensed
    * clone to edit your own copy



    * example of acre template: show actors starring in this film
  • screencast:
    * Show google news stories from of top 3 companies in selected industry
    * gets deep into code
  • talk to me afterwards - lots of interesting topics. you can use SSJS to extend query language

Transcript

  • 1. Acre: Server-side JavaScript on Freebase.com San Francisco JavaScript Meetup #9 at CBS Interactive Will Moffat
  • 2. The Short Pitch Freebase: a topic DNS
  • 3. 11M topics - Actresses (37,079)
  • 4. Cheeses (488)
  • 5. Football Players (16,568)
  • 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. FreebaseApps.com
  • 16. Thank you! freebase.com http://www.slideshare.net/tag/freebase #freebase on freenode.net
  • 17. Keys: more examples of web ids Will Smith (Actor)
  • 18. 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
  • 19. Slicing and dicing data using MQL “Tropical storms in the 90s” [{ "type": "/meteorology/tropical_cyclone", "name" : null, "formed>=" : "1990", "a:formed<=": "2000" }]
  • 20. 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" }]