Webinar: Utilisations courantes de MongoDB

of 22 /22
When to use MongoDB

Embed Size (px)

description

MongoDB ne fonctionne pas comme les autres bases de données. Son modèle de données orienté documents, son partitionnement en gammes et sa cohérence forte sont bien adaptés à certains problèmes et moins adaptés à d'autres. Dans ce séminaire Web, nous étudierons des exemples réels d'utilisation de MongoDB mettant à profit ces fonctionnalités uniques. Nous évoquerons le cas de clients spécifiques qui utilisent MongoDB et nous verrons la façon dont ils ont implémenté leur solution. Nous vous montrerons également comment construire une solution du même type pour votre entreprise.

Transcript of Webinar: Utilisations courantes de MongoDB

  • 1. When to use MongoDB

2. Part 1 of a seriesReal-TimeAnalytics withMongodbApril 12thContentManagement withMongoDBMay [email protected] 3. TodayLast 10 yearsEmerging NoSQL SpaceRDBMSDataWarehouseNoSQLRDBMSDataWarehouseThe beginningRDBMS 4. Qualities of NoSQLWorkloadsFlexible data models Lists, Nested Objects Sparse schemas Semi-structured data Agile DevelopmentHigh Throughput Lots of reads Lots of writesLarge Data Sizes Aggregate data size Number of objectsLow Latency Both reads and writes Millisecond latencyCloud Computing Run anywhere No assumptions abouthardware No / Few KnobsCommodityHardware Ethernet Local disks 5. MongoDB was designed forthisFlexible data models Lists, Nested Objects Sparse schemas Semi-structured data Agile DevelopmentHigh Throughput Lots of reads Lots of writesLarge Data Sizes Aggregate data size Number of objectsLow Latency Both reads and writes Millisecond latencyCloud Computing Run anywhere No assumptions abouthardware No / Few KnobsCommodityHardware Ethernet Local disks JSON basedobject model Dynamicschemas Replica Sets toscale reads Sharding toscale writes 1000s of shardsin a single DB Partitioning ofdata In-memorycache Scale-outworking set Scale-out toovercomehardwarelimitations Designed fortypical OS andlocal file system 6. Example customersUser Data Management High Volume Data FeedsContent Management Operational Intelligence Product Data Management 7. USE CASES THATLEVERAGE NOSQL 8. High Volume Data Feeds More machines, more sensors, moredata Variably structuredMachineGeneratedData High frequency tradingStock MarketData Multiple sources of data Each changes their format constantlySocial MediaFirehose 9. High Volume Data FeedDataSourcesAsynchronous writesFlexible documentmodel can adapt tochanges in sensorformatWrite to memory withperiodic disk flushDataSourcesDataSourcesDataSourcesScale writes overmultiple shards 10. Operational Intelligence Large volume of state about users Very strict latency requirementsAd Targeting Expose report data to millions of customers Report on large volumes of data Reports that update in real timeCustomerFacingDashboards Need to join the conversation _now_Social MediaMonitoring 11. Operational IntelligenceDashboardsAPILow latency readsParallelize queriesacross replicas andshardsIn databaseaggregationFlexible schemaadapts to changinginput dataCan use same clusterto collect, store, andreport on data 12. Behavioral Profiles123See AdSee Ad4ClickConvert{ cookie_id: 1234512413243,advertiser:{apple: {actions: [{ impression: ad1, time: 123 },{ impression: ad2, time: 232 },{ click: ad2, time: 235 },{ add_to_cart: laptop,sku: asdf23f,time: 254 },{ purchase: laptop, time: 354 }]}}}Rich profilescollecting multiplecomplex actionsScale out to supporthigh throughput ofactivities trackedIndexing andquerying to supportmatching, frequencycappingDynamic schemasmake it easy to trackvendor specificattributes 13. Product Data Diverse product portfolio Complex querying and filteringE-CommerceProductCatalog Scale for short bursts of high volume traffic Scalable, but consistent view of inventoryFlash Sales 14. Product Data{ sku: 00e8da9b,type: MP3,details: {artist: John Coltrane,title: A love supreme,length: 123}}{ sku: 00a9f3a,type: Book,details: {author: David Eggers,title: You shall know our velocity,isbn: 0-9703355-5-5}}Flexible data modelfor similar, butdifferent objectsIndexing and richquery API for easysearching and sortingdb.products.find({ details.author: David Eggers }).sort({ title : -1 }); 15. Content Management Comments and user generatedcontent Personalization of content, layoutNews Site Generate layout on the fly for eachdevice that connects No need to cache static pagesMulti-Devicerendering Store large objects Simple modeling of metadataSharing 16. Content Management{ camera: Nikon d4,location: [ -122.418333, 37.775 ]}{ camera: Canon 5d mkII,people: [ Jim, Carol ],taken_on: ISODate("2012-03-07T18:32:35.002Z")}{ origin: facebook.com/photos/xwdf23fsdf,license: Creative Commons CC0,size: {dimensions: [ 124, 52 ],units: pixels}}Flexible data modelfor similar, butdifferent objectsHorizontal scalabilityfor large data setsGeo spatial indexingfor location basedsearchesGridFS for largeobject storage 17. User Data Management User state and sessionmanagementVideo Games Scale out to large graphs Easy to search and processSocial Graphs Authentication, Authorizationand AccountingIdentityManagement 18. User Game StateFlexible documentssupports new gamefeatures withoutschema migrationSharding enableswhole data set to bein memory, ensuringlow latencyJSON data modelmaps well toHTML5/JS & Flashbased clientsEasy to store entireplayer state in asingle document. 19. Social GraphSocial GraphsDocuments enabledisk locality of allprofile data for a userSharding partitionsuser profiles acrossavailable serversNative support forArrays makes it easyto store connectionsinside user profile 20. IS MY USE CASE A GOODFIT FOR MONGODB? 21. Good fits for MongoDBApplication Characteristic Why MongoDB might be a good fitLarge number of objects tostoreSharding lets you split objects across multipleserversHigh write or read throughput Sharding + Replication lets you scale read andwrite traffic across multiple serversLow Latency Access Memory Mapped storage engine cachesdocuments in RAM, enabling in-memoryperformance. Data locality of documents cansignificantly improve latency over join basedapproachesVariable data in objects Dynamic schema and JSON data model enableflexible data storage without sparse tables orcomplex joinsCloud based deployment Sharding and replication let you work aroundhardware limitations in clouds. 22. Thanks!Real-Time AnalyticsApril 12thMongoDB and AWS CloudFormationApril 25thNew Aggregation FrameworkMay 10thContent ManagementMay 17th