New Webinterface (1 Viewer)

Reon

Portal Member
July 14, 2007
12
2
Home Country
Norway Norway
Is there any documentation/specs/code about how this new webinterface connects to MP?

The old www.mp-webinterface.com projects consists of two parts as far as I can see.
- One pluggin to MP written in .NET and one written in PHP which is communicating with this pluggin and provides a user interface.
Is this correct?

The PHP interface is based on Mambo but that should not matter, it could be any PHP application.

Since the new TV Server is using a (My)SQL database to store scheduled recordings etc. as far as I can see, creating a simple web interface should be fairly simple. Or am I missing something important here ? :)

The reason why I am asking is that I need a interface for scheduling recordings via a mobile phone. Most likely customized to OperaMini since it accessible on most phones. Even my old SE k700i runs OperaMini, so I don't see any reasons in supporting WAP any more.
 

Maschine

Retired Team Member
  • Premium Supporter
  • June 15, 2004
    768
    86
    Germany
    Home Country
    Germany Germany
    The old webinterface was indeed split up into 2 parts: One part written in C# as a MP plugin, which kinda "mapped" the MP functions to expose them via a webservice and a frontend written in php. The .net plugin was necessary as php alone can't communicate with MP and tell for example that the DB was updated. The php part is not using Mambo at all, that's just the CMS for our MPW homepage.

    Your suggestion is not really good, as we would loose a big advantage of the TV server: database independence.

    For that reason I am working on a webinterface, based on asp.net. Yeah, I know that I'm saying this since quite some time now ;) but I'm still busy with it and some progress is made every now and then if my limited free time permits it.

    I'll definately keep you up to date if there are any news (a useable webinterface), but currently I can just ask for your patience.

    Maschine
     

    Reon

    Portal Member
    July 14, 2007
    12
    2
    Home Country
    Norway Norway
    Thanks for the response :)

    The old webinterface was indeed split up into 2 parts: One part written in C# as a MP plugin, which kinda "mapped" the MP functions to expose them via a webservice and a frontend written in php. The .net plugin was necessary as php alone can't communicate with MP and tell for example that the DB was updated. The php part is not using Mambo at all, that's just the CMS for our MPW homepage.

    I did some testing yesterday with scheduling recordings directly via sql into the database, and the results was good. I was able to both cancel recordings issued by MP, and insert new recordings. It seems that MP did as it was told without communicating via C#. Maybe I was just lucky?

    Tested on MP 0.2.3 so things may change when using the new tv-server.

    MP had some problems with recording 15-20 minutes when it was suppose to record only 10. I'm testing this now with longer recordings so more answers will come...

    Your suggestion is not really good, as we would loose a big advantage of the TV server: database independence.

    I had parentheses around "my" as I prefer Mysql. Simple inserts and updates will work in any database so I don't see this is a problem. In places where special optimizations are required database independence may be a problem, but I find it hard to believe this is needed in this small project.

    By using a persistentobject approach multiple database support will come out of the box any way. Getting PHP to work against M$ Sql is however another story :p

    Is it possible to turn on query logging in MP without recompiling anything? Since it is SQLite this is a bit tricky to do this othervice.
     

    Marcusb

    Retired Team Member
  • Premium Supporter
  • February 16, 2005
    1,995
    29
    Melbourne
    Hey, Maschine, thanks for the update.
    I'm very much looking forward to your weg interface.
    Is Sam working on it with you again? Haven't seen him around here much at all.
     

    Maschine

    Retired Team Member
  • Premium Supporter
  • June 15, 2004
    768
    86
    Germany
    Home Country
    Germany Germany
    I did some testing yesterday with scheduling recordings directly via sql into the database, and the results was good. I was able to both cancel recordings issued by MP, and insert new recordings. It seems that MP did as it was told without communicating via C#. Maybe I was just lucky?
    Hmm, didn't do test with "newer" MP versions like 0.2.3 so I can't tell the current status. However in the past the problem occured, when MP was idle during and after adding the recording. Then it simply didn't realize the changed DB. When you use MP (for example entering the TV section) it did also notice changes in the past.

    Tested on MP 0.2.3 so things may change when using the new tv-server.
    TV Server is a totally different story, as so much has changed... Didn't test it there.

    MP had some problems with recording 15-20 minutes when it was suppose to record only 10.
    Maybe the pre- and post-recording times?

    I had parentheses around "my" as I prefer Mysql. Simple inserts and updates will work in any database so I don't see this is a problem. In places where special optimizations are required database independence may be a problem, but I find it hard to believe this is needed in this small project.

    By using a persistentobject approach multiple database support will come out of the box any way. Getting PHP to work against M$ Sql is however another story :p
    Sorry, didn't notice the () :oops: Though you address one problem yourself. Even though the SQL queries don't need to be changed, you still needed to write different code for things like connecting to the different dbs etc. And for the persitence framework: MP already uses the gentle.net framework in TV server.

    Is it possible to turn on query logging in MP without recompiling anything? Since it is SQLite this is a bit tricky to do this othervice.
    Sorry, don't know about that.

    Please don't take my postings as a personal offence against your approach - I did it the same way with the old webinterface ;) Take a look at the first page of this thread. There are the reasons for my descission discussed... Maybe you'll then better understand my pros and cons for each solution.

    Btw.: if you are really interested in helping to work on the webinterface (old or new) please contact me by mail or any instant messenger from my profile.

    Maschine
     

    dvdfreak

    Portal Pro
    June 13, 2006
    979
    178
    Home Country
    Belgium Belgium
    Thanks for the response :)
    I did some testing yesterday with scheduling recordings directly via sql into the database, and the results was good. I was able to both cancel recordings issued by MP, and insert new recordings. It seems that MP did as it was told without communicating via C#. Maybe I was just lucky?

    Lucky in a way, MP won't know how that data got in there, but it will mostly just work. Today.

    However(!), the idea is to definitely move away from stuff like this. I've been advocating a separate scheduling subsystem, behind a well defined service API. So writing directly into the database is an absolute "not-done" ;) The proper way to register a schedule then is to go through the proper channels, talk to the scheduling service and ask it to do this for you.

    The advantages are obvious: it is simple, and no matter what changes underneath (the database, some code, whatever), it will always remain working for you, the user of the service :)
     

    Reon

    Portal Member
    July 14, 2007
    12
    2
    Home Country
    Norway Norway
    More testing proves me one thing: I was dead wrong
    Any direct sql updates does not work, my first tests was really bogus...

    However(!), the idea is to definitely move away from stuff like this. I've been advocating a separate scheduling subsystem, behind a well defined service API. So writing directly into the database is an absolute "not-done" ;) The proper way to register a schedule then is to go through the proper channels, talk to the scheduling service and ask it to do this for you.

    The advantages are obvious: it is simple, and no matter what changes underneath (the database, some code, whatever), it will always remain working for you, the user of the service :)

    I have not looked at the new TV Engine code, only the current engine, and I see your point. The handling of new recordings are really integrated with the system right now.
     

    Bram

    Portal Pro
    December 12, 2005
    851
    3
    's-Hertogenbosch
    Home Country
    Netherlands Netherlands
    Do I understand correctly that there is a communication interface thrue which PHP could communicate with MP or the TV server (apart from the ECP2 plugin, which functions partialy and has poor performance)
     

    Users who are viewing this thread

    Top Bottom