File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Performance and the fly likes Optimal Data Structure for Concurrent Reads and Writes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Performance
Bookmark "Optimal Data Structure for Concurrent Reads and Writes" Watch "Optimal Data Structure for Concurrent Reads and Writes" New topic
Author

Optimal Data Structure for Concurrent Reads and Writes

Tanujasri Bhatkal
Greenhorn

Joined: Aug 12, 2013
Posts: 1
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

Joined: Oct 01, 2001
Posts: 2771
    
  10

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

Joined: Mar 17, 2011
Posts: 7064
    
  16

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

Isn't it funny how there's always time and money enough to do it WRONG?
Artlicles by Winston can be found here
 
wood burning stoves
 
subject: Optimal Data Structure for Concurrent Reads and Writes
 
Similar Threads
Multi-threading and xml
Concurrent Collections vs Unsynchronized Collections
XML - CSV ... Performance related question.
Nested Locks
algorithms, data structures