SCJP, SCJD,SCWCD,SCDJWS,SCEA 5 MCP-C#, MCP-ASP.NET - http://www.khaledinho.com/
Life is the biggest school
SCJP 1.4,<br />SCJD (URLyBird 1.2.1, JDK 5.0)
SCJP, SCJD,SCWCD,SCDJWS,SCEA 5 MCP-C#, MCP-ASP.NET - http://www.khaledinho.com/
Life is the biggest school
SCJP, SCJD,SCWCD,SCDJWS,SCEA 5 MCP-C#, MCP-ASP.NET - http://www.khaledinho.com/
Life is the biggest school
I think it is very important to distinguish between these two because they are logically different.
Another thing i want to take advice for:
At the current stage i am trying to get all the logic for the DBEngine that will access the file.Then start to think about networking issues and then about the G.U.I and do the software design and then coding.What do you think??Actually this is the first time in my life that i work on such a project.What do you think???
For protecting against dirty reads i am thinking of implementing a read manager
But even if the user is going to add a new record which it could be a future enhancement,i dont imagine how a create record operation would cause the whole datafile to be corrupt by adding only half a record.
SCJP 1.4,<br />SCJD (URLyBird 1.2.1, JDK 5.0)
SCJP, SCJD,SCWCD,SCDJWS,SCEA 5 MCP-C#, MCP-ASP.NET - http://www.khaledinho.com/
Life is the biggest school
For the adding process i am also thinking of implenenting a read manager.Any client who wants to add a new record to the file has to ask the record manager for an empty record the read manager allocates space in the file for the that thread an returns the location in the file where to insert that new record.
SCJP 1.4,<br />SCJD (URLyBird 1.2.1, JDK 5.0)
For example in my application I only allow one thread at a time to physically read or write to the DB file (to avoid corrupting the DB file), but the actual read and update methods can be called by multiple threads and anything that doesn't involve physical reading/writing (such as constructing the stream of bytes for a record or processing a previously read stream) can be done concurrently.
Client A requested to read record Z and got 5 as its id
Client B books the record to be deleted and deletes the record
Client C adds a new record to the database in the same position as record Z
Client A now wants to update record Z.Client A does not know that record Z has been brutally deleted by Client B and client A will think that the new record is record Z because it is placed in the same position.Client A will think it is updating record Z which was deleted and he didnt know at all about what happend.
SCJP, SCJD,SCWCD,SCDJWS,SCEA 5 MCP-C#, MCP-ASP.NET - http://www.khaledinho.com/
Life is the biggest school
SCJP , SCJD. (IBM 142 in progress).
For example in my application I only allow one thread at a time to physically read or write to the DB file (to avoid corrupting the DB file), but the actual read and update methods can be called by multiple threads and anything that doesn't involve physical reading/writing (such as constructing the stream of bytes for a record or processing a previously read stream) can be done concurrently.
SCJP, SCJD,SCWCD,SCDJWS,SCEA 5 MCP-C#, MCP-ASP.NET - http://www.khaledinho.com/
Life is the biggest school
SCJP 1.4,<br />SCJD (URLyBird 1.2.1, JDK 5.0)
Don't play dumb with me! But you can try this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|