【正文】
月 16 日 注: 請(qǐng)將該封面與附件裝訂成冊(cè)。 關(guān)鍵詞: 企業(yè)安全策略、 Intra 自動(dòng)化工具、 Socket 通信、組件化編程 1. 引言 關(guān)于 BS 開(kāi)發(fā)模式的好處已經(jīng)被討論了很多, Intra 自動(dòng)化工具在現(xiàn)代企業(yè)辦公自動(dòng)化中的應(yīng)用正日益普及。分工細(xì)密化和分布全球化的趨勢(shì)使得各部門(mén)之間難以找到一個(gè)較完整的可共享的數(shù)據(jù)和可適用 于各部門(mén)間獨(dú)立管理的工具,各部門(mén)在開(kāi)發(fā)自己的 Intra 自動(dòng)化工具的時(shí)候會(huì)根據(jù)本部門(mén)的特點(diǎn)和資源條件選擇自己的 Intra 發(fā)布平臺(tái)。 同時(shí),現(xiàn)代企業(yè)內(nèi)部各部門(mén)之間的協(xié)同工作也越來(lái)越密切,不同部門(mén)之間通常需要訪問(wèn)的數(shù)據(jù)能同步更新,或者至少能在一定的時(shí)間間隔內(nèi)進(jìn)行數(shù)據(jù)同步。因此,在各部門(mén)之間通過(guò)數(shù)據(jù)庫(kù)客戶端訪問(wèn)工具進(jìn)行直接的跨平臺(tái)數(shù)據(jù)訪問(wèn)與同步幾乎不具備可行性。 2. 幾種跨平臺(tái)數(shù)據(jù)同步方案 在介紹常用跨平臺(tái)數(shù)據(jù)同步方法之前有必要簡(jiǎn)要介紹一下所開(kāi)發(fā)的Intra 自動(dòng)化工具的設(shè)計(jì)目的和狀況。以下簡(jiǎn)稱 DDTS)數(shù)據(jù)庫(kù)進(jìn)行同步更新,以實(shí)現(xiàn)與本項(xiàng)目相關(guān)的 CR 信息的本地 Web 訪問(wèn)和跟蹤。 在接手進(jìn)一步開(kāi)發(fā) Intra 自動(dòng)化工具之前,本項(xiàng)目組已經(jīng)有了 一個(gè)CR 跟蹤的 Intra 工具,使用該工具可以進(jìn)行 CR 的輸入、修改、查詢和列表統(tǒng)計(jì)。這種 Intra 工具使用的數(shù)據(jù)同步方法是利用 DDTS數(shù)據(jù)訪問(wèn)工具,手工數(shù)據(jù)同步。從嚴(yán)格意義上講,這不能算是一種跨平臺(tái)數(shù)據(jù)同步的解決方案。使用這種方法,只需在Windows NT Web 服務(wù)器中安裝相應(yīng)的 ODBC 驅(qū)動(dòng)程序, 然后在設(shè)計(jì) ASP 程序時(shí)使用 ADO 編程,進(jìn)行數(shù)據(jù)的簡(jiǎn)單查詢和添加、修改即可進(jìn)行跨平臺(tái)數(shù)據(jù)同步,設(shè)計(jì)十分簡(jiǎn)單。 在開(kāi)發(fā)過(guò)程中,采用基于 Socket 通信的跨平臺(tái)數(shù)據(jù)同步方法。以獲取 DDTS數(shù)據(jù)庫(kù)中指定紀(jì)錄的字段值為例,當(dāng)客戶端和服務(wù)器連接成功時(shí),客戶端向服務(wù)器發(fā)送相關(guān) CR 的關(guān)鍵字以及需要獲取的字段名,服務(wù)器通過(guò)調(diào)用 DDTS 工具的相應(yīng)命令來(lái)獲得客戶端所需要的字段數(shù)據(jù)并發(fā)送給客戶端。編程過(guò)程中 ,對(duì)建立連接時(shí)產(chǎn)生的 EINTR 錯(cuò)誤的處理和對(duì) SIGCHLD 信號(hào)的處理是關(guān)鍵,如果處理不好,將會(huì)出現(xiàn)無(wú)法多次連接和連接關(guān)閉后導(dǎo)致僵死進(jìn)程的情況。這種方法充分利用了已有工具和 perl 語(yǔ)言的靈活性,降低了開(kāi)發(fā)難度。 客戶端運(yùn)行在 Windows NT 平臺(tái)上,采用 Microsoft Visual C++的 ATL( Active Template Library)模板 COM 開(kāi)發(fā)和 MFC Socket 編程做成一個(gè) COM組件。該 COM 組件還用于一些 VBScript 腳本,這些VBScript 腳本使用該 COM 組件并訪問(wèn)本地?cái)?shù)據(jù)庫(kù)實(shí)現(xiàn)數(shù)據(jù)的同步,具體實(shí)現(xiàn)的是自動(dòng)獲取 DDTS 上的當(dāng)天 CR 到本地?cái)?shù)據(jù)庫(kù)并發(fā)送 Email 給相關(guān)人員、指定 條件獲取 DDTS 上的 CR 到本地?cái)?shù)據(jù)庫(kù)并發(fā)送 Email 給相關(guān)人員、自動(dòng)更新正在進(jìn)行的 CR 的狀態(tài)、根據(jù) CR 和人員進(jìn)行的工時(shí)收集、 CR 統(tǒng)計(jì)與跟蹤等任務(wù),可以使用 Windows NT的 Schedule Service來(lái)定時(shí)運(yùn)行這些 VBScript腳本實(shí)現(xiàn)數(shù)據(jù)的定時(shí)自動(dòng)同步。在實(shí)現(xiàn)基于 Socket 通信的數(shù)據(jù)同步時(shí),服務(wù)器端充分利用 了已有的工具和 perl 語(yǔ)言的靈活性;根據(jù)實(shí)現(xiàn)Intra 自動(dòng)化工具的需要,客戶端使用了 Visual C++的 ATL 模板設(shè)計(jì)了一個(gè) Socket 客戶端 COM 組件。在實(shí)際使用中,這種方案很好地滿足了設(shè)計(jì)目的,與原有 Intra 工具相比,大大降低了所有項(xiàng)目組成員在 CR 跟蹤上所貢獻(xiàn)的時(shí)間和精力。On the other hand, at make selection own Intra announce the terrace at the same time, share with other section the section of the data originally too the ground of cowgirl chose own data announces the terrace. At the same time, modern business enterprise internal and each section a data for being in conjunction with work too more and more closely, different section usually needing visitting can renew synchronously, or at least can in certain time partition the proceeding data is big and part of databases product has own according to TCP/ IP interview method, the strategy in enterprise security is next, each section will usually change to install to the port of IP interview method, bining to develop an own internal data interview tool。s tool requests to search with active usage in related personnel in CR DDTS tool the information of the related CR, bining to input information to the server of Web native database in Web recording into page, providing the CR follow the synchronous method in data of this kind of Intra tool usage is to makes use of the DDTS data the interview the tool, handicraft data is synchronous method in that data realizes simple, but the operation is tedious, especially while searching the demand repeats sex a SQL for inputting similarly language se