Skip to Content
Bad Data 技術手冊
book

Bad Data 技術手冊

by Q. Ethan McCallum
September 2013
Intermediate to advanced
264 pages
5h
Chinese
GoTop Information, Inc.
Content preview from Bad Data 技術手冊
以檔案為後端的網站框架
|
163
許多安全性漏洞會發生,通常是因為外在世界能夠控制在伺服器上執行的服務。舉
例來說,SQL 插入攻擊就是藉由如網站表格的東西,在資料庫上執行特定指令的方
法。靜態檔案的架構則能夠防止這種事情(的確,有人能夠直接入侵伺服器本身—
不用藉由在伺服器上其他不相關的服務,也不用藉由滲入資料中心—但這對
任何的
電腦系統來說都是個漏洞)。
熟悉的工具
人們很習慣使用文字編輯器。他們知道要如何將檔案儲存至磁碟上。這個程序讓使
用者能夠取用他們所習慣的工具,而不是在以 JavaScript 所建立的 WYSIWIG 編輯
器上胡來。
遠端使用者在開始時可能會遇到一些困難。他們會需要使用如 FTP
scp
rsync
工具,來將本地內容推播至伺服器上。這對某些人來說可能較困難。然而,這些指
令對任何能夠使用命令列工作的人來說,是相對簡單的。你能夠對這些人提供任何
的雲端服務,來在電腦之間同步檔案。
備份容易
現在,備份與回復都變得簡單,因為備份系統只需要跟標準檔案系統溝通即可。每
個備份工具都能夠處理純文字檔案。與之相比,備份以及回復資料庫變得很痛苦。
它通常需要你使用特別以及是資料庫限定的工具,有些還會建立特別的格式。
實作
有了上述的概念,實作相對來說是很直覺的。我們擁有一個儲存原始資料的純文字文
件的目錄。該目錄是由
inotifywait
或是類似的工具所監控。當目錄的內容變更時,
inotifywait
會使用變更內容的檔案當成參數,呼叫一個處理的腳本程式。當檔案的
內容被建立或是變更時,該腳本程式需要能夠建立新的 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

RxJava反应式编程

RxJava反应式编程

Tomasz Nurkiewicz, Ben Christensen
高效能PYTHON程式設計

高效能PYTHON程式設計

Micha Gorelick, Ian Ozsvald
Kubernetes编程

Kubernetes编程

Michael Hausenblas, Stefan Schimanski

Publisher Resources

ISBN: 9789862768952