<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    WZ_XJTU_JAVA_SPACE

    while(true) {System.out.println("wz.xjtu");}

    2010年2月24日

    這篇文章是用英文寫的,由于某種原因,這篇文章可以很直接的說是Anti-MongoDB一個和諧的DB(一)。寫一的時候其實有很多問題,還是不很清楚的。所以有了以下的問題:

    I has some questions about the nosql and the document database solutions because I just touch the nosql solutions these days,
    I tried to understand and find the benefit of the NOSQL solutions (performance and scalability), but I cannot convince myself for the reasons, specially for the complex business related cases,
    After read a lot of the articles and find the CAP, relational and Scalability are the three points for the NOSQL solutions,
    CAP : only can pickup two of the three factors, and the NOSQL solutions pickup the AP, and use the eventually consistency to handle the consistency, now, let's check the RDBMS, if we have a lot of database servers, we also cannot have a good Consistency because of the performance issues, so we can choose the Master/Slave and asynchronize copy to handle the consistency (Similar with Eventually Consistency) which is similar with the NOSQL, so what is the benefit of the NOSQL (specify document database) from the CAP theory?
    No-Relational object : the NOSQL is good at the no-relationship objects, for example, log. but log also can save to the RDBMS without relationship, so for the no-relationship objects, I think the mongo solution and the RDBMS solutions should be have the same performance and scalability. right?
    Relational : in the mongodb.org there is a good example as following,

    the address is embedded into the student which is reasonable and will make the performance better if we need load the address from the student in the UI, but the RDBMS also can do it for the 1-1 relationship, and the scores need ref to the another collection and which is also similar with the RDBMS and also need touch database two times when we load the course which also similar with RDBMS. so what is the benefit.
    Partition and Sharding : RDBMS also provide the solutions (although need change some codes), and RDBMS also can handle them.

    posted @ 2010-02-24 10:47 wz.xjtu 閱讀(244) | 評論 (0)編輯 收藏

    NOSQL數(shù)據(jù)庫經(jīng)過了風(fēng)風(fēng)火火的一年,各個解決方案做的一個比一個有個性,并且大部分都有了商業(yè)應(yīng)用,總體來說自己創(chuàng)造出來并且可以進行自行優(yōu)化的東東還是經(jīng)得起歷練的。

    MongoDB在過去的一年中,變化非常之大,剛開始關(guān)注它的時候,它只是一個沒有1.0版本的東東,但是現(xiàn)在已經(jīng)加上太多太多的功能了,其中包括 MapReduce,Auto Sharding,等。

    經(jīng)過了比較深入的研究(還會繼續(xù)研究),發(fā)現(xiàn)這個最像關(guān)系型數(shù)據(jù)庫的數(shù)據(jù)確實做的很強大。有很多東西還是非常值得探討的。我們先從以下方面進行研究關(guān)系型數(shù)據(jù)庫和非關(guān)系型數(shù)據(jù)庫的區(qū)別,以及為什么要在某種條件下擯棄關(guān)系型數(shù)據(jù)庫。

    1. 關(guān)系型數(shù)據(jù)庫的產(chǎn)生就是為關(guān)系所生,如果一條條的都不是關(guān)系型的數(shù)據(jù),需要進行關(guān)系型數(shù)據(jù)庫嗎? 答案很簡單:不需要

    經(jīng)典應(yīng)用:Log的存儲 (存儲到關(guān)系型數(shù)據(jù)庫的話,耽誤了我們可憐的不好擴張的數(shù)據(jù)庫呀,如果存儲在文件里面,那又不好進行管理,所以非關(guān)系型數(shù)據(jù)庫是一個很好的解決方案)

    2. 關(guān)系型數(shù)據(jù)庫過多的強調(diào)了關(guān)系,關(guān)系型數(shù)據(jù)庫的目標(biāo)是把我們的數(shù)據(jù)庫打造成一個第三范式遍布的數(shù)據(jù)結(jié)構(gòu)(無傳遞函數(shù)依賴和部分函數(shù)依賴)。但是這種拆解變相的多了一次數(shù)據(jù)庫操作,也就是一次IO,性能也就會下降了。 例子如下:當(dāng)我們想打開一個帖子的時候,我們肯定還是想把下面的Comments都拿到的,如果我們直接能把Comments存在這個帖子之下就很容解決了吧。

    3. 關(guān)系型數(shù)據(jù)庫過的關(guān)注consistency,其實我們很多的系統(tǒng)中并不需要這么好的consistency,起碼很多的Web2.0或者是普通的網(wǎng)站來說,只要把Support,維護,alert機制做好,不需要太多的consistency一樣可以做出很好的系統(tǒng)。當(dāng)然我們也可以通過一些機制實現(xiàn) eventually consistency (沒有很深入的研究過)。太多的consistency的關(guān)注必然導(dǎo)致最后的available不會做到很好。進而關(guān)系型數(shù)據(jù)庫很難scaling out。為了scaling out read,我們只能去做partition,但是partition很難做呀,一半都會牽扯到很多代碼的改動。這些代碼的改動會嚴(yán)重影響項目的穩(wěn)定性而且風(fēng)險性很大。而為了scaling out write 只能去做master-slave的解決方案(async和sync每種都有自己的問題)。很多NOSQL都解決了這個問題,無論是auto- sharding(因為是key做主的東西,可以很好的拆分)還是replication。(這一塊要進一步研究)

    4. Schema問題。關(guān)系型數(shù)據(jù)的schema都是一定的,如果增加或減少一個column那可是一個大動呀。但是NOSQL卻是能很容易的解決這個問題,因為他們就是key-value而已。

    NOSQL的提出是一個思想的進步,是一種編程理念的進步,數(shù)據(jù)庫只是一個存儲的庫而已,他不應(yīng)該過多的關(guān)注于其他的business相關(guān)的東西。將來發(fā)展的前景是我們所有的business的邏輯都應(yīng)該在Domain里面體現(xiàn),我們不用關(guān)注下面到底存儲到那里。

    posted @ 2010-02-24 10:46 wz.xjtu 閱讀(331) | 評論 (0)編輯 收藏

    導(dǎo)航

    <2010年2月>
    31123456
    78910111213
    14151617181920
    21222324252627
    28123456
    78910111213

    統(tǒng)計

    常用鏈接

    留言簿

    隨筆檔案

    搜索

    最新評論

    • 1.?re: Cache之我見
    • 評論內(nèi)容較長,點擊標(biāo)題查看
    • --awp001
    • 2.?re: Cache之我見
    • 評論內(nèi)容較長,點擊標(biāo)題查看
    • --wz.xjtu
    • 3.?re: Cache之我見
    • 在分布式環(huán)境里,多個用戶共用一個Cache,從Cache中獲取對象的時候,如何解決用戶之間的爭搶問題,鎖定嗎?
    • --awp001
    • 4.?re: Cache之我見
    • 目前我的核心任務(wù)是實現(xiàn)一個對象池,減少垃圾收集,樓主能否提供一些建議?
    • --awp001
    • 5.?re: Cache之我見
    • 我這幾天正在研究在系統(tǒng)內(nèi)引入緩存,樓主說的一級緩存 二級緩存 是一個很好的想法。
    • --awp001

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 免费看黄网站在线看| 国产精品亚洲四区在线观看| 少妇亚洲免费精品| 国产国产人免费人成免费视频 | 蜜臀91精品国产免费观看| 国产 亚洲 中文在线 字幕| 黄色成人网站免费无码av| 亚洲熟妇自偷自拍另欧美| 国内精品免费视频自在线| 国产AV日韩A∨亚洲AV电影| 免费国产成人午夜电影| 成人一级免费视频| 国产亚洲一区二区精品| 久久午夜夜伦鲁鲁片免费无码影视| 2019亚洲午夜无码天堂| 国产成人免费高清在线观看| 九九综合VA免费看| 国产亚洲精品a在线观看app| 人妻无码久久一区二区三区免费| 亚洲一级毛片在线观| 国产精品美女自在线观看免费| av午夜福利一片免费看久久| 亚洲成在人天堂在线| 24小时免费直播在线观看| 国产亚洲Av综合人人澡精品| 亚洲色成人中文字幕网站| 4444www免费看| 色天使亚洲综合一区二区| 亚洲综合AV在线在线播放| 99国产精品永久免费视频 | 亚洲人xxx日本人18| 国产男女性潮高清免费网站| 人妻在线日韩免费视频| 亚洲国产成人综合| 亚洲av无码专区在线观看素人| 久久国产乱子伦精品免费不卡| 亚洲综合欧美色五月俺也去| 亚洲性猛交XXXX| 啦啦啦高清视频在线观看免费| 国产激情久久久久影院老熟女免费 | 亚洲一级毛片免费在线观看|