• Post Reply Bookmark Topic Watch Topic
  • New Topic

NX: File Synchronization #3  RSS feed

Javini Javono
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is not a question, but an outline of how I intend to
proceed as concerns file synchronization issues. Your
comments and suggestions are welcome.
1. My server will contain basically two objects: a front end
and a back end. Initially, I'll be concerned with creating
multiple threads and pounding them against the back end which
communicates with the DataController which in turn communicates
with the singleton Data class which in turns references one
RandomAccessFile. The server and the file are always on the
same computer and the same JVM.
2. Initially, I'll not have any synchronization within DataController
when I throw multiple threads at it, because I want to see the
system fail or throw exceptions due to synchronization problems.
That is, I want to learn about this issue hands-on.
3. The Windows OS is a particularly good environment for this type
of testing since is time-slices the multiple threads, so you are
hopefully bound to get some nice, juicy errors.
4. Then, I'll appropriately synchronize the methods in DataController
and see if most of the synchronization errors go away.
5. Finally, even though the above testing scenarios will give me
some confidence in my software, it is not considered a definitive
test, for I have read that one needs to sit down and think about
these threading issues to see if some type of dead-lock situation
is lurking in the design, even though you can't reproduce the error
during testing.
Javini Javono
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!