久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <legend id='Pahq7'><style id='Pahq7'><dir id='Pahq7'><q id='Pahq7'></q></dir></style></legend>
    • <bdo id='Pahq7'></bdo><ul id='Pahq7'></ul>

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

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

      1. PHP 分布式系統剖析

        Anatomy of a Distributed System in PHP(PHP 分布式系統剖析)
        <tfoot id='zZ1gg'></tfoot>

      2. <small id='zZ1gg'></small><noframes id='zZ1gg'>

      3. <legend id='zZ1gg'><style id='zZ1gg'><dir id='zZ1gg'><q id='zZ1gg'></q></dir></style></legend>

                <tbody id='zZ1gg'></tbody>
              <i id='zZ1gg'><tr id='zZ1gg'><dt id='zZ1gg'><q id='zZ1gg'><span id='zZ1gg'><b id='zZ1gg'><form id='zZ1gg'><ins id='zZ1gg'></ins><ul id='zZ1gg'></ul><sub id='zZ1gg'></sub></form><legend id='zZ1gg'></legend><bdo id='zZ1gg'><pre id='zZ1gg'><center id='zZ1gg'></center></pre></bdo></b><th id='zZ1gg'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='zZ1gg'><tfoot id='zZ1gg'></tfoot><dl id='zZ1gg'><fieldset id='zZ1gg'></fieldset></dl></div>
                  <bdo id='zZ1gg'></bdo><ul id='zZ1gg'></ul>
                  本文介紹了PHP 分布式系統剖析的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我遇到了一個問題,讓我很難找到理想的解決方案,為了更好地解釋它,我將在這里公開我的場景.

                  I've a problem which is giving me some hard time trying to figure it out the ideal solution and, to better explain it, I'm going to expose my scenario here.

                  我有一個接收訂單的服務器來自幾個客戶.每個客戶都會提交一組重復性任務應該在某個指定的時間執行間隔,例如:客戶端 A 提交任務AA 應該每次執行2009-12-31 和 2009-12-31 之間的分鐘2010-12-31;所以如果我的數學是對的大約有 525 600 次操作一年,給予更多的客戶和任務讓服務器處理所有這些任務是不可行的所以我提出了工人的想法機器.服務器將被開發在 PHP 上.

                  I've a server that will receive orders from several clients. Each client will submit a set of recurring tasks that should be executed at some specified intervals, eg.: client A submits task AA that should be executed every minute between 2009-12-31 and 2010-12-31; so if my math is right that's about 525 600 operations in a year, given more clients and tasks it would be infeasible to let the server process all these tasks so I came up with the idea of worker machines. The server will be developed on PHP.

                  工人機器只是普通的便宜基于 Windows 的計算機,我會在我家或我的工作場所主持,每個工人都會有一個專門的互聯網連接(使用動態 IP)和 UPS 以避免停電.每個worker 也會每一次查詢服務器通過網絡服務調用 30 秒左右,獲取下一個待處理的作業并處理它.工作完成后,工人將將輸出提交到服務器并請求一份新工作等等,無窮無盡.如果需要擴展系統 I應該只設置一個新的工人,然后整個事情應該無縫運行.將開發工作客戶端使用 PHP 或 Python.

                  Worker machines are just regular cheap Windows-based computers that I'll host on my home or at my workplace, each worker will have a dedicated Internet connection (with dynamic IPs) and a UPS to avoid power outages. Each worker will also query the server every 30 seconds or so via web service calls, fetch the next pending job and process it. Once the job is completed the worker will submit the output to the server and request a new job and so on ad infinitum. If there is a need to scale the system I should just set up a new worker and the whole thing should run seamlessly. The worker client will be developed in PHP or Python.

                  在任何時候,我的客戶都應該能夠登錄到服務器并檢查他們訂購的任務的狀態.

                  At any given time my clients should be able to log on to the server and check the status of the tasks they ordered.

                  現在是棘手的部分:

                  • 我必須能夠重建已經處理的任務,如果對于某些服務器出現故障的原因.
                  • 工作人員不是特定于客戶的,一名工人應該處理工作任何給定數量的客戶.

                  我對一般數據庫設計以及要使用的技術有一些疑問.

                  I've some doubts regarding the general database design and which technologies to use.

                  最初我想使用多個 SQLite 數據庫并將它們全部加入服務器,但我不知道如何按客戶端分組以生成作業報告.

                  Originally I thought of using several SQLite databases and joining them all on the server but I can't figure out how I would group by clients to generate the job reports.

                  我從未真正使用過以下任何技術:memcachedCouchDBHadoop 等等,但我愿意想知道其中任何一個是否適合我的問題,如果是,您為新手推薦哪個是分布式計算"(或者這是并行的?)像我一樣.請記住,worker 具有動態 IP.

                  I've never actually worked with any of the following technologies: memcached, CouchDB, Hadoop and all the like, but I would like to know if any of these is suitable for my problem, and if yes which do you recommend for a newbie is "distributed computing" (or is this parallel?) like me. Please keep in mind that the workers have dynamic IPs.

                  就像我之前說的,我在通用數據庫設計方面也遇到了麻煩,部分原因是我還沒有選擇任何特定的 R(D)DBMS,而是我已經選擇了一個問題,我認為它與我的 DBMS 無關選擇與排隊系統有關......我是否應該預先計算特定作業的所有絕對時間戳并擁有大量時間戳,執行并將它們標記為完成升序或者我應該有一個更聰明的系統,比如when timestamp mod 60 == 0 -> execute".這個聰明"系統的問題在于某些作業不會按順序執行,因為有些工作人員可能會等待無所事事而其他工作人員過載.您有什么建議?

                  Like I said before I'm also having trouble with the general database design, partly because I still haven't chosen any particular R(D)DBMS but one issue that I've and I think it's agnostic to the DBMS I choose is related to the queuing system... Should I precalculate all the absolute timestamps to a specific job and have a large set of timestamps, execute and flag them as complete in ascending order or should I have a more clever system like "when timestamp modulus 60 == 0 -> execute". The problem with this "clever" system is that some jobs will not be executed in order they should be because some workers could be waiting doing nothing while others are overloaded. What do you suggest?

                  PS:我不確定這個問題的標題和標簽是否正確反映了我的問題以及我正在嘗試做的事情;如果不是,請相應地進行編輯.

                  感謝您的意見!

                  @timdev:

                  1. 輸入將是一個非常小的 JSON 編碼字符串,輸出也將是一個 JSON 編碼字符串,但要大一點(大約 1-5 KB).
                  2. 將使用來自 Web 的多個可用資源計算輸出,因此主要瓶頸可能是帶寬.數據庫寫入也可能是一個 - 取決于 R(D)DBMS.

                  推薦答案

                  看起來您即將重新創建 Gearman.以下是 Gearman 的介紹:

                  It looks like you're on the verge of recreating Gearman. Here's the introduction for Gearman:

                  Gearman 提供了一個通用的應用程序將工作外包給其他人的框架更好的機器或流程適合做這項工作.它可以讓你并行工作,加載平衡處理,并調用語言之間的功能.有可能用于各種應用,從高可用性網站到數據庫復制的傳輸事件.換句話說,它是神經系統如何分布處理通信.

                  Gearman provides a generic application framework to farm out work to other machines or processes that are better suited to do the work. It allows you to do work in parallel, to load balance processing, and to call functions between languages. It can be used in a variety of applications, from high-availability web sites to the transport of database replication events. In other words, it is the nervous system for how distributed processing communicates.

                  您可以用 PHP 編寫客戶端和后端工作程序代碼.

                  You can write both your client and the back-end worker code in PHP.

                  關于為 Windows 編譯的 Gearman 服務器的問題:我不認為它可以在為 Windows 預先構建的整潔包中使用.Gearman 仍然是一個相當年輕的項目,他們可能還沒有成熟到可以為 Windows 生產現成的發行版.

                  Re your question about a Gearman Server compiled for Windows: I don't think it's available in a neat package pre-built for Windows. Gearman is still a fairly young project and they may not have matured to the point of producing ready-to-run distributions for Windows.

                  Sun/MySQL 員工 Eric Day 和 Brian Aker 提供了教程2009 年 7 月 OSCON 上的 Gearman,但他們的幻燈片只提到了 Linux 包.

                  Sun/MySQL employees Eric Day and Brian Aker gave a tutorial for Gearman at OSCON in July 2009, but their slides mention only Linux packages.

                  這是 Perl CPAN Testers 項目的鏈接,表明可以使用 Microsoft C 編譯器 (cl.exe) 在 Win32 上構建 Gearman-Server,并且它通過了測試:http://www.nntp.perl.org/group/perl.cpan.testers/2009/10/msg5521569.html 但我猜你必須下載源代碼并自己構建.

                  Here's a link to the Perl CPAN Testers project, that indicates that Gearman-Server can be built on Win32 using the Microsoft C compiler (cl.exe), and it passes tests: http://www.nntp.perl.org/group/perl.cpan.testers/2009/10/msg5521569.html But I'd guess you have to download source code and build it yourself.

                  這篇關于PHP 分布式系統剖析的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                  PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標不起作用)
                  PHP PDO ODBC connection(PHP PDO ODBC 連接)
                  Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術方法)
                  php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                  MSSQL PDO could not find driver(MSSQL PDO 找不到驅動程序)
                    <bdo id='OAHmQ'></bdo><ul id='OAHmQ'></ul>
                    <legend id='OAHmQ'><style id='OAHmQ'><dir id='OAHmQ'><q id='OAHmQ'></q></dir></style></legend>

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

                        • <tfoot id='OAHmQ'></tfoot>
                        • <small id='OAHmQ'></small><noframes id='OAHmQ'>

                            主站蜘蛛池模板: 日本成人区 | 久久精品无码一区二区三区 | 亚洲入口 | av香港经典三级级 在线 | 日干夜干 | 中国av在线免费观看 | 成人精品系列 | 91精品国产综合久久婷婷香蕉 | 一本一道久久a久久精品综合蜜臀 | 亚洲成人自拍 | 黄色在线网站 | 三级av网址| 国产精品一区二区不卡 | 欧美乱码精品一区二区三区 | 国产精品日韩欧美 | 国产精品亚洲第一 | 亚洲国产免费 | 国产主播第一页 | 午夜精品一区二区三区在线观看 | 日韩久久成人 | 免费v片在线观看 | 久久久久久亚洲精品 | 亚洲不卡av在线 | 操操操日日日 | 欧美日韩综合 | 久久综合久色欧美综合狠狠 | 国偷自产av一区二区三区 | 国产午夜精品久久久久 | 国产小u女发育末成年 | 超碰520| 国产电影一区二区三区爱妃记 | 一区二区三区不卡视频 | 国产一区成人 | 污视频在线免费观看 | 欧美日韩在线电影 | 欧美一级毛片免费观看 | 99久久久国产精品免费消防器 | 玖玖综合网| 成人毛片在线观看 | 自拍偷拍中文字幕 | 成人深夜福利 |