This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Optimal Data Structure for Concurrent Reads and Writes

 
Tanujasri Bhatkal
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
Which is the most optimal, performance efficient data structure available in java for concurrent read and writes with and without hashing, such that concurrent reads always return concurrent writes?
 
Greg Charles
Sheriff
Posts: 2984
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, and welcome to Java Ranch!

The problem with this question is that it sounds very much like a homework assignment, and we're very sensitive about being asked to do other people's homework for them. Maybe you could discuss some of the possible architectures you have in mind, and which one you think would be best.
 
Winston Gutkowski
Bartender
Pie
Posts: 9472
50
Eclipse IDE Hibernate Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tanujasri Bhatkal wrote:Which is the most optimal, performance efficient data structure available in java for concurrent read and writes with and without hashing, such that concurrent reads always return concurrent writes?

Welcome Tanujasri.

I'm afraid your question doesn't have any meaning without some context. The fact is that concurrent reads can't always return concurrent writes because they're concurrent (unless you have some sort of queuing system that prioritises writes over reads, which seems a bizarre thing to do). The best you can hope for is some guarantee of consistency; and that, again, will depend very much on context.

As Greg says, some idea of what you've researched would be helpful.

Winston
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic