This Java-based chat project is designed to provide a real-time messaging experience using an IRIS Cloud SQL database. The application integrates with ChatGPT for enhanced chat functionalities and utilizes Liquibase for database migrations.
Real-time chat functionality.
Integration with ChatGPT for intelligent responses.
IRIS Cloud SQL for data storage.
Liquibase for managing database schema changes.
Java Native API
Before running the project, make sure you have the following installed:
Java Development Kit (JDK) 11
Cloud SQL deployment
Docker (Optional. If you do not have IRIS Cloud SQL deployment)
You must select the appropriate branch based on your storage choice. Opt for the ‘master’ branch if you’re utilizing local storage and the ‘cloud’ branch for CloudSQL storage. While the functionality remains consistent across both branches, it’s essential to note that Cloud SQL lacks support for Globals. Consequently, the Java Native API won’t function in this scenario. We address this limitation on the ‘cloud’ branch by using a dedicated table instead of Globals.
Also, there is a difference in how the application is connected to the ChatGPT. On the ‘cloud’ branch, we are using ChatGPT`s client, on ‘master’ - Java Gateway Service together with Java Native API.
Step 3: Setup the IRIS storage
You have 2 options to set up IRIS storage:
1. IRIS Cloud SQL
Register on IRIS Cloud SQL and create the Cloud SQL deployment (it can be a trial period). After the account creation follow the instructions to access the cloud storage.
2. Local IRIS (with Java Gateway service)
Run Docker (Note: change IRIS password after starting containers):