A client-server based asset trading system for use with an organisation. Allows units within an organisation to trade assets they produce/need on a platform similar to a stock exchange. The client is a simple interface that allows users within an organisation to buy and sell assets the unit they work within own. Admin users can also create new units, assets and users. Uses threads to allow multiple clients to connect simultaneously. Also performs the matching of trades and handles the connection to the database.
- Install MariaDB from this location.
- During install, take note of the port MariaDB listens to. Also make sure you remember the password you use for the root user.
- Hopefully the dependencies should already be present for Java to talk to MariaDB. If not, go to
File -> Project Structure
clickLibraries
click the plus icon and search fororg.mariadb.jdbc:mariadb
and choose the most recent stable build. - Add the required details to the dbserver.props file (port, username and password)
- Ensure a MariaDB server is running and you have the correct port and login details recorded in the dbserver.props file.
- Run the
main
method in theRunServer
class. This should auto-create the schema and tables in the database, as well as a default unit (IT Admin) and default user (username:admin
password:password
). - Run the
main
method inAssetTradingGUI
to use the client side of the project. You can allowAssetTradingGUI
to run multiple instances to simulate multiple clients being connected to the server at once.