Jump to content

Improving interaction between Client and Server


Dan64

Recommended Posts

Before start to post the problem, I'd like to makes my compliment to all people that are working on this project since in few time they have built a new mediacenter that is already a good and innovative mediacenter. :)

 

Now the issue:

 

When WMC starts and I open the MB3-Classic often (almost always) I receive a message that said the client cannot connect to the server. This is not exactly true, since usually when this happen the server is already started by 60 sec. What I have to do is wait some second (usually 10/20 sec) and then retry, I have to do this 3/4 time every time.

 

Proposal: The client should be able to understand when the server is really not started yet and when the server is busy. In this second case should show a splash screen that display a message that said that the application is connecting to the server, then should continue to polling to the server to understand when is not busy and finally show the MB3-Classic interface. This simple solution will provide a better user experience avoiding to the user to do that manually that is not really comfortable. :( 

 

Thanks 

 

P.S.

I prefer don't use the stand-by.

  • Like 1
Link to comment
Share on other sites

This is only an issue if MBC and the server are on the same machine and you attempt to start them at the same time.  

 

I'll have to wait and see what kind of usage MBC continues to have before looking at improving this because it is actually a lot trickier than you might realize.

Link to comment
Share on other sites

I think that this issue, that is related to the client / server comunication, will remain with others clients every time the server is just started and you don't know exactly when will be available to the client. For example I suppose that the new MBT will have the same problem if I will run it on the same server workstation.

Link to comment
Share on other sites

joshstix

I'd think the typical use case would not be one where people are starting the server only when they want to use the client.  I know I run the server 24/7 but maybe I'm the anomaly.

Link to comment
Share on other sites

I also have the server/client on the same machine. Because the PC on which it is running on uses quit a lot of power (200W), my family only want to turn it on when they want to us it. I tried the standby option, but was not preferable. 

I also tried to delay the start up of MBC by a fixed time, but this did not always worked fine, the time the server needs to start up seems to variate in time.

So I am also in favor with the proposal of Dan64 :) .

Link to comment
Share on other sites

I think that this issue, that is related to the client / server comunication, will remain with others clients every time the server is just started and you don't know exactly when will be available to the client. For example I suppose that the new MBT will have the same problem if I will run it on the same server workstation.

 

Each client will have to implement their own solution for this situation.  The other clients will almost certainly handle it better because they were all written for MB3.  Part of what makes it tricky for MBC is that I have shoehorned a product built to be stand-alone into a client for a server.  So, to make this work properly would mean quite a bit of re-work and re-design in the start-up process.

Link to comment
Share on other sites

[updated Version: 24 Nov 2013]

 

I have developed a little utility to Launch the MB3 Client that does all the needed tasks automatically.

 

It's possible download the utility here: https://danilo.homenet.org/shares/U/windows/MB3Launch.rar

 

While the link to the source code (*) is : https://danilo.homenet.org/shares/U/windows/MB3Launch_source.rar

 

The usage is simple, extract the content of the file MBLaunch.rar in a directory (writable by the user) and put a link to the file MB3Launch.exe in Windows's startup folder.

 

Le logic of the program is the following:

 

1) at start-up show a splash screen that advise that is trying to connect to MB3 server

2) check if the server is running, if not start the server (locally)

3) if the server is running start to try to connect to the server

4) when the connection has success start the MB3 Client (or WMC)

5) give the focus to the MB3 Client (to receive the windows events)

6) Exit

 

It's possible customize the program by editing the file MB3Launch.exe.config

 

The parameters are the following:

 

MB3Title = executable name of MB3 Server (should never change)

MB3ProcessPath = path to the server, the parameter {0} is substitue runtime with the name of the user

EhomePath = path to WMC (shoud never change)

MB3StartParam = parameters to launch the MB3 Client (should never change)

ProgressCount = the max number of times that the progess bar is shown (default = 18, equivalent to 180 sec)

ShowWMC = if true is launched only WMC, not the MB3 client (default = false)

MaxRetry = max number of attempts to connect to the server (default = 10, equivalent to 50 sec)

StartDelay = how many seconds wait before start to try to connect to the server (default = 60)

MaxFocusCount = how many seconds wait before start to try to set the focus to WMC (default = 30)

UseScreenHD = if true the Splashscreen has a resolution of 1080p, if false 720p (default = true)

UseThemeLight = if true the Splashscreen has a light theme, if false a dark theme (default = true)

 

 

On the upper right corner are displayed the seconds since the start of MB3Launch, it's possible use this information to adapt the timing parameters.

 

 

(*) In the source is missing only the ApiClient package that can be downloaded here: http://www.nuget.org/packages/MediaBrowser.ApiClient/

 

Here the screenshoot

 

528e8f924ec26_Screenshoot2.jpg

Edited by Dan64
  • Like 2
Link to comment
Share on other sites

I have updated the utility. I have changed the way to give the focus to WMC, now the method used is more reliable. I have also changed the SplahScreen.

 

Here the screenshoot

 

5290653f474db_Screenshoot2.jpg

Link to comment
Share on other sites

SilentAssassin

Very nice if you have this situation.

 

One thought though. If you have MBS start as a service wouldn't this combat some of this issue because it would start as soon as Windows starts which would before the computer even starts to process and login a user.

Link to comment
Share on other sites

Thanks, for your suggestion, but starting as services I cannot use the automatic update feature and since MB3 is under heavy development, the updates are quite frequents. In any case I'm feel comfortable with this solution, since I have a slow WMC startup. 

Edited by Dan64
Link to comment
Share on other sites

I have releaesed an updated with a new Light Theme. The approach is to set also a wallpaper in windows the same backround (included in the files).

Also there are 2 new options:

 

UseScreenHD = if true the Splashscreen has a resolution of 1080p, if false 720p (default = true)

UseThemeLight = if true the Splashscreen has a light theme, if false a dark theme (default = true)

 

Here the screen shoot.

 

529222cd33ee5_Screenshoot3.jpg

Link to comment
Share on other sites

  • 2 weeks later...

The next release should handle this better.  Giving you an option to re-try connecting if we time out the first time.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...