Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Trendyou

775 views

Published on

  • Be the first to comment

  • Be the first to like this

Trendyou

  1. 1. FQL + DjCelery<visgean@gmail.com>
  2. 2. Use cases● Exporting messages and other data from facebook● Graphing things ● People love graphs!● →Making money!
  3. 3. Technology● Django● Postgresql● Django-social-auth● Redis● Facebook (python-for-facebook)● Rabbit-mq
  4. 4. What is FQL● SQL like facebook API● Many tables● Limitations ● 30 objects per query ● 600 queries per user per 10 minutes ● 600 * 30 = 18000 objects per 10 minutes● 1 million monthly users● SELECT thread_id, message_count,recipients FROM thread WHERE folder_id=0
  5. 5. How it works● User clicks on Login with facebook button ● Social-auth handles user creation● Signal handler creates a new celery task ● Worker downloads all the messages● User receives email when the data is ready
  6. 6. Code
  7. 7. Save messages
  8. 8. How to use it?
  9. 9. Recommendations● Use NoSQL Dbs ● Make data structures for every view!● Do not use initial fixtures with django social auth
  10. 10. Thank you● Feel free to contact me at ● visgean@gmail.com ● @visgean ● Github.com/visgean ● Source code: https://gist.github.com/fc851a2081de36a5f4fa

×