Tuesday 9 June 2015

Library App

Hi folks!

This second entry will detail a small project I've been working on lately, simply titled the "Library App", which you can reach here.

Based on the previous "College App", this project is essentially the same idea, rebuilt from the ground up with several extra features.




Previously, the college app (A project I did in the second year of my undergrad) was a CRUD app that stored video game objects to a file on disk, using swing as the front-end. This has been changed to use Java FX as the front end, the file has been replaced with a MySQL database, several new features have been added, and I am currently seeing if I can fit any algorithms in.

The general idea behind the application is that it currently connects to a database on localhost (jdbc:mysql://localhost:3306/library) to retrieve a list of books. From there, you can manipulate the data set on your machine before writing it back to the database. The implications being that this application can be scaled up, so that it will be possible to have several installations running on several different devices, all connecting to a central database that requires users to login and specify the database that they wish to connect to. I am aiming for extensibility with this project more than anything else.

The fun part will be solving concurrency between users reading/writing to the database. Pessimistic locking will work, but is not ideal. On a larger scale, it would result in a lot of dirty reads as the writes piled up waiting their turn. This means a lot of waiting on the end-users behalf. I think I'll implement optimistic locking (Basically trusting that the data will not be altered right up until the user in question updates it), despite the greater difficulty in implementation.

This should be an interesting opportunity to flex my DBA muscles...

No comments:

Post a Comment