Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chat Function #3

Open
ChristBKK opened this issue Jan 25, 2016 · 7 comments
Open

Chat Function #3

ChristBKK opened this issue Jan 25, 2016 · 7 comments

Comments

@ChristBKK
Copy link
Collaborator

Specifications:

  1. 1:1 real-time Chat , 1 User to another User
  2. Chats saved to MongoDB for 14 Days
  3. Button that can add photos, videos or smiley to a chat

Ideas:

  1. Check what Rocket Chat uses

  2. look up mongodb documentation for capped collections for "xy days". alternatively, you can use a background task (percolate studio has a package called synced-cron) to delete old messages.

  3. Check what Rocket Chat uses and how to integrate this multimedia feature

@serkandurusoy
Copy link

Question: do we want to abandon slack and implement chatrooms (group/individual) on the app itself?

@ChristBKK
Copy link
Collaborator Author

I just want to build a Chat 👍 with Meteor if we then use it as our own chat (when I understand that right?) is fine for me :)

@serkandurusoy
Copy link

Ok, since this github repository is all about the app we're building together and these issues are feature suggestions, let's treat chat as a part of the app.

Since we will have rooms of 5-7 people, we can actually start with using the collection api (mongodb) for delivering messages. But we can implement "streams" as an exercise for the "general" chatroom where the number of chat participants are likely to grow.

Also, capped collections have a downside, you cannot remove indivdual documents from them. So a user cannot delete their own message!

@kaiyes
Copy link

kaiyes commented Jan 27, 2016

I have implemented the chat functionality with socialize:messages package in one of my mvp which uses mongo to store and show messages. I even made a demo to help out others as the creator of those packages was super busy (he was super helpful !!). Here is the demo link https://github.com/kaiyes/chatDemo
http://chatdemo-social.meteor.com/
Also I tried vanilla meteor for chat which works just as fine for normal chat (including one to one chat).

But I would love to see the streams method because I want to learn how it works. I think In big apps, storing in mongo db can quickly become expensive, so streams sounds better.

I have a question to @serkandurusoy . Will we able to show a chat history if we use streams ? Or is it something like session so it doesn't store value in db, just streams for that session & values are lost as soon as window is closed.

@serkandurusoy
Copy link

you can use streams to bypass mongodb so that's the idea. But, you can also take a tiered approach where messages get delivered using streams, but the server saves a copy, where the chatroom can load "earlier" messages on demand, through a meteor method

@kaiyes
Copy link

kaiyes commented Jan 27, 2016

cool, exactly what I wanted to know. thanks

@ghost
Copy link

ghost commented Feb 5, 2016

or we could skip the server roundtrip alltogether, and implement some webrtc functionality for the chats. That would lay the foundation for video/audio interaction aswell

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants