[mythtv-users] Myth Viewing Habits Databasae

Ben Brown mythtv at handcoder.com
Wed Mar 3 13:31:09 EST 2004


Eric

Good idea moving this to a new thread.  I get lost trying to dig my way 
through posts.

Instead of using wput and ftp, why not have the scripts send the 
information via a standard HTTP post.  Since myth uses XMLTV libwww is 
installed on any myth server.  Just write a perl script that queries the 
MySQL DB locally and submits the data via a post to another script 
residing at server XYZ.  This would cut out needing  an additional piece 
of software, and allow a flexible interface for submissions.  If someone 
didn't like the DATAPOST script they could craft their own.  Then they 
could just regex out any data they didn't want to come across.  (Make it 
easier to keep that nasty pr0n habit a secret  ;) ).

Using  a script like this would also work out you ID problems as the 
script could return true, false, or new_unique_id depending on what is 
returned the local script could store the  id and reuse on the next 
submission.

I can see your point about fleshing it out via php for a proof of 
concept, but for it to really be production ready I still think it needs 
to tie to the frontend.  You may not have a monitor or keyboard hooked 
up to your backend, but the frontend is still telling it what to record.

Also I think it should start out as a "Pay to play"  The system won't 
work if people don't submit data, so to start off people who want to see 
what's being recorded need to submit their data.  Once the database has 
enough info in it, you could start opening up anonymous traffic.

Ben

zaphod at comcast.net wrote:

>Ben, 
>
>Agree with you that eventually this should be completely integrated into Myth so that I can access the information it provides me with my remote.  There is a lot more to that than PHP and database development.  I think the underlying framework can be worked out successfully and a more flexible PHP/web environment.  Once the foundation is in place someone can help integrate it into Myth GUI system.
>
>When you say "from my actual myth box", remember that many people have no keyboard, no mouse.  My master backend doesn't even have a monitor of any type.   Preferably the script should run from your master backend (or mysql server if separate) without human interaction.
>
>Client Side:
>1) Output Title list to file:
>mysql> select distinct title from . . .
>2)  Upload file to centralized database, this looks promising: http://itooktheredpill.dyndns.org/wput/ 
>3)  Still need a way to identify uploads . . . .
>4)  Download requested info
>
>Server side:
>1) Check anonymous FTP directory for submissions (cron)
>2) Error check, parse, add to database (or update old submission)
>3) Provide requested info
>
>Oversimplified, yes, but should demonstrate solid proof of concept before integration with MythFrontEnd.
>
>-Eric
>
>  
>
>>A couple of issues I thought about.
>>
>>Let me preface this by saying I don't really do any PHP development.  
>>All of my development is ASP and VBScript.  If some of the problems are 
>>already taken care of by PHP functions just let me know.
>>
>>First, I'd like to be able to use this from my actual myth box not from 
>>a browser on another box.  if it's integrated into mythweb, then that 
>>would not be very easy to do.  We could use mythbrowse(?), but then why 
>>would it need to integrate to mythweb. 
>>
>>Second, If you use a browser and cookies, you have to consider how you 
>>would make the submission of data in the first place. I guess mythweb 
>>could pull the data out and submit the data for you, but how would you 
>>handle keeping the cookie persistent since the browser was doing the 
>>submission the script was. You could catch the cookie data and store it 
>>in a local file, but that is really more than I think we need.  I think 
>>an easier way may be to just generate a unique ID and return that the 
>>first time someone makes a submission.  Your local client could then 
>>store that and use it for future submissions. 
>>
>>Another suggestion would be to not make a submission valid until the 
>>user has made X number of submissions.  This may cut down on bad data.
>>
>>Ben
>>
>>
>>
>>zaphod at comcast.net wrote:
>>
>>    
>>
>>>Ben - 
>>>
>>>I think your right, this should be fairly easy to handle on a database.  I see 
>>>      
>>>
>>it being an add-on module to Mythweb to begin with.  I've been thinking about 
>>setting up a database on one of my web hosts for this very idea.  
>>    
>>
>>>I was leaning toward using a non-expiring cookie to identify returning users, 
>>>      
>>>
>>you would expire non-returning user entires from the database after some period 
>>of time.  Now that I am writing this it has its own set of issues . . .
>>    
>>
>>>Wasn't sure how to handle a global user base, it may not matter as the shows 
>>>      
>>>
>>watched will naturally sort them into different demographics I think.
>>    
>>
>>>Eventually it would be nice to integrate a nightly upload to the database into 
>>>      
>>>
>>myth's cronjob, this will generate a larger, more accurate database to score 
>>from.
>>    
>>
>>>-Eric
>>>
>>>
>>>
>>> 
>>>
>>>      
>>>
>>>>The database thing doesn't really seem that hard to me. Are there 
>>>>specific concerns you see or problems that I might be missing?
>>>>
>>>>Ben
>>>>
>>>>   
>>>>
>>>>------------------------------------------------------------------------
>>>>
>>>>_______________________________________________
>>>>mythtv-users mailing list
>>>>mythtv-users at mythtv.org
>>>>http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>>>>   
>>>>
>>>>        
>>>>
>>_______________________________________________
>>mythtv-users mailing list
>>mythtv-users at mythtv.org
>>http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>>    
>>
>>------------------------------------------------------------------------
>>
>>_______________________________________________
>>mythtv-users mailing list
>>mythtv-users at mythtv.org
>>http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>>    
>>



More information about the mythtv-users mailing list