first i made a slido-clone in mern stack thne i rewritten in the backend in java with…
- User
first i made a slido-clone in mern stack thne i rewritten in the backend in java with jersey and used MySQL now give a description why we switched from mern stack to java and MySQL give the pros and cons include in pro that we learned java and MySQL in the course itself and make note that we implemented the following things in the MySQL itself and not in java using some lib
- Creating Session token in MySQL itself. (With this user can login without need of password). This session token terminate after a day.
- Event Scheduling after few days Room will be automatically get deleted.
- Storing Encrypted password and text of user. And while recovering it we decrypt it.
- Procedures for adding user votes or likes to verify that user belongs to same room.
- Triggers for updating like_count etc.
- Checking for banned word.
- Save points, so to be sure that a query is fully executed. If not then just rollback.
- LOG FILE of Insert, Update, Delete query. now give me the a explanation which i can add in the ppt of the project the old description of the project is Authentication System Secure User Registration & Login: Ensures safe and authenticated user access through JWT (JSON Web Tokens). Password Encryption: Secures sensitive user credentials. Session Management: Maintains session persistence across user interactions. Room Management Unique Room Codes: Simplifies the process of creating and joining sessions. Session Control: Provides options for starting and ending sessions. Room Settings Configuration: Allows the host to customize session settings.
Interactive Features Real-Time Q&A Functionality: Enables instant question submission and answers. Live Polling System: Provides interactive engagement with real-time results. Anonymous Participation Options: Allows users to submit questions and answers anonymously, promoting comfort. Vote Tracking: Tracks responses to polls and questions for better audience insight. Frontend Development React with TypeScript: Ensures strong type safety and scalable frontend development. Tailwind CSS: Provides responsive design with minimal styling effort. Shadcn UI Components: Offers a consistent, modern UI/UX framework. Polling Mechanism: Enables real-time updates for dynamic content changes. Backend Architecture Node.js with Express: Handles API requests efficiently. MongoDB: A flexible NoSQL database for scalable storage and management of session data. JWT Authentication: Ensures secure user access with token-based authentication. Rate Limiting: Implements security measures to prevent misuse. Error Handling Middleware: Ensures proper handling of edge cases. Input Validation: Ensures data integrity and system reliability.
the new description of the project Authentication System Secure User Registration & Login: Ensures safe and authenticated user access through API . Password Encryption: Secures sensitive user credentials , encryption done in mySQL. Session Management: Maintains session persistence across user interactions. Room Management Unique Room Codes: Simplifies the process of creating and joining sessions. Session Control: scheduling the event of ending session in mySQL. option for voting: using trigger to increase the number of votes in mySQL . Interactive Features Real-Time Q&A Functionality: Enables instant question submission and answers. Anonymous Participation Options: Allows users to submit questions and answers anonymously, promoting comfort. Vote Tracking: Tracks responses to polls and questions for better audience insight. Frontend Development React with TypeScript: Ensures strong type safety and scalable frontend development. Tailwind CSS: Provides responsive design with minimal styling effort. Shadcn UI Components: Offers a consistent, modern UI/UX framework. Polling Mechanism: Enables real-time updates for dynamic content changes. Backend Architecture Java with Jersey: Handles API requests efficiently. mySQL: A vertical scalable, structured query language, great for strict relationship, faster than MongoDB. Authentication: Ensures secure user access with token-based authentication in mySQL database. Input Validation: Ensures data integrity and system reliability in mySQL database by defining constraints.
- Assistant
Why We Transitioned from the MERN Stack to Java and MySQL
Motivation for the Switch
- Educational Enhancement: Our course emphasized learning Java and MySQL, prompting us to adopt technologies that align with the curriculum.
- Enhanced Backend Capabilities: Leveraging Java with Jersey offered robust API handling and enterprise-level features.
- Structured Data Management: MySQL provided a structured relational database system, ideal for managing complex relationships and transactions.
Pros of Switching to Java and MySQL
-
Educational Alignment
- Gained proficiency in Java and MySQL, key technologies covered in our course.
-
Advanced Database Features Implemented in MySQL
- Session Token Management:
- Created and managed session tokens directly in MySQL, enabling password-less login with automatic termination after a day.
- Event Scheduling:
- Automated room deletion after event completion using MySQL scheduling.
- Security Enhancements:
- Stored encrypted passwords and user texts in MySQL, ensuring data security with decryption handled during retrieval.
- Data Integrity and Validation:
- Implemented stored procedures for adding user votes or likes, ensuring users belong to the same room.
- Utilized triggers to automatically update like counts and other metrics.
- Content Moderation:
- Enforced banned word checks directly within the database to maintain community standards.
- Transaction Management:
- Employed save points to ensure queries execute fully, with rollback capabilities for incomplete transactions.
- Audit and Logging:
- Maintained a log file for all insert, update, and delete operations, enhancing traceability and debugging.
- Session Token Management:
-
Performance and Scalability
- MySQL's vertical scalability and optimized query performance surpassed MongoDB for our structured data needs.
- Java with Jersey provided a more scalable and maintainable backend architecture for handling API requests.
-
Enhanced Security
- Token-Based Authentication: Managed securely within MySQL, reducing dependency on external libraries.
- Input Validation: Enforced data integrity through MySQL constraints, ensuring reliable and secure data handling.
Cons of the Transition
-
Increased Complexity
- Implementing advanced features directly in MySQL required deeper knowledge of SQL and database management.
-
Development Overhead
- Shifting to Java and MySQL necessitated rewriting existing backend code, extending the development timeline.
-
Flexibility Limitations
- MySQL's rigid schema compared to MongoDB's flexibility might limit rapid iterations and schema changes.
-
Learning Curve
- Mastering Java and Jersey, along with advanced MySQL features, demanded additional learning and adaptation.
Conclusion
Switching from the MERN stack to Java and MySQL allowed us to align with our educational goals, leverage advanced database capabilities, and enhance the security and scalability of our application. While introducing some complexities, the transition provided valuable learning experiences and robust system features that directly benefit our project's functionality and reliability.