Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Design question regarding B&S

 
Samuel Ittera
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just wanted to know what you think about my approach.
I am planning on creating a Contractor class which holds the record information. Also I plan on creating a cache hashmap, which will hold all the contractor classes and the additional db mete data (fields and size). When the application starts, it will read the db file and create Contractor classes and add it to the hashmap cache (ignoring the deleted files). When the server shutsdown, I plan on using the serialization routine (which I will write) to write the whole hashmap to the db file. So bacically I can use the HashMapCache class's readObject to read the db file and the writeObject to the write back to the db file?

Thanks for your advise in advance.
 
Bob Nedwor
hangman
Ranch Hand
Posts: 215
Eclipse IDE Oracle Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bad call. I would never do anything like that.
[ June 09, 2006: Message edited by: Bob Nedwor ]
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd call that rather insecure. What if the server crashes, all your changes will be lost.

That's a major weakness of all memory resident databases in fact.
 
Joseph Schulz
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Samuel,

Just some thoughts ...
I actually thought about using the same design/approach but dropped it after doing some thinking ...
I think it seems to be much easier to implement but it would be harder to "align" with the provided interface...
So, I am back to doing it all via arrays as oppose to much easier custom objects.

I am very interested in hearing other design approaches/alternatives...

Cheers,
Joseph

[ June 14, 2006: Message edited by: Jozef Stawarz ]
[ June 14, 2006: Message edited by: Joseph Stawarz ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic