Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
b2plane63891y@retoor amazon netflix spotify google facebook instagram and lots of medical hospital websites use java spring boot
-
For a personal project it doesn't really matter. Almost anything can get the job done. Just go with something you understand and is easy to use.
For my first chat app I stored everything in JSON files, because that was all I knew.
Only use some specialized tools if you specifically want to learn it or if your app is supposed to handle millions of messages per day. -
hjk10156961yDoes your backend need to scale horizontally? What is your load? Do you need to have guarantees or constraints?
Do you need massage persistence (history/offline delivery)? Are there DM's are there channels? Does it need to support IRC or XMPP?
So many things that can influence the implementation. Perhaps you can ask GPT -
Instead of spring boot I'd recommend micronaut.
Their approach is cleaner regarding modularity.
Regarding Redis / Kafka....
I'm pretty sure we had this discussion before.
The question remains what you want to achieve. -
b2plane63891y@pythonPlusPlus this is not a personal project im trying to build a real life production ready saas
-
b2plane63891y@hjk101 i asked those questions in chatgpt already. In a battle of using kafka vs redis vs socket.io vs rabbitmq chatgpt chose socket.io. Which is the easiest to implement tbh. I implemented it and it works. But im not sure what is the proper way to do it.
With socket.io i listen to events that are emitted from the frontend or postman (lets imagine this as if someone sent a chat message from the website). The chat message receives on the backend and then the backend is supposed to process that chat message and forward it to the receiver.
But what if there are 1 million users? That means the backend would transmit 1 million times a chat message just so it can be received to 1 user. And it would do that for every single message
Dont know if im missing something or if my logic is flawed. But this sounds like a very bad way to do it for performance -
b2plane63891y@IntrusionCM spring boot is my main backend technology stack i use. I dont know any other backend as good as SB
-
hjk10156961y@b2plane there is no defined proper way to do things. It really depends on your situation. Don't optimise for billions of users if you won't even realistically get 10000 concurrent users.
I've just read some documentation. Don't rely on me or an auto completion agent to do the work for you. Do you own investigation and ask specific things.
Socket.io looks really good as the transport for chat. Even if your service goes beyond so you need to scale horizontally (this is quite a hard problem due to client connections being spread and still needing real time communication) there are adapters to help with that.
The ease of use and robustness like auto connect is really nice. Ideally I would get something better than spring boot due to the slow startup times. I would use a single instance that can be restarted instantly. Giving sub second delay in deployment or failure. If I would truly need even higher standards and redundancy. Than 3 instances with connection transfer (during roleout or issues clients would be seamlessly transferred to the other instances) would be the way to go.
Can someone send me a guide article or tutorial how to build a chat app with kafka/redis in spring boot?
Should kafka or redis be used?
Or something else?
Also in a chat app should i store messages in postgres or not?
I cant find 1 fucking course or guide how to PROPERLY build a chat app
rant