SlideShare uma empresa Scribd logo
1 de 24
Building Social Media
    Sites in Ruby
Who am I
things to cover


What’s social world going on?

Social data storage in MongoDB

Streaming social data with MQ

Others worthy to mention
Trends

Facebook, Fan Page

Twitter, Promoted Topics/Accounts

Media Agency: Brand Website -> Social
Categories

Social Network

Social Community Management

Social Monitoring/Measurement
success

radian6: twitter $1,500/M + bandwidth cost

iWOMcooperator: Sina weibo RMB20,000/M

TweetDeck

SocialBro
dev platforms

  graph.facebook.com

  dev.twitter.com

- documentations
- endpoints, request and response examples
- tools for developers
Social Data
id: "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: "http://www.facebook.com/209664525731998/posts/247270968638020"
   -
     name: "Like"
     link: "http://www.facebook.com/209664525731998/posts/247270968638020"
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: 199
comments:
   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
Why not RDBMS

  Scalability
- Horizontally
  Flexibility
- Scheme change
Comparison...
Key-Value
   Scalibility & Performance      Memcached        MongoDB   RDBMS




                                 Depth of Functionality
Intro to MongoDB

Schema Free

Document Base

High Performance

JSON Style Storage: BSON

Dynamic Query
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
more...


  Capped Collection

- logs, messages
- fixed after being created
  ... ...
ODM
  MongoMapper

  MongoRecord

  Mongoid

- Rails 3
- Active Record Style
- Ruby Driver
not good at...

SQL-base tool (BI)

High Transactional Operations
Streaming


Twitter

Sina Weibo

Stream has...
Twitter Stream API


Streaming API: UserID, Keyword, geo-
Location

User Stream: User Level

Site Stream: Application Level
What’s wrong...
  Unstable Traffic

- online time
- irregular events
  Data Lost

- updated response
- invalid response
AMQP & RabbitMQ
AMQP: reliable safe

RabbitMQ: A leading AMQP implementation
fit into streaming
publishing, subscription

cool at...




No worries?
Testing
Web Access

fakeweb

API endpoint URL & response
Hoptoad / Airbrake

notify you exceptions

>= direct email notification
background workers


stalker

resque: redis-base

delayed_jobs: assign different queues to
different workers?
Things to checkout...
MongoDB:http://www.mongodb.org/

Mongoid:http://mongoid.org/

EventMachine:http://rubyeventmachine.com/

Twitter Stream Plugins:
http://rubygems.org/gems/twitterstream


rabbitMQ:http://www.rabbitmq.com/getstarted.html

Hoptoad:https://github.com/thoughtbot/hoptoad_notifier

Mais conteúdo relacionado

Destaque

Actividad 5 ingles corregida
Actividad 5 ingles corregidaActividad 5 ingles corregida
Actividad 5 ingles corregidafernandoorjuela
 
Presentatie 06122016
Presentatie 06122016Presentatie 06122016
Presentatie 06122016Bert Roelofs
 
News sibfred
News sibfredNews sibfred
News sibfredsibfred
 
Welcome party power point 2
Welcome party power point 2Welcome party power point 2
Welcome party power point 2Caroline Chow
 

Destaque (8)

Status Report 4
Status Report 4Status Report 4
Status Report 4
 
Status Report 2
Status Report 2Status Report 2
Status Report 2
 
Actividad 5 ingles corregida
Actividad 5 ingles corregidaActividad 5 ingles corregida
Actividad 5 ingles corregida
 
Status Report 6
Status Report 6Status Report 6
Status Report 6
 
Presentatie 06122016
Presentatie 06122016Presentatie 06122016
Presentatie 06122016
 
News sibfred
News sibfredNews sibfred
News sibfred
 
Status Report 8
Status Report 8Status Report 8
Status Report 8
 
Welcome party power point 2
Welcome party power point 2Welcome party power point 2
Welcome party power point 2
 

Semelhante a Build socialsiteinruby

Linked opendata parisemantique.fr - 24062011
Linked opendata   parisemantique.fr - 24062011Linked opendata   parisemantique.fr - 24062011
Linked opendata parisemantique.fr - 24062011Loïc Dias Da Silva
 
Crafting Evolvable Api Responses
Crafting Evolvable Api ResponsesCrafting Evolvable Api Responses
Crafting Evolvable Api Responsesdarrelmiller71
 
SeaBeyond 2011 ProcessOne - Diana Cheng: OneSocialWeb
SeaBeyond 2011 ProcessOne - Diana Cheng: OneSocialWebSeaBeyond 2011 ProcessOne - Diana Cheng: OneSocialWeb
SeaBeyond 2011 ProcessOne - Diana Cheng: OneSocialWebProcessOne
 
A micro service story
 A micro service story A micro service story
A micro service storyStefan Adolf
 
Creating 3rd Generation Web APIs with Hydra
Creating 3rd Generation Web APIs with HydraCreating 3rd Generation Web APIs with Hydra
Creating 3rd Generation Web APIs with HydraMarkus Lanthaler
 
Linked open data sandwich
Linked open data sandwichLinked open data sandwich
Linked open data sandwichThimo Thoeye
 
No sql for sql professionals
No sql for sql professionalsNo sql for sql professionals
No sql for sql professionalsRic Centre
 
The Flash Facebook Cookbook - FlashMidlands
The Flash Facebook Cookbook - FlashMidlandsThe Flash Facebook Cookbook - FlashMidlands
The Flash Facebook Cookbook - FlashMidlandsJames Ford
 
Learn Learn how to build your mobile back-end with MongoDB
Learn Learn how to build your mobile back-end with MongoDBLearn Learn how to build your mobile back-end with MongoDB
Learn Learn how to build your mobile back-end with MongoDBMarakana Inc.
 
Build an App with Blindfold - Britt Barak
Build an App with Blindfold - Britt Barak Build an App with Blindfold - Britt Barak
Build an App with Blindfold - Britt Barak DroidConTLV
 
Back to basics: Simple database web services without the need for SOA
Back to basics: Simple database web services without the need for SOABack to basics: Simple database web services without the need for SOA
Back to basics: Simple database web services without the need for SOASage Computing Services
 
Yarochkin, kropotov, chetvertakov tracking surreptitious malware distributi...
Yarochkin, kropotov, chetvertakov   tracking surreptitious malware distributi...Yarochkin, kropotov, chetvertakov   tracking surreptitious malware distributi...
Yarochkin, kropotov, chetvertakov tracking surreptitious malware distributi...DefconRussia
 
Mongo at Sailthru (MongoNYC 2011)
Mongo at Sailthru (MongoNYC 2011)Mongo at Sailthru (MongoNYC 2011)
Mongo at Sailthru (MongoNYC 2011)ibwhite
 
What if everything is awesome? Codemotion Madrid 2014
What if everything is awesome? Codemotion Madrid 2014What if everything is awesome? Codemotion Madrid 2014
What if everything is awesome? Codemotion Madrid 2014Christian Heilmann
 
RabbitMQ + CouchDB = Awesome
RabbitMQ + CouchDB = AwesomeRabbitMQ + CouchDB = Awesome
RabbitMQ + CouchDB = AwesomeLenz Gschwendtner
 
Beyond the Basics 2: Aggregation Framework
Beyond the Basics 2: Aggregation Framework Beyond the Basics 2: Aggregation Framework
Beyond the Basics 2: Aggregation Framework MongoDB
 
Blazing Fast Analytics with MongoDB & Spark
Blazing Fast Analytics with MongoDB & SparkBlazing Fast Analytics with MongoDB & Spark
Blazing Fast Analytics with MongoDB & SparkMongoDB
 

Semelhante a Build socialsiteinruby (20)

Linked opendata parisemantique.fr - 24062011
Linked opendata   parisemantique.fr - 24062011Linked opendata   parisemantique.fr - 24062011
Linked opendata parisemantique.fr - 24062011
 
Crafting Evolvable Api Responses
Crafting Evolvable Api ResponsesCrafting Evolvable Api Responses
Crafting Evolvable Api Responses
 
SeaBeyond 2011 ProcessOne - Diana Cheng: OneSocialWeb
SeaBeyond 2011 ProcessOne - Diana Cheng: OneSocialWebSeaBeyond 2011 ProcessOne - Diana Cheng: OneSocialWeb
SeaBeyond 2011 ProcessOne - Diana Cheng: OneSocialWeb
 
A micro service story
 A micro service story A micro service story
A micro service story
 
Coalmine spie 2012 presentation - jsw -d3
Coalmine   spie 2012 presentation - jsw -d3Coalmine   spie 2012 presentation - jsw -d3
Coalmine spie 2012 presentation - jsw -d3
 
Creating 3rd Generation Web APIs with Hydra
Creating 3rd Generation Web APIs with HydraCreating 3rd Generation Web APIs with Hydra
Creating 3rd Generation Web APIs with Hydra
 
Linked open data sandwich
Linked open data sandwichLinked open data sandwich
Linked open data sandwich
 
No sql for sql professionals
No sql for sql professionalsNo sql for sql professionals
No sql for sql professionals
 
The Rise of NoSQL
The Rise of NoSQLThe Rise of NoSQL
The Rise of NoSQL
 
The Flash Facebook Cookbook - FlashMidlands
The Flash Facebook Cookbook - FlashMidlandsThe Flash Facebook Cookbook - FlashMidlands
The Flash Facebook Cookbook - FlashMidlands
 
Learn Learn how to build your mobile back-end with MongoDB
Learn Learn how to build your mobile back-end with MongoDBLearn Learn how to build your mobile back-end with MongoDB
Learn Learn how to build your mobile back-end with MongoDB
 
Build an App with Blindfold - Britt Barak
Build an App with Blindfold - Britt Barak Build an App with Blindfold - Britt Barak
Build an App with Blindfold - Britt Barak
 
Back to basics: Simple database web services without the need for SOA
Back to basics: Simple database web services without the need for SOABack to basics: Simple database web services without the need for SOA
Back to basics: Simple database web services without the need for SOA
 
Yarochkin, kropotov, chetvertakov tracking surreptitious malware distributi...
Yarochkin, kropotov, chetvertakov   tracking surreptitious malware distributi...Yarochkin, kropotov, chetvertakov   tracking surreptitious malware distributi...
Yarochkin, kropotov, chetvertakov tracking surreptitious malware distributi...
 
Mongo at Sailthru (MongoNYC 2011)
Mongo at Sailthru (MongoNYC 2011)Mongo at Sailthru (MongoNYC 2011)
Mongo at Sailthru (MongoNYC 2011)
 
What if everything is awesome? Codemotion Madrid 2014
What if everything is awesome? Codemotion Madrid 2014What if everything is awesome? Codemotion Madrid 2014
What if everything is awesome? Codemotion Madrid 2014
 
RabbitMQ + CouchDB = Awesome
RabbitMQ + CouchDB = AwesomeRabbitMQ + CouchDB = Awesome
RabbitMQ + CouchDB = Awesome
 
Beyond the Basics 2: Aggregation Framework
Beyond the Basics 2: Aggregation Framework Beyond the Basics 2: Aggregation Framework
Beyond the Basics 2: Aggregation Framework
 
WebServices
WebServicesWebServices
WebServices
 
Blazing Fast Analytics with MongoDB & Spark
Blazing Fast Analytics with MongoDB & SparkBlazing Fast Analytics with MongoDB & Spark
Blazing Fast Analytics with MongoDB & Spark
 

Último

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 

Último (20)

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 

Build socialsiteinruby

Notas do Editor

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n