pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

    1. <tfoot id='sTUrW'></tfoot>

      <small id='sTUrW'></small><noframes id='sTUrW'>

      <i id='sTUrW'><tr id='sTUrW'><dt id='sTUrW'><q id='sTUrW'><span id='sTUrW'><b id='sTUrW'><form id='sTUrW'><ins id='sTUrW'></ins><ul id='sTUrW'></ul><sub id='sTUrW'></sub></form><legend id='sTUrW'></legend><bdo id='sTUrW'><pre id='sTUrW'><center id='sTUrW'></center></pre></bdo></b><th id='sTUrW'></th></span></q></dt></tr></i><div class="x155fjj" id='sTUrW'><tfoot id='sTUrW'></tfoot><dl id='sTUrW'><fieldset id='sTUrW'></fieldset></dl></div>

    2. <legend id='sTUrW'><style id='sTUrW'><dir id='sTUrW'><q id='sTUrW'></q></dir></style></legend>
        <bdo id='sTUrW'></bdo><ul id='sTUrW'></ul>

        分布式分析系統(tǒng)數(shù)據(jù)一致性架構(gòu)設(shè)計(jì)

        Architectural design for data consistency on distributed analytic system(分布式分析系統(tǒng)數(shù)據(jù)一致性架構(gòu)設(shè)計(jì))

          1. <tfoot id='PEa64'></tfoot>

            <small id='PEa64'></small><noframes id='PEa64'>

            <i id='PEa64'><tr id='PEa64'><dt id='PEa64'><q id='PEa64'><span id='PEa64'><b id='PEa64'><form id='PEa64'><ins id='PEa64'></ins><ul id='PEa64'></ul><sub id='PEa64'></sub></form><legend id='PEa64'></legend><bdo id='PEa64'><pre id='PEa64'><center id='PEa64'></center></pre></bdo></b><th id='PEa64'></th></span></q></dt></tr></i><div class="hfdlvxf" id='PEa64'><tfoot id='PEa64'></tfoot><dl id='PEa64'><fieldset id='PEa64'></fieldset></dl></div>

              • <bdo id='PEa64'></bdo><ul id='PEa64'></ul>
                <legend id='PEa64'><style id='PEa64'><dir id='PEa64'><q id='PEa64'></q></dir></style></legend>
                    <tbody id='PEa64'></tbody>
                • 本文介紹了分布式分析系統(tǒng)數(shù)據(jù)一致性架構(gòu)設(shè)計(jì)的處理方法,對大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  我正在重構(gòu)一個(gè)將進(jìn)行大量計(jì)算的分析系統(tǒng),我需要一些關(guān)于可能的架構(gòu)設(shè)計(jì)的想法,以解決我面臨的數(shù)據(jù)一致性問題.

                  I am refactoring an Analytic system that will do a lot of calculation, and I need some ideas on possible architectural designs to a data consistency issue I am facing.

                  當(dāng)前架構(gòu)

                  我有一個(gè)基于隊(duì)列的系統(tǒng),其中不同的請求應(yīng)用程序創(chuàng)建最終由工作人員使用的消息.

                  I have a queue based system, in which different requesting applications create messages that are eventually consumed by workers.

                  每個(gè)請求應(yīng)用"將大型計(jì)算分解成較小的部分,這些部分將被發(fā)送到隊(duì)列并由工作人員處理.

                  Each "Requesting App" breaks down a large calculation into smaller pieces that will be sent to the queue and processed by the workers.

                  當(dāng)所有部分都完成后,原始請求應(yīng)用"將合并結(jié)果.

                  When all the pieces are finished, the originating "Requesting app" will consolidate the results.

                  此外,workers 使用來自中央數(shù)據(jù)庫 (SQL Server) 的信息來處理請求(重要:worker 不會(huì)更改數(shù)據(jù)庫上的任何數(shù)據(jù),只會(huì)使用它).

                  Also, the workers consume information from a centralized database (SQL Server) in order to process the requests (Important: the workers do not change any data on the database, only consume it).

                  問題

                  好的.到現(xiàn)在為止還挺好.當(dāng)我們包含更新數(shù)據(jù)庫信息的 Web 服務(wù)時(shí),就會(huì)出現(xiàn)問題.這可能隨時(shí)發(fā)生,但至關(guān)重要的是,源自同一個(gè)請求應(yīng)用程序"的每個(gè)大型計(jì)算"都會(huì)在數(shù)據(jù)庫中看到相同的數(shù)據(jù).

                  Ok. So far, so good. The problem arises when we include a web service that updates the information on the database. This can happen at any time, but it is critical that each "large calculation" originated from the same "Requesting App" sees the same data on the database.

                  例如:

                  1. App A 生成消息 A1 和 A2,將其發(fā)送到隊(duì)列
                  2. Worker W1 選擇消息 A1 進(jìn)行處理.
                  3. Web 服務(wù)器更新數(shù)據(jù)庫,從狀態(tài) S0 更改為 S1.
                  4. Worker W2 拿起消息 A2 進(jìn)行處理
                  1. App A generates messages A1 and A2, sending it to queue
                  2. Worker W1 picks up message A1 for processing.
                  3. The web server updates the database, changing from state S0 to S1.
                  4. Worker W2 picks up message A2 for processing

                  我不能讓工作人員 W2 使用數(shù)據(jù)庫的狀態(tài) S1.為了使整個(gè)計(jì)算保持一致,應(yīng)該使用之前的 S0 狀態(tài).

                  I just can′t have worker W2 using state S1 of the database. for the whole calculation to be consistent it should use the previous S0 state.

                  想法

                  1. 鎖定模式,以防止 Web 服務(wù)器在有工作人員從數(shù)據(jù)庫中使用信息時(shí)更改數(shù)據(jù)庫.

                  1. A lock pattern to prevent the web server from changing the database while there is a worker consuming information from it.

                  • 缺點(diǎn):鎖定可能會(huì)持續(xù)很長時(shí)間,因?yàn)椴煌埱髴?yīng)用程序"的計(jì)算可能會(huì)重疊(A1、B1、A2、B2、C1、B3 等).
                  • cons: The lock might be on for a long time, since the calculation form different "Request Apps" might overlap (A1, B1, A2, B2, C1, B3, etc.).

                  在數(shù)據(jù)庫和工作程序之間創(chuàng)建新層(通過請求應(yīng)用程序控制數(shù)據(jù)庫緩存的服務(wù)器)

                  Create new layer between the database and the workers (a server that controls db caching by req. app)

                  • 缺點(diǎn):添加另一層可能會(huì)帶來很大的開銷(也許?),而且工作量很大,因?yàn)槲覍⒉坏貌恢貙懝ぷ魅藛T的持久性(大量代碼).
                  • cons: Adding another layer might impose significant overhead (maybe?), and it is a lot of work, since I will have to rewrite the persistence of the workers (a lot of code).

                  我正在等待第二種解決方案,但對它不是很有信心.

                  I am pending to the second solution, but not very confident about it.

                  有什么絕妙的主意嗎?我設(shè)計(jì)錯(cuò)了,還是遺漏了什么?

                  Any brilliant ideas ? Am I designing it wrong, or missing something ?

                  OBS:

                  • 這是一個(gè)巨大的 2 層遺留系統(tǒng)(在 C# 中),我們正在嘗試以最少的努力演變?yōu)楦呖蓴U(kuò)展性的解決方案可能.
                  • 每個(gè)工作人員可能在不同的服務(wù)器上運(yùn)行.

                  推薦答案

                  感謝大家的幫助.

                  因?yàn)槲艺J(rèn)為這個(gè)問題在其他場景中可能很常見,所以我想分享我們選擇的解決方案.

                  Since I believe this is problem might be usual in other scenarios, I would like to share the solution we chose.

                  更徹底地思考這個(gè)問題,我明白了它的真正含義.

                  Thinking more thoroughly about the problem, I understood it for what it really is.

                  • 我需要對每個(gè)作業(yè)進(jìn)行某種會(huì)話控制
                  • 有一個(gè)進(jìn)程內(nèi)緩存,用作每個(gè)作業(yè)的會(huì)話控制

                  現(xiàn)在計(jì)算已經(jīng)進(jìn)化為分布式,我只需要將我的緩存也進(jìn)化為分布式.

                  Now the calculation has evolved to be distributed, I just needed to evolve my cache to be distributed as well.

                  為了做到這一點(diǎn),我們選擇使用內(nèi)存數(shù)據(jù)庫(哈希值),部署為單獨(dú)的服務(wù)器.(在本例中為 Redis).

                  In order to do that, we chose to use an In-Memory Database (hash-value), deployed as a separate server. (in this case Redis).

                  現(xiàn)在每次開始工作時(shí),我都會(huì)為工作創(chuàng)建一個(gè) ID 并將其傳遞給他們的消息

                  Now every time I start a job, I create a ID for the job and pass it to their messages

                  當(dāng)每個(gè)工人想從數(shù)據(jù)庫中獲取一些信息時(shí),它會(huì):

                  When each worker wants some information from the database, it would:

                  1. 在 Redis 中查找數(shù)據(jù)(使用作業(yè) ID)
                  2. 如果數(shù)據(jù)在Redis,使用數(shù)據(jù)
                  3. 如果不是,則從 SQL 加載它,并將其保存在 redis 中(使用作業(yè) ID).

                  在作業(yè)結(jié)束時(shí),我清除與作業(yè) ID 關(guān)聯(lián)的所有哈希值.

                  At the end of the job, I clear all hashes associated with the job ID.

                  這篇關(guān)于分布式分析系統(tǒng)數(shù)據(jù)一致性架構(gòu)設(shè)計(jì)的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  Break down a table to pivot in columns (SQL,PYSPARK)(分解表以按列進(jìn)行透視(SQL、PYSPARK))
                  Spark giving Null Pointer Exception while performing jdbc save(Spark在執(zhí)行jdbc保存時(shí)給出空指針異常)
                  execute query on sqlserver using spark sql(使用 spark sql 在 sqlserver 上執(zhí)行查詢)
                  How can I compare the one line in one CSV with all lines in another CSV file?(如何將一個(gè) CSV 中的一行與另一個(gè) CSV 文件中的所有行進(jìn)行比較?)
                  How to map the column wise data in flowfile in NiFi?(如何在 NiFi 中映射流文件中的列數(shù)據(jù)?)
                  connect SQL to apache nifi(將 SQL 連接到 apache nifi)
                    <tbody id='1pBUV'></tbody>
                  <i id='1pBUV'><tr id='1pBUV'><dt id='1pBUV'><q id='1pBUV'><span id='1pBUV'><b id='1pBUV'><form id='1pBUV'><ins id='1pBUV'></ins><ul id='1pBUV'></ul><sub id='1pBUV'></sub></form><legend id='1pBUV'></legend><bdo id='1pBUV'><pre id='1pBUV'><center id='1pBUV'></center></pre></bdo></b><th id='1pBUV'></th></span></q></dt></tr></i><div class="z7t7jzx" id='1pBUV'><tfoot id='1pBUV'></tfoot><dl id='1pBUV'><fieldset id='1pBUV'></fieldset></dl></div>
                • <tfoot id='1pBUV'></tfoot>

                        • <bdo id='1pBUV'></bdo><ul id='1pBUV'></ul>

                            <small id='1pBUV'></small><noframes id='1pBUV'>

                            <legend id='1pBUV'><style id='1pBUV'><dir id='1pBUV'><q id='1pBUV'></q></dir></style></legend>
                          1. 主站蜘蛛池模板: 苹果售后维修点查询,苹果iPhone授权售后维修服务中心 – 修果网 拼装地板,悬浮地板厂家,悬浮式拼装运动地板-石家庄博超地板科技有限公司 | 百度爱采购运营研究社社群-店铺托管-爱采购代运营-良言多米网络公司 | 比亚迪叉车-比亚迪电动叉车堆垛车托盘车仓储叉车价格多少钱报价 磁力去毛刺机_去毛刺磁力抛光机_磁力光饰机_磁力滚抛机_精密金属零件去毛刺机厂家-冠古科技 | 净化工程_无尘车间_无尘车间装修-广州科凌净化工程有限公司 | 工业雾炮机_超细雾炮_远程抑尘射雾器-世纪润德环保设备 | 双菱电缆-广州电缆厂_广州电缆厂有限公司 | 120kv/2mA直流高压发生器-60kv/2mA-30kva/50kv工频耐压试验装置-旭明电工 | 首页|专注深圳注册公司,代理记账报税,注册商标代理,工商变更,企业400电话等企业一站式服务-慧用心 | 铝机箱_铝外壳加工_铝外壳厂家_CNC散热器加工-惠州市铂源五金制品有限公司 | 东莞画册设计_logo/vi设计_品牌包装设计 - 华略品牌设计公司 | 北京亦庄厂房出租_经开区产业园招商信息平台 | 中山市派格家具有限公司【官网】 | 天津热油泵_管道泵_天津高温热油泵-天津市金丰泰机械泵业有限公司【官方网站】 | 国产频谱分析仪-国产网络分析仪-上海坚融实业有限公司 | 大白菜官网,大白菜winpe,大白菜U盘装系统, u盘启动盘制作工具 | 垃圾处理设备_餐厨垃圾处理设备_厨余垃圾处理设备_果蔬垃圾处理设备-深圳市三盛环保科技有限公司 | 走心机厂家,数控走心机-台州博城智能科技有限公司 | 蓄电池回收,ups电池后备电源回收,铅酸蓄电池回收,机房电源回收-广州益夫铅酸电池回收公司 | 济南玻璃安装_济南玻璃门_济南感应门_济南玻璃隔断_济南玻璃门维修_济南镜片安装_济南肯德基门_济南高隔间-济南凯轩鹏宇玻璃有限公司 | 干粉砂浆设备_干混砂浆生产线_腻子粉加工设备_石膏抹灰砂浆生产成套设备厂家_干粉混合设备_砂子烘干机--郑州铭将机械设备有限公司 | 金属抛光机-磁悬浮抛光机-磁力研磨机-磁力清洗机 - 苏州冠古科技 | 聚氨酯催化剂K15,延迟催化剂SA-1,叔胺延迟催化剂,DBU,二甲基哌嗪,催化剂TMR-2,-聚氨酯催化剂生产厂家 | 重庆小面培训_重庆小面技术培训学习班哪家好【终身免费复学】 | 通用磨耗试验机-QUV耐候试验机|久宏实业百科 | 没斑啦-专业的祛斑美白嫩肤知识网站-去斑经验分享 | 灌木树苗-绿化苗木-常绿乔木-价格/批发/基地 - 四川成都途美园林 | 免费网站网址收录网_海企优网站推荐平台| ERP企业管理系统永久免费版_在线ERP系统_OA办公_云版软件官网 | 河南包装袋厂家_河南真空袋批发价格_河南服装袋定制-恒源达包装制品 | 隔爆型防爆端子分线箱_防爆空气开关箱|依客思 | 算命免费_生辰八字_免费在线算命 - 卜算子算命网 | 冰雕-冰雪世界-大型冰雕展制作公司-赛北冰雕官网| 海水晶,海水素,海水晶价格-潍坊滨海经济开发区强隆海水晶厂 | 聚丙烯酰胺PAM-聚合氯化铝PAC-絮凝剂-河南博旭环保科技有限公司 巨野电机维修-水泵维修-巨野县飞宇机电维修有限公司 | 雷冲击高压发生器-水内冷直流高压发生器-串联谐振分压器-武汉特高压电力科技有限公司 | YT保温材料_YT无机保温砂浆_外墙保温材料_南阳银通节能建材高新技术开发有限公司 | 广东佛电电器有限公司|防雷开关|故障电弧断路器|智能量测断路器 广东西屋电气有限公司-广东西屋电气有限公司 | 自动气象站_农业气象站_超声波气象站_防爆气象站-山东万象环境科技有限公司 | 海德莱电力(HYDELEY)-无功补偿元器件生产厂家-二十年专业从事电力电容器 | 合肥升降机-合肥升降货梯-安徽升降平台「厂家直销」-安徽鼎升自动化科技有限公司 | 阴离子_阳离子聚丙烯酰胺厂家_聚合氯化铝价格_水处理絮凝剂_巩义市江源净水材料有限公司 |