These are chat archives for P2PSP/MediaSources-server

6th
Mar 2017
Abhinav Gauniyal
@agauniyal
Mar 06 2017 17:52

@cristobalmedinalopez yes I saw that, but I was interested in knowing how much work has already been done here since chat transcripts above suggest some work has already been completed.

Explanation: At its current state, the Splitter - which handles the team of peers - needs to be connected using an IP and Port which must be either fixed or previously agreed for both streaming video and peer connection. Which we want to accomplish here is to have a wrapper WebService that can receive the video through an HTTP request - or any other way that can easily get through NATs-, create an Splitter instance and redirect the video to it, assigning a 'friendly URL' to it that can be easily shared. When this URL is visited, it will reply with the IP and port that the peers need in order to connect to the Splitter.

I'm guessing that for this topic we would need to change cpp implementation as well (ofc along with Web API)? Or the functionality for creating Splitter instance dynamically exists already?

Abhinav Gauniyal
@agauniyal
Mar 06 2017 17:58
Also do we need to develop frontend UI as well?
Abhinav Gauniyal
@agauniyal
Mar 06 2017 18:09
I took a look inside lib/channel.js and it seems to do nothing much :worried: like channels is an empty object {} and all other methods are actually performing operations on it which results into nothing :sweat_smile:. Where actually is channel = {} being modified/filled by?
Abhinav Gauniyal
@agauniyal
Mar 06 2017 18:15
What are browser/node runtime requirements for this task? Can we use nodejs v6 since it is the current LTS version and v7 is out for sometime and v8 is nightly currently. http://node.green/
Cristóbal Medina López
@cristobalmedinalopez
Mar 06 2017 19:42
You are right. Please, let me share your questions with other mates who could be mentor of this idea. They will give you a better answer. @jpgarciaortiz @vicente-gonzalez-ruiz
JP
@jpgarciaortiz
Mar 06 2017 20:40
@agauniyal , maybe it'll be required to make some modifications in the core for this, but it's not the main work at all
the current code is mostly a concept, there is not much work done yet for this idea
and there is no special requirement for a specific version of node.js
an UI/frontend would be indeed very interesting
Abhinav Gauniyal
@agauniyal
Mar 06 2017 20:54
@jpgarciaortiz thanks, so what I get from replies is - there would be a core/console program with source + splitter(s) already running on the system - say on localhost:12000. Now we will run our server which will be visible to outside world so say - 0.0.0.0:80 or through some proxy, and on running it will take an address which will be the already running core/console at localhost:12000. Now we need to ask(poll) core/console for list of splitters and generate a unique "friendly url" for each of them so that user can visit www.p2psp.com/44z12 and get response an ip:port of that actual splitter so that it can start streaming video.
But I couldn't get this part - "create an Splitter instance and redirect the video to it" why do we need to create a new instance of it?
And for all of this, we need at least two api endpoints from core/console - list of splitters, create a new splitter if ^ is true.
JP
@jpgarciaortiz
Mar 06 2017 20:58
there must be an insteance of splitter per video source
Abhinav Gauniyal
@agauniyal
Mar 06 2017 20:59
Oh, so webserver can correspond to multiple sources. Yeah that was dumb of me :stuck_out_tongue:
JP
@jpgarciaortiz
Mar 06 2017 20:59
so the server must maintaint the list of splitters
yeah, that is; every source would have an "associated" channel
and it's that channel that should have a "friendly" URL
Abhinav Gauniyal
@agauniyal
Mar 06 2017 21:00
Now it makes sense!
one more thing, I'm midway through the docs so I might read it later but a channel can have multiple splitter?
JP
@jpgarciaortiz
Mar 06 2017 21:02
no
Abhinav Gauniyal
@agauniyal
Mar 06 2017 21:03
okay that'll make things a bit easier
I also saw sqlite being used in webserver, what needs to be persisted - those channels and their urls?
JP
@jpgarciaortiz
Mar 06 2017 21:03
a splitter per channel, in principle
yep, just channels, as a first thought, although we'll find something else later, so it'd be indeed interesting to be able to persist the info
Abhinav Gauniyal
@agauniyal
Mar 06 2017 21:05
Okay thanks a lot :D I'll head back to docs and keep submitting small PRs meanwhile
JP
@jpgarciaortiz
Mar 06 2017 21:06
good, thanks @agauniyal
Abhinav Gauniyal
@agauniyal
Mar 06 2017 21:07
Development of a tracker of splitters (see https://github.com/P2PSP/p2psp/tree/master/doc/P2PSP/TCS).
Explanation: A channel is associated to one or more splitters that stream the same content, in a synchronized way. In order to achieve a good load balancing among the splitters of the same channel, a tracker could determine (depending on the number of peers, for example, in each team) the a free splitter (team) and redirect the incomming peer to it.
Here "A channel is associated to one or more splitters that stream the same content" is what confused me :worried:
JP
@jpgarciaortiz
Mar 06 2017 21:09
well... that's also true...
but overall, that option would be the same as having just one splitter; with TCS, for one channel connection request, the server would ask for a splitter, and TCS would give one, that would be served to the client (peer)
with TCS the server would not maintain a list of splitters, but a list of "teams" of splitters
TCS is an idea for balancing the load along different splitters, for the same source