LinHES Forums
http://forum.linhes.org/

Frontend/Backend duty clarification for newbie
http://forum.linhes.org/viewtopic.php?f=17&t=4608
Page 1 of 1

Author:  jmccorm [ Mon May 16, 2005 9:36 pm ]
Post subject:  Frontend/Backend duty clarification for newbie

I'm not seeing much information (especially in the configuration/hardware FAQs) about the role of the front end versus the backend, and how they communicate.

I understand it is the role of the back-end server to handle the video encoding. And I'll also guess database and recording management, guide management, etc etc.

I understand it is the role of the front-end server to get the audio/video stream from the backend, and decode and display it. (That answers my question about is the front end a dumb X display device or what it is.) So it accesses the backend for whatever it needs on the fly and doesn't require any significant storage? (Is this what they mean that a front-end can run on CD only then?) What exceptions are there (playing games like MAME?) Or is it common to use NFS?

So I'm guessing that the back end also acts like a database server and that all the smarts/interaction/logic for the front end runs on the front end? How are video streams actually transfered from the backend to the frontend? Via mysql? NFS? Something common? Something unique?

I understand that a frontend can be on a backend server, with the limit that if you become resource constrained, stuttering will be a result. (Assumption is that resource limitations aren't used, so stuttering will happen on playback and recording both.)

Multiple frontends? Can they collide with each other and screw things up? Do they play nice?

I wish there was a nice calculator to figure out what will take how much hardware you'll need for a config. I saw a few examples, but I was wondering more of recording two 1080i streams while playing back another. I'm assuming the recording side will be low because it is just a matter of pulling and pushing the MPEG2 stream from either a QAM/ATSC card or a firewire input. I'm assuming that 1080i output hardware requirements are very high based on my windows experience with codecs (besides WMV9... that thing is so CPU hungry it is unreal).

I suppose I'll also throw in a random question or two here. How stable / "production ready" would an HDTV setup be from a user's perspective? Can I inflict this upon someone who's best stretch has been a TiVo? From a sysadmin/dba perspective... can I run this with no database experience?

Author:  tjc [ Mon May 16, 2005 10:11 pm ]
Post subject: 

Client - Server 101

1) Client establishes a socket connection to the server. (MUCH handshaking and detail omitted)

2) Client makes a request by sending a message over the socket.

3) Server responds to the request by writing back over the socket.

4) Repeat steps 2-3 as needed.

In the case you're asking about the rquest is "please feed me this video stream" and the response is a whole bunch of data in a semi-continuous flow. The "flow control" is as simple as pouring water down a hose by filling a funnel. When the socket becomes writable (the funnel empties enough to be worth pouring more water in) the backend copies the requested data in until the "funnel" overflows or it hits some preset limit (I'm guessing here but it's a VERY informed guess ;-)). Oh and don't worry, nothing actually gets spilled when it "overflows", the backend remembers how much it wrote and continues from there when the socket becomes writable again. The front end reads the data as it needs it (like someone taking their thumb off the outflow end of our hose), and when it has read enough data the socket "unblocks" and becomes wrtitable again.

Author:  tjc [ Mon May 16, 2005 10:48 pm ]
Post subject:  Re: Frontend/Backend duty clarification for newbie

jmccorm wrote:
I wish there was a nice calculator to figure out what will take how much hardware you'll need for a config. I saw a few examples, but I was wondering more of recording two 1080i streams while playing back another. I'm assuming the recording side will be low because it is just a matter of pulling and pushing the MPEG2 stream from either a QAM/ATSC card or a firewire input. I'm assuming that 1080i output hardware requirements are very high based on my windows experience with codecs (besides WMV9... that thing is so CPU hungry it is unreal).

So many people try to squeeze the last dime out of the hardware costs by underspecing the hardware that I've got to take this as a oppurtunity to say that this is one of those cases where throwing a fairly small amount of money at the problem can make things much easier. Trust me, this is lesson I learned the hard way, I grew up with a thrifty (some would say "tight as a ducks butt") mindset, and I've been broke, and I know how hard it can be to justify spending "extra" money to yourself (or someone else) given either/both of those circumstances. However at some point two bits of wisdom connected in my head "life is about trading time for money, and money for time" and "sometimes throwing a surprisingly small amount of money at a problem will make it go away".

At this point in time the widely recommended 3Ghz P4 (for HDTV) costs under $190 (USD). Lets say you think you can squeeze by with a 2.4Ghz Celeron at ~$70, thats a $120 savings! But wait... How many hours is that at even (U.S.) minimum wage? $120/$5.15 ~= 24 hours... So if using the slower processor makes you blow even one extra weekend of your time, you lose... The moral of this story is (as I have to keep telling myself), try not to fall into the false economy trap....

Author:  jmccorm [ Tue May 17, 2005 8:36 am ]
Post subject: 

tjc wrote:
Client - Server 101


[nod] I wasn't looking for a TCP/IP primer as much as I was wondering the types, ports, protocols of communications that goes between the back and the front end. I understand they'll be a MySQL connection. What else? How are, say, photo album pictures transferred between the two boxes?

Author:  jmccorm [ Tue May 17, 2005 8:40 am ]
Post subject:  Re: Frontend/Backend duty clarification for newbie

tjc wrote:
So many people try to squeeze the last dime out of the hardware costs by underspecing the hardware that I've got to take this as a oppurtunity to say that this is one of those cases where throwing a fairly small amount of money at the problem can make things much easier.


Point taken. At the same time, though, I'd like to avoid signficantly oversizing a box to a point where I'm wasting resources.

tjc wrote:
At this point in time the widely recommended 3Ghz P4 (for HDTV) costs under $190 (USD).


Would that be for the frontend on an HDTV MythTV, a combined front/backend box, or something else?

Author:  Xsecrets [ Tue May 17, 2005 8:51 am ]
Post subject: 

other than the mysql connection pretty much everything else will run on nfs.

I wouldn't suggest anything less than a 3G PIV for any box that will be playing back hdtv. that's frontend only or frontend/backend. If you are going to skimp somewhere it can be on a backend only box. because using a pvr card or hdtv card uses very little processing power to record, but conciderable processing power to play back.

Author:  cesman [ Tue May 17, 2005 9:14 am ]
Post subject: 

The frontend and backend communicate w/ MythTV's own protocol. If you want to share video, music, photos, etc. then you need to setup NFS, SMB or something else. You should google for linhes.

Author:  shplad [ Tue May 17, 2005 2:17 pm ]
Post subject:  Re: Frontend/Backend duty clarification for newbie

I found this recently, and it helped clarify things a bit to see a graphic
representation (on the archicture overview page):

http://wiki.cs.uiuc.edu/cs427/MythTV+Architecture




shplad







[quote="jmccorm"]I'm not seeing much information (especially in the configuration/hardware FAQs) about the role of the front end versus the backend, and how they communicate.

I understand it is the role of the back-end server to handle the video encoding. And I'll also guess database and recording management, guide management, etc etc.

Author:  Xsecrets [ Tue May 17, 2005 2:27 pm ]
Post subject: 

nice link hadn't seen that one before.

Author:  tjc [ Tue May 17, 2005 9:16 pm ]
Post subject:  Re: Frontend/Backend duty clarification for newbie

jmccorm wrote:
tjc wrote:
At this point in time the widely recommended 3Ghz P4 (for HDTV) costs under $190 (USD).
Would that be for the frontend on an HDTV MythTV, a combined front/backend box, or something else?

Combo.

Author:  3ddd [ Sat Jun 04, 2005 10:14 pm ]
Post subject: 

And what about the original post's inquiry about MAME, etc? If you have a seperate frontend and backend, which one does MAME use?

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/