amrkhaledccd / One-to-One-WebSockets-Chat

Building Persistable One-to-One Chat Using Spring Boot and WebSockets
230 stars 131 forks source link

pulling all users #15

Closed HalilAlgan closed 2 years ago

HalilAlgan commented 2 years ago

hello, in getUsers you pull all the users from database, right? is it good when you have too many users in your database?

amrkhaledccd commented 2 years ago

Yes, that is correct. This project is just a proof of concept and not production ready. of course, you'll need a pagination in case of too many users.

HalilAlgan commented 2 years ago

sorry, but i dont think pagination will solve the problem. is it possible that when we click on a message and take senderId or receiverId as contactId. Or when we send first message to a user by useParams and save the user as a friend in database. after we click the message and pull friends for contactId. Which of two these ideas can be better? Also thank you for your answer.

amrkhaledccd commented 2 years ago

getUsers is used to pull all the users when you open the chat app.

in this project, the friends feature is not implemented, so, you need a way to display all the users, so you can start chat with them.

As I mentioned it is just a prof of concept, not a complete project.

HalilAlgan commented 2 years ago

I see. Thank you for your quick answers.