Erlang/Elixir精選-第4期(20191223)

精選文章

  1. A digital symphony — The architecture of API Fortress.
    使用Actor模型來支持基於微服務的大規模分佈式軟件架構。用實例解釋了Actor對於分解複雜系統的好處。
    Understanding actor concurrency, Part 1: Actors in Erlang
    但也觀點說Actor並不是好的併發模型,Actors are not a good concurrency model

  2. RabbitMQ 3.8 Release Overview.
    支持Prometheus and Grafana 監控。我最近打算用Elixir從零寫一個HTTP(S) 壓力測試工具,前端展示本來是想用Phoenix LiveView來做展示的,但看到這個後,直接替換成Grafana,省掉了非常多的工作,且更圖表更專業。

  3. Elixir HTTP Benchmark - Ace vs Cowboy.
    HTTP Server簡單壓測結果。圖中cowboy-static的靜態頁面請求比自己想象中的慢很多。

  4. Clever use of persistent_term.
    比ets:update_counter更快的自增操作!內存分配策略更佳,新版本的logger就是使用的它。····

  5. Erlang, pattern matching on a particular map's key?
    解釋了爲什麼下面map的匹配模式是編譯不過的。
        count([], Acc) -> Acc;
        count([A|Rest], #{A := N} = Acc) -> count(Rest, Acc#{A := N+1});
        count([A|Rest], Acc) -> count(Rest, Acc#{A := 1}).


)

歡迎來語雀投稿或推薦,精選每週一發布,同步更新在語雀博客園

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章