1

I'm looking to add persistent server storage to a simple Node.js WebSocket chat server.

For a peer-to-peer marketplace app (like Airbnb) that's hosted on Amazon AWS, what's a great way to store direct messages between users?

The ability to search messages is not a necessary feature.

I would just like to retrieve the last, say 50, messages (with paging) of each specific chat.

I'm storing the users in PostgreSQL, but I think there might be a better way to store the messages.

Community
  • 1
  • 1
ma11hew28
  • 121,420
  • 116
  • 450
  • 651
  • 1
    Related: http://stackoverflow.com/questions/7063051/best-way-to-store-chat-messages-in-a-database – ma11hew28 Mar 06 '14 at 04:24
  • 1
    Related: http://stackoverflow.com/questions/3094495/db-schema-for-chats – ma11hew28 Mar 06 '14 at 04:29
  • 1
    Related: http://stackoverflow.com/questions/8655765/chat-server-whats-the-bestoptimized-way-to-save-a-conversation-log – ma11hew28 Mar 06 '14 at 04:49
  • Related: http://stackoverflow.com/questions/13230708/best-way-to-store-chat-messages-and-files – ma11hew28 Mar 06 '14 at 04:53
  • Related: http://stackoverflow.com/questions/9953786/what-is-a-good-idea-to-save-chat-data-in-database – ma11hew28 Mar 06 '14 at 04:58
  • Related: http://stackoverflow.com/questions/21775631/which-nosql-database-is-best-to-store-chat-messages – ma11hew28 Mar 06 '14 at 04:59
  • 1
    A lot of XMPP implementations that I've come across all just use standard SQL back-ends and that seems to work fine. DynamoDB is gonna be fast, simply because it is on SSDs and you don't need to do anything to maintain it, so maybe that's the route for you to go. If you wanna spend a lot of money you can use AWS RDMS and have a managed sql db that is probably going to be optimized and will also scale. – user602525 Mar 06 '14 at 05:30
  • 1
    As a side note, I helped build an app that is using Openfire XMPP server to serve several thousand clients, many of which are using the XEP group chat feature, I have seen as many as 50 people in a single group chat - this is all done in Postgres, I haven't seen any performance problems. – user602525 Mar 06 '14 at 05:33
  • Related: http://stackoverflow.com/questions/16450223/ideas-for-scaling-chat-in-aws – ma11hew28 Mar 06 '14 at 19:24

0 Answers0