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.

Build socialsiteinruby


Published on

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

Build socialsiteinruby

  1. 1. Building Social Media Sites in Ruby
  2. 2. Who am I
  3. 3. things to coverWhat’s social world going on?Social data storage in MongoDBStreaming social data with MQOthers worthy to mention
  4. 4. TrendsFacebook, Fan PageTwitter, Promoted Topics/AccountsMedia Agency: Brand Website -> Social
  5. 5. CategoriesSocial NetworkSocial Community ManagementSocial Monitoring/Measurement
  6. 6. successradian6: twitter $1,500/M + bandwidth costiWOMcooperator: Sina weibo RMB20,000/MTweetDeckSocialBro
  7. 7. dev platforms documentations- endpoints, request and response examples- tools for developers
  8. 8. Social Dataid: "209664525731998_247270968638020"from: name: "Vanessa Tam" id: "100000116574145"to: data: - name: "The House of Dancing Water" category: "Arts/entertainment/nightlife" id: "209664525731998"message: "La=)"actions: - name: "Comment" link: "" - name: "Like" link: ""type: "status"created_time: "2011-08-17T15:02:55+0000"updated_time: "2011-08-17T15:44:36+0000"likes: data: - name: "Phoebe Lee" id: "100002673212002" count: 199comments: data: - id: "209664525731998_247270968638020_3569720" from: name: "The House of Dancing Water" category: "Arts/entertainment/nightlife" id: "209664525731998" message: "Welcome!" created_time: "2011-08-17T15:44:11+0000" - id: "209664525731998_247270968638020_3569724" from: name: "Vanessa Tam" id: "100000116574145" message: "okok" created_time: "2011-08-17T15:44:32+0000" - id: "209664525731998_247270968638020_3569725" from: name: "Vanessa Tam" id: "100000116574145" message: "=)" created_time: "2011-08-17T15:44:36+0000" count: 3
  9. 9. Why not RDBMS Scalability- Horizontally Flexibility- Scheme change
  10. 10. Comparison...Key-Value Scalibility & Performance Memcached MongoDB RDBMS Depth of Functionality
  11. 11. Intro to MongoDBSchema FreeDocument BaseHigh PerformanceJSON Style Storage: BSONDynamic Query
  12. 12. a lot of more... Flexibility:- Schema Free- Database setting: replication, secondary DB- Model: data type, collection, _id, associations- Lazy Cursor e.g. rubyconftw = RubyConf.where(:location=>“Taiwan”) #cursor created puts rubyconftw.entries #cursor executed
  13. 13. more... Capped Collection- logs, messages- fixed after being created ... ...
  14. 14. ODM MongoMapper MongoRecord Mongoid- Rails 3- Active Record Style- Ruby Driver
  15. 15. not good at...SQL-base tool (BI)High Transactional Operations
  16. 16. StreamingTwitterSina WeiboStream has...
  17. 17. Twitter Stream APIStreaming API: UserID, Keyword, geo-LocationUser Stream: User LevelSite Stream: Application Level
  18. 18. What’s wrong... Unstable Traffic- online time- irregular events Data Lost- updated response- invalid response
  19. 19. AMQP & RabbitMQAMQP: reliable safeRabbitMQ: A leading AMQP implementation
  20. 20. fit into streamingpublishing, subscriptioncool at...No worries?
  21. 21. TestingWeb AccessfakewebAPI endpoint URL & response
  22. 22. Hoptoad / Airbrakenotify you exceptions>= direct email notification
  23. 23. background workersstalkerresque: redis-basedelayed_jobs: assign different queues todifferent workers?
  24. 24. Things to checkout...MongoDB: Stream Plugins: