MongoDB介绍分享

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

Tostart:TwoIdeas.Thursday,February4,20101Thursday,February4,2010Therearethesetwoyoungfishswimmingalongandtheyhappentomeetanolderfishswimmingtheotherway,whonodsatthemandsaysMorning,boys.How'sthewater?Andthetwoyoungfishswimonforabit,andtheneventuallyoneofthemlooksoverattheotherandgoesWhatthehelliswater?ThisisastandardrequirementofUScommencementspeeches,thedeploymentofdidacticlittleparable-ishstories....Thepointofthefishstoryismerelythatthemostobvious,importantrealitiesareoftentheonesthatarehardesttoseeandtalkabout.-DavidFosterWallaceThursday,February4,2010Thursday,February4,20102Thursday,February4,2010“Rubyisdesignedtobehuman-oriented.Itreducestheburdenofprogramming.Ittriestopushjobsbacktomachines.Youcanaccomplishmoretaskswithlesswork,insmalleryetreadablecode.”-MatzThursday,February4,2010“MongoDBisdesignedtobehuman-oriented.Itreducestheburdenofprogramming.Ittriestopushjobsbacktomachines.Youcanaccomplishmoretaskswithlesswork,insmalleryetreadablecode.”-Banker(afterMatz)Thursday,February4,2010Whichleadsto...Thursday,February4,2010MongoDBIsn’tWaterThursday,February4,2010MongoDBIsn’tWater(It’sforrubyistsandotherhuman-orienteddevs)Thursday,February4,2010document-orientedschema-freehigh-performancebuiltforscaleThursday,February4,2010DemoThursday,February4,2010RubytoMongoDBMongoDBDrivers&Thursday,February4,2010HowweInsert*ananatomylesson*Thursday,February4,2010Thursday,February4,2010Thursday,February4,20101.ObjectIDgenerationThursday,February4,20101.ObjectIDgenerationtimestamp4b6857a0Thursday,February4,20101.ObjectIDgenerationtimestamp4b6857a0machineid7613c3Thursday,February4,20101.ObjectIDgenerationtimestamp4b6857a0processid6709machineid7613c3Thursday,February4,20101.ObjectIDgenerationtimestamp4b6857a0processid6709machineid7613c3counter4426b2Thursday,February4,20102.BSONserializationType-rich,efficient,general-purpose.Thursday,February4,20102.BSONserializationType-rich,efficient,general-purpose.ThelanguageofMongoDB.Thursday,February4,20103.SendonsocketFireandforget.Thursday,February4,20103.SendonsocketFireandforget.SafemodeforextraassuranceThursday,February4,2010DynamicQueries*likesql*Thursday,February4,2010Thursday,February4,2010Thursday,February4,2010b-treeIndexes*upto40percollection*Thursday,February4,2010Thursday,February4,2010Thursday,February4,2010Atomic&In-placeUpdates*andupserts,too*Thursday,February4,2010Thursday,February4,2010Thursday,February4,2010Thursday,February4,2010Thursday,February4,2010ElegantOperators*documentkeywords*Thursday,February4,2010$ne$in$nin$mod$all$size$existsforqueriesThursday,February4,2010$inc$set$push$pushAll$pop$pull$pullAllforupdatesThursday,February4,2010Aggregationandothercoolfeatures**Thursday,February4,2010groupmap-reduceThursday,February4,2010DesignPatterns&DataModelingThursday,February4,2010Thursday,February4,2010SimulatingaflexibleschemaThursday,February4,2010SimulatingaflexibleschemaWhat’sthejoinlike?Thursday,February4,2010SimulatingaflexibleschemaWhat’sthejoinlike?Canwereasonaboutit?Thursday,February4,2010Thursday,February4,2010Thursday,February4,2010{:sku=‘637636’,:name=‘Linentailoredpant’,:about=[{:title=‘fabric&care’,:content=[‘Dryclean’,‘Imported’]},{:title=‘overview’,:content=[‘Tailoredfit’,‘Yarndyed’]}]}*Simplified,butnotfar-fetched.*Thursday,February4,2010OnetoManyManyManyManyManyManyManyManyManyManyManyManyManyManyManyManyManyManyThursday,February4,2010commentsvotescomment_iduser_idcommentshas_manyvotescommentsThursday,February4,2010documentcommentsThursday,February4,2010postcommentspost_iduser_idtreeattrsposthas_manycommentsThursday,February4,20101.embeddeddocument{:title=‘alifeunexamined’,:comments=[{:author=‘socrates’,:text=‘isnotworthwhile’},{:author=‘epicurus’,:text=‘leadstobliss’}]}Thursday,February4,20102.embedded&nested{:comments=[{:author=‘socrates’,:text=‘isnotworthwhile’,:comments=[{:author=‘epicurus’,:text=‘leadstobliss’}]},]}Thursday,February4,20103.normalized[{:author=‘socrates’,:text=‘isnotworthwhile’,:post_id=‘4c4fa6d000002’},{:author=‘epicurus’,:text=‘leadstobliss’,:post_id=‘4c4fa6d000002’}]Thursday,February4,2010EmbedBreakoutfirst-classdocstradeoffsrelationshipstightly-boundconceptsindependentconceptsThursday,February4,2010toManyManyManyManyManyManyManyManyManyManyManyManyManyManyManyManyManyManyManyManyManyManyManyManyManyManyManyManyManyManyManyManyManyManyManyManyThursday,February4,2010productscategoriesjoinproduct_idcategory_idproducts&categoriesThursday,February4,2010Thursday,February4,2010AFewInternals&Performance,Scalability,Thursday,February4,2010master-slavereplicationmongod(m)mongod(s)mongod(s)mongod(s)failover,read-scalingThursday,February4,2010Thursday,February4,2010clientThursday,February4,2010clientmongosThursday,February4,2010clientmongosShardsmmmmmmmmmThursday,February4,2010clientmongosmongodmongodmongodConfigServersShardsmmmmmmmmmThursday,February4,2010clientmongosmongos......mongodmongodmongodConfigServersShardsmmmmmmmmmThursday,February4,2010ProductionDeployments&UseCasesThursday,February4,2010sourceforge.netThursday,F

1 / 87
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功