維基百科各語言與各地區的綜合資訊

維基百科推出了新版的介面:「Just how many people are reading Wikipedia in your country, and what language are they using?」。

We recently released a new interactive visualization of Wikipedia traffic by country and language. Called WiViVi, which stands for Wikipedia Views Visualized, the new visualization shows the geographic distribution of pageviews to any or all Wikipedias from two different perspectives[.]

這個介面可以看到每個版本在每個地區佔的比率,像是中文維基百科的情況:

不過翻牆 VPN 的不知道怎麼算...

收 Wikimedia (包括維基百科) 的 Recent Changes

所以有新的 streaming protocol 取代本來的 RCStream:「Get live updates to Wikimedia projects with EventStreams」。

這次新的 protocol 是走標準協定:

EventStreams is built on the w3c standard Server Sent Events (SSE). SSE is simply a streaming HTTP connection with event data in a particular text format. Client libraries, usually called EventSource, assist with building responsive tools, but because SSE is really just HTTP, you can use any HTTP client (even curl!) to consume it.

直接用瀏覽器打開也可以看到一直冒出來新的訊息...

維基百科每天的 PageView 數據 (2015/07/01 開始)

不只是維基百科,還包括所以維基基金會的專案都可以查到,精確度可以到每日。

MediaWiki 系統提供的 API 在維基基金會上的專案都關掉了。主要是因為維基基金會的專案量太大,前方有大量的 cache 擋住,後端能提供的資料其實沒有意義。取而代之的是另外規劃出來的 API。

API 的介紹說明在「Analytics/PageviewAPI」這邊可以看到,官方所提供的完整 API 說明文件則可以在「Wikimedia REST API」這邊查到。

實際測試發現資料從 2015/07/01 開始,每日更新的速度還不錯,像是 UTC 還是 2016/07/31 的現在可以取到 2016/07/30 的資料了。舉例來說,想要拉中文版 Kalafina 在 2016 七月由人閱覽的資料:

https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/zh.wikipedia/all-access/user/Kalafina/daily/20160701/20160731

如果是想拉日文版的就換成 ja.wikipedia

https://wikimedia.org/api/rest_v1/metrics/pageviews/per-article/ja.wikipedia/all-access/user/Kalafina/daily/20160701/20160731

MediaWiki 的 EmailDiff 套件

先前 MediaWiki 所提供的「變更通知」都只有在信件裡「通知」,而沒有在信件裡列出「改變的內容」,這使得讀信的人要再點進去看... (於是就懶的點了)

而前陣子看到有人寫了 extension 來輸出 diff,解決了這個問題:「MediaWiki extension EmailDiff: notification emails improved」。

信裡變成有這樣的內容:

Version differences:
@@ -846,5 +887,3 @@
 In cattle, temperament can affect production traits such as carcass and meat 
 quality or milk yield as well as affecting the animal's overall health and 
-reproduction. Cattle temperament is defined as "the consistent behavioral and physiological 
-difference observed between individuals in response to a stressor or environmental 
+reproduction. If you succeed in tipping a cow only partway, such that only one 
+of its feet is still on the ground, you have created lean beef. Such a feat is 
+well done. Naturally, being outside, the cow is unstable. When it falls over, 
+it becomes ground beef. Cattle temperament is defined as "the consistent behavioral 
+and physiological difference observed between individuals in response to a stressor or environmental 
 challenge and is used to describe the relatively stable difference in the behavioral 
 predisposition of an animal, which can be related to psychobiological mechanisms.

這樣可讀性高非常多,來找人裝看看好了...

維基媒體的效能資訊

在「Wikimedia Performance Metrics」這邊看到維基媒體 (Wikimedia) 的效能資訊網頁:「Metrics — Wikimedia Performance」,這邊是以前端效能為主。在「Grafana」這邊則包括了更多的資訊。

在「Performance」這邊有關於效能頁面的說明,看起來還在開發...

Wikipedia 引入 Mentor 制度

在「Get help editing Wikipedia with the new “Co-op” mentorship program」這邊看到英文版維基百科引入了導師的制度。

以往比較資深的編輯都是直接修正,或是到新手的 Talk 頁上提出建議,現在則是引入了導師的制度,從而得到了不錯的成果。

首先是編輯次數的成長:

Mentored editors were more productive than compared to editors who were not mentored. During the pilot, mentored editors made 7 times as many edits (35 vs. 4.5 in median edits). They also edited more articles during the pilot (10 vs. 3 on average).

以及參與度的提昇:

68% of mentored editors remained active in April 2015, the month after the end of pilot, whereas only 22% of non-mentored editors remained active.

更快速的參與:

Editors using the Co-op waited far less time for mentorship to begin (12 hours) compared to the only other mentorship space on en.wiki, Adopt-a-user (4 days).

以及長遠的品質提昇:

Despite being geared toward newer editors, the Co-op was utilized by more experienced editors who reported having positive and constructive experiences through mentorship.

不知道中文版什麼時候可以導入 :p

Wikimedia (包括維基百科) 推出 HSTS (強制使用 HTTPS)

Wikimeda 宣佈所有旗下的網站都會啟用 HTTPS 與 HSTS:「Securing access to Wikimedia sites with HTTPS」。

在這之前,使用者可以用 EFFHTTPS Everywhere 強制使用 HTTPS (在 FirefoxGoogle Chrome 都有上架),而這次則是全面強制使用了。

愈來愈多人使用 HTTPS 來保護隱私後 (而不僅僅是保護機密資料),接下來的問題就是要想辦法在 DNS 上保護了。也就是可以利用 DNS query pattern 知道你在看哪種 (或是哪一個) 頁面。

Wikipedia 換成 HHVM 的成果

維基百科基金會的人發表了將 PHP 換成 HHVM 後的成果:「How we made editing Wikipedia twice as fast」。

可以看到編輯存檔時間大幅改善:

另外是已登入使用者 (通常是經常參與編輯的使用者) 的頁面產生時間也大幅改善:

另外帶來的好處是 CPU 使用率的下降:

再來就是看 PHP 7 能追上多少了...