GithubHelp home page GithubHelp logo

seanperfecto / smalltalk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from victorli158/smalltalk

0.0 1.0 0.0 47.49 MB

JavaScript 0.60% Python 97.91% Java 0.01% Shell 0.03% Objective-C 0.22% C 0.35% CSS 0.26% HTML 0.57% Batchfile 0.01% GAP 0.06% C++ 0.01%

smalltalk's Introduction

Small Talk

Demo Page

Splash screen Home screen
video categories

Small Talk is a mobile video chat application that allows users to connect to other users via common subjects. With our category filters, our goal at Small Talk is to allow strangers to bond over similar interests.

Technologies Used

The backend API was built using Python's Django framework while the frontend was constructed using React Native. React Native is useful for building performant iOS and Android apps. Transition and loading animations were incorporated to offer a polished experience for our users.

Other technologies implemented include:

  • WebRTC
  • websockets

Features

WebRTC

To establish a video and peer-to-peer connection, WebRTC was implemented on top of Django Channels. WebRTC is a technology that allows for peer-to-peer teleconferencing without requiring the user to install plug-ins or any other third-party software. It's made up of a number of APIs and protocols that operate together in order to make this possible. Most notably, the RTCPeerConnection interface represents the connection itself - mapping the local computer to the remote peer. This object provides methods to connect to a remote peer, maintain and monitor the connection, and close the connection once it's no longer needed. The process of connecting peers initially takes place through an external signaling server, where WebSockets are used to exchange important information about each user's media and connectivity options. Whereas the recipient of the connection is typically explicitly specified by the user before the connection is made, our application does this work on the backend.

Django Channels

video

In order to implement WebRTC, it was necessary to set up a signaling server so that two users could establish a peer to peer connection. This involved implementing Django Channels, which handles WebSocket connections. Redis was used for the channel layer, and a Daphne interface server was used in order to support both HTTP and WebSocket requests. Additional single-threaded worker servers were also set up in order to speed up response time and prevent hanging.

Upon the initial handshake, users are dynamically placed into chatrooms with each other (with a maximum of two users per chatroom). A "connection" model was created to store these chatrooms in the database to maintain a reference to each chat and each user in the chat (via foreign keys). Because only the initial request resembles HTTP, and the reference to current user lives in the cookies sent over HTTP, it was necessary to extract a reference to current user upon this initial handshake to associate it with the WebSocket reply channel. When a second user enters a chat, a message is sent to the group to begin Peer to Peer negotiations, after which the channel simply relays messages between the two users to mediate WebRTC negotiations until a connection is established. When a chatroom becomes empty, it is destroyed.

Future Implementations

Friendships

The friendships feature would allow users to add each other as friends if they would like to call each other for future chat sessions.

smalltalk's People

Contributors

victorli158 avatar mileshobby avatar seanperfecto avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.