[mythtv] Help with mythprotocol

Robert Johnston anaerin at gmail.com
Tue Nov 15 20:55:13 EST 2005


On 11/15/05, Devan Lippman <devan.lippman at gmail.com> wrote:
> regardless, would it be unacceptable to modify the protocol to allow clients
> to request an XML stream instead?  So for example they could log in and then
> send a command to switch formatting to XML?

The problem with XML is that it's an insanely wordy system to use for
Data transfer, so instead of using something like:

1, 1600, 1700, 34, WXYZ, "This is a program name"...

Which takes up 50 bytes (49 characters, 1 EOL), you would prefer to use:

<ProgramGuide>
   <Program id="1">
      <StartTime>1600</StartTime>
      <EndTime>1700</EndTime>
      <Channel id="34">WXYZ</Channel>
      <ProgramName>This is a program name</ProgramName>
   </Program>
</ProgramGuide>

Which is 223 bytes, that's over 400% larger.

Now, if you were dealing with 3rd-party programs that hooked into the
Myth control streams, I'd say that having them as XML would be a good
idea. But as the only things that are meant to be interfacing with the
Frontend and/or backend processes are other frontend/backends, there
is no reason to make the communication any more wordy or complex.

XML is good, don't get me wrong, and it definately has it's place.
However, for inter-process communication the creation, communication
(Because of XML's extra size) and interpretation overheads make it
unwieldy and wasteful of resources.

IMHO, IANAL, RTFM, BOGOF etc.
--
Robert "Anaerin" Johnston


More information about the mythtv-dev mailing list