LinuxMCE Forums

General => Feature requests & roadmap => Topic started by: gollywog on March 08, 2009, 04:39:26 pm

Title: Media Sharing
Post by: gollywog on March 08, 2009, 04:39:26 pm
Is there a way we can do some sort of media sharing accross cores? Ie have 2 or more cores connected over the internet via VPN or similar, then allow them to select media they like and copy to there local core? Also at the same time being able to restrict what media they can see to copy?

Gollywog
Title: Re: Media Sharing
Post by: colinjones on March 08, 2009, 11:07:17 pm
There are plenty of options out there for sychronising or replicating that can easily be done entirely outside LMCE. Any media remote from the LMCE core or MDs (the best place for it) say on a PC or MAC can be sync'd to a remote location using something like sync.live.com. NAS's often have replication tools, there are standalone, generic replication tools, or you could even build a batch script based on a command line tool like robocopy! Any media kept on a LMCE core or MD (not the ideal location) is shared out as a SAMBA share that you can see on your network - you can then have one of the above tools connect to/map that share and replicate in the same way. It would be nice if this functionality was built in, but like so many other nice-to-have functions, it isn't core to LMCE's function and can easily be achieved outside LMCE, so probably wouldn't be a priority ... horses for courses :)
Title: Re: Media Sharing
Post by: tschak909 on March 09, 2009, 03:34:38 am
we're accepting patches, as always. :)

-Thom
Title: Re: Media Sharing
Post by: donpaul on March 09, 2009, 05:50:41 am
Use samba to share the media between cores. Use the private user file structure to control permissions. If you are familiar with Linux, you could easily make this happen with the native Linux and LinuxMCE tools - all are already configured.
Title: Re: Media Sharing
Post by: colinjones on March 09, 2009, 06:17:41 am
donpaul - certainly possible to export a SAMBA share over a VPN encapsulated link to a remote system, however I see two problems with this approach. First, the VPN would be on the "external" side of the core and so require additional configuration to get this to work (and these types of changes are generally not recommended); and secondly, not everybody has a "dark fibre" Internet connection like you :) most people's bandwidth would be nowhere near sufficient to do anything practical with video...
Title: Re: Media Sharing
Post by: hari on March 09, 2009, 05:41:56 pm
rsync is nice, but not two way. Unison or sth like that could help.
Title: Re: Media Sharing
Post by: donpaul on March 09, 2009, 06:12:16 pm
Colin. I see where you are coming from, but VPN can put you on the internal network. It really depends on the setup. Toss openvpn on the core and you're all set. Also, gollywog didn't ask about streaming media over the WAN, but rather how to browse, select, and copy the media from one core to another. That can be done easily since samba and perms are already set up; there is no need to export anything. Just don't over complicate it.
Title: Re: Media Sharing
Post by: tschak909 on March 09, 2009, 06:21:34 pm
Why don't you guys talk about actually how to integrate it into the system, instead of duct taping it on?

Come on guys, stop thinking like typical Linux users.

-Thom
Title: Re: Media Sharing
Post by: hari on March 09, 2009, 06:31:22 pm
tschak, you could finish the bt integration and we'd have global media :-p

wait.. there is the copyright problem..

we could invent a system, where we don't copy but move data around. Very quick. Or spread the frames. I mean, you can only watch a single frame of a movie at one time :-) I shut up now before something starts to take this serious..

br, Hari
Title: Re: Media Sharing
Post by: gollywog on March 09, 2009, 08:16:30 pm
Yeah I was thinking something along the lines of OpenVPN on the core, as stated above, and something like rysnc/ssh etc to do a file copy. As this is a media copy/move the internet connection can be any size but the time to move/copy will change of course. Only thing i would need to work out is which protocol supports resume in case connection drops out. Does the core do QOS? Probably silly quesion as I have only just started looking. If so then we could set whatever protocol as lowest priority???

I'm sure I coud make it work from command prompt but unsure as to how to develope it as a "feature" any pointers on where to start looking and i'll be on my surfing way..

Gollywog
Title: Re: Media Sharing
Post by: hari on March 09, 2009, 09:05:24 pm
rsync supports deltas and has a switch for a bandwith limit.

br, Hari
Title: Re: Media Sharing
Post by: colinjones on March 09, 2009, 10:19:51 pm
Colin. I see where you are coming from, but VPN can put you on the internal network. It really depends on the setup. Toss openvpn on the core and you're all set. Also, gollywog didn't ask about streaming media over the WAN, but rather how to browse, select, and copy the media from one core to another. That can be done easily since samba and perms are already set up; there is no need to export anything. Just don't over complicate it.

Yes, it is possible .... just not sure how the pnp would play with it... however you need to read gollywog's post more carefully, he clearly states that he wants to connect the cores over the Internet


Is there a way we can do some sort of media sharing accross cores? Ie have 2 or more cores connected over the internet via VPN or similar, then allow them to select media they like and copy to there local core? Also at the same time being able to restrict what media they can see to copy?

Gollywog
Title: Re: Media Sharing
Post by: tschak909 on March 10, 2009, 12:37:24 am
Since the vast majority of us do not have net connections large enough to handle such traffic, we need to make some abstractions.

The _ONLY_ way this would work (and I'm NOT talking technically), is if this were rolled in as house to house communication.

DCE has a concept of sending messages to multiple installations, provided those installations are in the database.

So what would need to happen:

(1) a method of synchronizing installation information. sqlcvs could be adapted for this purpose, and in point of fact, in earlier versions of pluto, user databases were synchronized here. However, for this to be feasible, we would need...
(2) A method of providing access control to an installation. This would be an access control list pattern internally, but it would be represented much cleaner up top (who do you want in your circle to be able to expose media, do house commands, etc.)
(3) DCE already provides a Request File command in the General Info Plugin, this can be used to do the actual file transfer. We just need to...
(4) provide the plumbing. SSH might be beneficial for this., just need to work out key exchange.

Now, this presents a problem,

I know not all of you follow the rules when it comes to setting up the system, and you've got your core behind a firewall.

We get around this with Remote Assistance by providing a core-initiated SSH connection to a known server, and the technician then attaches to the provided tunnel on the server. This is not feasible however, for shoving huge amounts of datta down the pipe, as it would then clog the proxy.

But if done right, we can provide a series of screens where:

Connect to a House:
* Provide Installation ID
* Provide your user name
* Provide password

This would prompt a screen on the other end, authorizing the request.

The installation data would be sent to your core, and the system would then be able to send messages.

When a message needs to be sent to another installation, the system will refer to its keys and IP data, to build an ssh tunnel to the other system, if not active, and will automatically shut it off after a timeout.

Now, this is just the plumbing.

Orbiter needs to be extended to handle installation data. and to present the UI for more than one installation. This would also mean, that any changes between the schema of the installed devices, or generated orbiter pieces would also need to be propagated as well. This would happen automatically if all the data attached to an installation were brought into the transfer.

So, it would mean adding at the very least, a screen to switch installations, as well as synchronizing pluto_media data.

As well as doing some screen handling to determine if a file is local or remote, and to trigger download action, etc.

Just thinking out loud.
Title: Re: Media Sharing
Post by: donpaul on March 10, 2009, 03:46:14 am
Yes, it is possible .... just not sure how the pnp would play with it... however you need to read gollywog's post more carefully, he clearly states that he wants to connect the cores over the Internet

Is there a way we can do some sort of media sharing accross cores? Ie have 2 or more cores connected over the internet via VPN or similar, then allow them to select media they like and copy to there local core? Also at the same time being able to restrict what media they can see to copy?

Gollywog
Dude, I know it is over the internet - why else would he need VPN? My point is he isn't streaming - he wants to select and copy. Who cares about the bandwidth at that point. Let it copy all day - he never said he needed it to copy quickly, lol ;-) I always like the most simple approach, but Thom's way is better I'm sure!
Title: Re: Media Sharing
Post by: donpaul on March 10, 2009, 04:02:50 am
Why don't you guys talk about actually how to integrate it into the system, instead of duct taping it on?

Come on guys, stop thinking like typical Linux users.

-Thom


Wouldn't one core detect and add the samba share from another core if they are on the same network? Then add a Copy file to other directory in the media files sync web page (instead of only a move file to other directory). We could browse the remote share and copy media to local disk. That may be the easiest way to integrate it into the system.
Title: Re: Media Sharing
Post by: Marie.O on March 10, 2009, 02:40:42 pm
Why don't you guys talk about actually how to integrate it into the system, instead of duct taping it on?

Come on guys, stop thinking like typical Linux users.

-Thom


Wouldn't one core detect and add the samba share from another core if they are on the same network? Then add a Copy file to other directory in the media files sync web page (instead of only a move file to other directory). We could browse the remote share and copy media to local disk. That may be the easiest way to integrate it into the system.

Donpaul,

why don't you implement it, and let us all know, how good it works.
Title: Re: Media Sharing
Post by: donpaul on March 10, 2009, 02:48:58 pm
Donpaul,

why don't you implement it, and let us all know, how good it works.

I wish I could, or even had the skillset to. I can of course implement the linux portion, but the only coding I can do is perl and sh.
Title: Re: Media Sharing
Post by: gollywog on March 10, 2009, 03:48:52 pm
This is the exact reason this post is here. If I could do it, I would have done it, but because I can't, I'm asking for ideas/help. Donpaul is just throwing some suggestions into the ring and thanks mate, appreciated. I'm learning and once I have my core running I will be playing with my core and a virtualised core to see what we can do but like donpaul, I'm only a friend of linux and have very little experience in coding etc.

Thanks to all of the positive comments, this is why we are where we are. :) lets keep it rolling and make what is the best even better :D

Gollywog
Title: Re: Media Sharing
Post by: Marie.O on March 10, 2009, 03:56:12 pm
Donpaul,

why don't you implement it, and let us all know, how good it works.

I wish I could, or even had the skillset to. I can of course implement the linux portion, but the only coding I can do is perl and sh.

Donpaul,

that is all that is needed to implement your suggestion. Setup some vpn, setup up the remote servers in your local install, and you should be able to do what you suggested, i.e. move files between servers. Whether or not you will find this usable is another thing. I for one think that the connection speed WILL be the limiting factor.
Title: Re: Media Sharing
Post by: donpaul on March 11, 2009, 07:01:43 pm
A "copy to another location" in the media files sync would make this easy to integrate - but that part I do not know. A copy ability would be great for copying media from any share really.