I have a mutable map in web app. The mutable map has many reads and rare changes. Actor encapsulates state of map ( #1186 ). Actors enqueue reads and writes in single thread.
How to make writes serial and make reads parallel?
Is this question matter? What is throughput on reading of singleton map pattern?
brianMon 24 Sep 2012
If the map has these characteristics:
is really only written infrequently
it is not too big (say less than 10,000 items)
your values are immutable
Then I think the most efficient design is keep the map accessible as an AtomicRef using Map.toImmutable. Then have a single actor control the writes.
Akcelisto Sun 23 Sep 2012
I have a mutable map in web app. The mutable map has many reads and rare changes. Actor encapsulates state of map ( #1186 ). Actors enqueue reads and writes in single thread.
How to make writes serial and make reads parallel?
Is this question matter? What is throughput on reading of singleton map pattern?
brian Mon 24 Sep 2012
If the map has these characteristics:
Then I think the most efficient design is keep the map accessible as an AtomicRef using Map.toImmutable. Then have a single actor control the writes.