第5回 Data-Oriented Programming 読書会
- JavaEE勉強会の読書会
- 開催場所はDiscordのjavaee-study-jp
- 今回
- 9章から11章の途中まで
- 次回
- 第6回 Data-Oriented Programming 読書会 - connpass
- 11章の途中から
- 2023/3/25(土)
- 第6回 Data-Oriented Programming 読書会 - connpass
- 参加者トピック
- ディスカッション
- 9 Persistent data structures
- 9.1 The need for persistent data structures
- 9.2 The efficiency of persistent data structures
- 9.3 Persistent data structures libraries
- 9.4 Persistent data structures in action
- 9. Summary
- 10 Database operations
- 10.1 Fetching data from the database
- 10.2 Storing data in the database
- 10.3 Simple data manipulation
- 10.4 Advanced data manipulation
- 11 Web services
- 11.1 Another feature request
- 11.2 Building the insides like the outsides
- 参考情報
参加者トピック
- 今年も祭りが始まりました
- 走ります 第40回佐倉マラソン~小出義雄メモリアル~【公式】
- Blue/Green Deployment を始めています
- 小さく始める Blue/Green Deployment | CI/CD Conference 2023 by CloudNative Days
- OpenTelemtory の使い方でトラブル出ていたけどさっき直った!
- 身近でインフルエンザが流行中
- 作ってた GitHub - yujiorama/jscpd-formatter-rdjson
ディスカッション
9 Persistent data structures
9.1 The need for persistent data structures
https://lampwww.epfl.ch/papers/idealhashtrees.pdf
9.2 The efficiency of persistent data structures
リストやツリーなど基本的なデータ構造が効率的だということを説明していた
9.3 Persistent data structures libraries
- Immutable.js
- GitHub - GlenKPeterson/Paguro: Generic, Null-safe, Immutable Collections and Functional Transformations for the JVM
- GitHub - tobgu/pyrsistent: Persistent/Immutable/Functional data structures for Python
- GitHub - hamstergem/hamster: Efficient, Immutable, Thread-Safe Collection classes for Ruby
Clojure の提供するデータ構造、データ操作を、他のプログラミング言語でもライブラリとして利用できるようになっていることを説明していた
9.4 Persistent data structures in action
Lodash の _
を Immutable
へ置き換えるだけで元のコードはほとんどそのまま動く
9. Summary
不変コレクション
と永続化データ構造
は違う概念- 構造化共有が利用できると、元の値を破壊しないで効率的に新しい値を作ることができる
10 Database operations
10.1 Fetching data from the database
- 普通は
遅延バインディング
と言えば実行時に呼び出す関数を解決することを指す- このセクションでは、未知の値を既知の型として解釈することを指している
- クエリごとに JSON Schema を書いてデータ型を検証する
10.2 Storing data in the database
- 例えば Java では Map コレクションの要素にアクセスするとき
map.item1
のようなドット記法は使えない - だから DOP の考え方を説明するときは汎用的な記法にする
- 例えば Lodash なら
_at(map, ["item1"])
と書ける
- 例えば Lodash なら
10.3 Simple data manipulation
- データストアに保存し、取得できるフィールド名と、アプリケーションの使用したいフィールド名は異なる場合があるから、アプリケーション側で対応表を用意して、変換すればいいということを説明していた
10.4 Advanced data manipulation
11 Web services
- 10章データベース操作と同じく、アプリケーションの関心事だけを扱っている雰囲気