Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How should I start coding a Skype like web application?

This is for a programming class I am taking. I fit the pre-requisites, which is just a strong knowledge in C++.

To clarify: This is not supposed to be a backend for a desktop application. The website does video chat, file sending, text chat, all in the browser.

So I have no web development experience. I have played with PHP before and looked at a JavaScript book and feel comfortable using them. I know what MySQL is and how to set up tables and stuff.

What I need to do in the next 8 weeks is:

  • Get video chat working (between 2 people)
  • Have a login page, each user has a profile and contact list
  • Text chat (between 2 people)
  • File Sharing (between 2 people)

I do not know what to use to accomplish this. I have some ideas, but I am not sure they would really work. I am allowed to use open sourced libraries, programs, code, etc. to build this web application.

If someone could steer me in the correct direction, suggest how I should implement these features I would really appreciate it.

Also while I have been googling and looking at how to do stuff like this, I saw something called CakePHP. Would you suggest I use this? If so, what exactly should I use it to do?

like image 962
Mandeep Singh Avatar asked Jan 26 '12 05:01

Mandeep Singh


1 Answers

You are going to need lots of coffee!

Skype uses a hybrid architecture of peer-to-peer and client/server methods to get data around. If this is going to only be run on an internal LAN, you don't have to worry about the server in the middle and can focus on setting up just a peer-to-peer connection.

In real world, where computers are hidden by your router by something called NAT, Skype uses servers for you to log into and set up an open port through your NAT. Then Skype sends this information to your other peer, and a peer-to-peer connection runs from there.

On an internal network, you can just communicate with others through an open UDP port. Skype uses this as opposed to TCP, with much of your other communication on the internet relies on. Basically, you don't get reliable delivery, and the applications on both ends adapt to this. (ie. Your video freezes up for a second when packets get lost or destroyed)

              SKYPE SERVER
                 /    \
                /      \
               /        \
              /          \
        PEER 1 --------- PEER 2

After you figure out how you will run through the network, you need to learn the Windows Image Acquisition API, which is a standard way of working with a web camera to acquire a still picture. You take enough of this pictures in a row and BINGO! You've got a hillbilly video stream to send over the network.

I assume MySQL will work good with a PHP published SOAP webservice to handle the login and contact database...

Why are you calling this a web application? Will it run inside of a web browser? It's just a network application, right?

One more piece of advice... Programming this in C# or some other .NET language might be helpful because there are a lot more controls available to you. For instance, there is a WIA control that will easily pipe the video stream into your application.

like image 187
psyklopz Avatar answered Nov 01 '22 10:11

psyklopz