My use case is following a bunch (several hundreds) of mobile objects every few seconds.
Currently I'm doing this, together with a Map to keep track of object by ID.
There is a bottleneck, because only a single thread can modify followedObjets . On the other hand, in this particular case, the occurences of concurrent modification attempts are unfrequent, so this is not a problem. But suppose the tracking is every millisecond ...
To avoid this bottleneck, I though to use STM, "software transactional memory" , cf the corresponding chapter in the book "Learning Concurrent Programming in Scala"
Learn the art of building intricate, modern, scalable concurrent applications using Scala
by Aleksandar Prokopec [1]
So, probably , this is not a real issue for Archery, which aims to be a pure immutable data structure, but any comment is apreciated.
My use case is following a bunch (several hundreds) of mobile objects every few seconds. Currently I'm doing this, together with a Map to keep track of object by ID.
There is a bottleneck, because only a single thread can modify followedObjets . On the other hand, in this particular case, the occurences of concurrent modification attempts are unfrequent, so this is not a problem. But suppose the tracking is every millisecond ...
To avoid this bottleneck, I though to use STM, "software transactional memory" , cf the corresponding chapter in the book "Learning Concurrent Programming in Scala" Learn the art of building intricate, modern, scalable concurrent applications using Scala by Aleksandar Prokopec [1]
So, probably , this is not a real issue for Archery, which aims to be a pure immutable data structure, but any comment is apreciated.
[1] https://www.packtpub.com/application-development/learning-concurrent-programming-scala