DEV Community

Discussion on: Build Video/Chat App with AWS Websocket, WebRTC, and Vue Part 1

kevin_odongo35 profile image
Kevin Odongo Author

Hey Joe

Let me do a video detailing this approach and I share to you to assist you through.

One thing with AWS Kinesis Video Stream there are a lot of hard limit. It is quite ideal for project like webcam ideally with one user as Master.

There is another AWS product AWS Chime that also offer Video and Chat. Ensure you go through the pricing because with AWS Chime there is no free tier.

With Video specifically if you are building from scratch and will be using WebRTC. AWS Websocket will handle the exchange of ice candidates. Another thing to keep in mind is how many will join the Video if it's more than 2 then consider deploying a Turn Server or getting a managed one this is because you will have to build a mesh architect and during video a lot is exchanged so you need an infrastructure that can scale.

The steps

@connect route - handle connection get connection id and persist in your db

@disconnect route - disconnected / in your case you won't need to clear the user or chat details because you are already using Cognito for Authentication which means this will be for only authenticated user. Have the logic on the front end for a user who created the chat to have a button to clear all conversation

@sendmessage route - You can add this route to separate your send message route. Another approach you can take is to listen to this route and fetch your Database for the new record when there is notification of activity.

Thread Thread
acijoe profile image
Joe Hummel

Thanks Kevin! I look forward to your video.

We are also considering AWS Chime. However, Chime doesn't provide the type of chat room features I'm looking to offer in a virtual event platform. Chime features seem well suited for our exhibitors - to allow attendees to start up instant Zoom-like meetings with exhibitor representatives. Doing this through Zoom requires a lot more prep and subscriptions.

Yes, I'm familiar with the costs for Chime, and found them to be pretty reasonable. We don't need daily use (yet), so the pay-as-you-use model may work out to be similar to costs to our current Zoom budget. Even if it results in somewhat higher costs, it would worth the convenience of having the service built into the platform, instead of linking in Zoom meetings now.

As far as number of participants, it depends. This could range from two to a dozen (maybe more) participants. For instance, take the case of a social/networking room for attendees to pop in at will, to virtually meet with other attendees or faculty, One person would start this as a host, and wait for people to drop in, over a period of time (say two hour windows).

Initially, this research into WebSockets was to provide a means to send instant messages or a bulletin board feature (stored alerts) for event attendees. There would be a notification icon on the header menu area, where messages from event management would be delivered and stored for attendees. The WebSockets would provide the instant delivery for online users. AppSync would store the messages and track read status for attendees/users. The video chatting is a feature we also wanted to add, but later, after we got familiar with this initial goal.

Hope this all makes sense. Happy to explain more, and provide access to the platform, if you're so inclined. It is a constant work in progress. We started building this last year, when the lockdowns started, and nobody wanted to meet in person.

Thread Thread
kevin_odongo35 profile image
Kevin Odongo Author

Hey Ian

Sorry for the late response why don't you reach me out on email ( crudavid36@gmail.com). Share the app link then we work together and add the functionalities you want