Hi,
I'm writing the software to control tills in a club that are networked together. The tills are to acts as slaves connected to a MySQL database on a backend server. All the sales will be recorded on the backend server. Also, the products and layout for the tills are stored in the MySQL db.
My thought was to connect to the db from the till at startup (of the software) and retrieve the till layout and product tables (only about 150 rows in the product table) and save this data into memory so that it can be accessed quickly (i.e. so that a request isn't send over the network to the MySQL server everytime a product button is pressed to retrieve product price etc).
What would be the best method for saving this data ? A datatable or a collection ? or something different. The tills are touchscreen and I'm planning on using the tag property to store the product id for each button. Therefore the stored data would need to be queried to return the product price, then the product id, name and price are added to another temporary data store, maybe an arraylist ?
Once the transaction is complete, the data is then sent to the MySQL server and stored permanently.
My main query is how to handle the data on the slave (till) machines ?
Any help/advice is much appreciated
Si
I'm writing the software to control tills in a club that are networked together. The tills are to acts as slaves connected to a MySQL database on a backend server. All the sales will be recorded on the backend server. Also, the products and layout for the tills are stored in the MySQL db.
My thought was to connect to the db from the till at startup (of the software) and retrieve the till layout and product tables (only about 150 rows in the product table) and save this data into memory so that it can be accessed quickly (i.e. so that a request isn't send over the network to the MySQL server everytime a product button is pressed to retrieve product price etc).
What would be the best method for saving this data ? A datatable or a collection ? or something different. The tills are touchscreen and I'm planning on using the tag property to store the product id for each button. Therefore the stored data would need to be queried to return the product price, then the product id, name and price are added to another temporary data store, maybe an arraylist ?
Once the transaction is complete, the data is then sent to the MySQL server and stored permanently.
My main query is how to handle the data on the slave (till) machines ?
Any help/advice is much appreciated
Si