• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

FBN : StandAlone mode

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
If we run the FBN assignment mode in the standalone mode then we are not using RMI or sockets.
If a user happens to start two clients from the same machine in the standalone mode. In effect we are having two JVM's running.
db.db file is part of client.jar
How do we make sure that we dont end up screwing the data file because our locking etc will be handled in the JVM.
In case of remote clients we can handle this because all our i/o access to the file is via one single class on the RMI server.
But in the standalone case havingmultiple clients.
we will definitely end up screwing the data file..
Any advises/suggestions/clues.
 
author and jackaroo
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Akshay
I dont think we have to worry about someone starting two separate applications using the same DB.
In the new assignment it is specifically stated that we dont have to worry about this.
Regards. Andrew
 
Akshay Sharma
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Then it should be fine.
Otherwise this will be really tricky.
But Andrew I am doing the old FBN assignment.
 
Andrew Monkhouse
author and jackaroo
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Akshay
Sorry I wasnt clear. I did see that you had mentioned that you were doing FBNS. I also did this. I did not try to handle the case where two applications could both write to the file at the same time.
My comment about the new assignment was just for information - if they have explicitly stated it is not required in the new assignment, then I think it is reasonable to assume the same for the old assignment.
Regards, Andrew
 
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I agree with Andrew.
Just make sure you explicitly state this assumption in the list of assumptions you include with your design choices document.
 
Akshay Sharma
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sure guys....
Thanks
 
Enjoy the full beauty of the english language. Embedded in this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic