Jump to content

Recommended Posts

Hello,

 

If I may I would like to pick your brain for a moment. First of all I am not a native English speaker so please accept my apologies for any spelling and grammar mistakes. Second of all I am hoping I am posting this in the correct forum, if not let me know and I will contact an administrator to move it into the right forum.

 

I am developing an application that will run on a set top box. The set top box (device that you can stream video to so you can see it on the television) has a Mozilla browser on it and via some JavaScript calls you can get access to some of the box his core parameters and settings, e.g. volume, IP address, MAC address, etc.

 

The application that I am working on is an interface for this set top box; basically it’s a HTML website. To generate the HTML, JavaScript I am using PHP.

 

Each set top box connects to the server requesting a standard page. The set top box authenticates itself via serial number and MAC address (to do this I use the set top box it’s build in API interface that is accessible via JavaScript). To reduce the loading time I’ve put 80% of the stuff in JavaScript, e.g. channel list, some menu interface, this is displayed to the user on his request. The application takes a bit longer to load in the beginning but once loaded it is reasonable fast.

 

Since I am a optimize freak I am thinking how to optimize the application even more. The following methods and technologies come to mind.

 

Note: There are some customizable settings for each individual user (set top box).

 

I could create a folder on the server its hard drive. The folder could be a hash of the set top box serial number and MAC address to make it “secure”. In this folder the PHP script creates the generated HTML and JavaScript. If a box connects to the server it authenticates the box and checks if a “cache” version of its interface exist on the server. If this is not older then a predefined time it will use these HTML files else the PHP script will create new files.

 

My questions:

Would there be a difference if I store these files in the servers memory (memory prices are quite low nowadays) instead of the hard drive? If I could store it in the server its memory how could I do this securely?

 

More caching.

Memcached could be used to reduce the queries from the database, e.g. for the channel list which always the same for every user.

 

Questions:

Can I store images in here also? E.g. dynamic created images? JavaScript that is the same for all users of the system?

 

Do you have any other ideas how I could optimize the cache of the system? Or any comments in the above mentioned methods.

 

Thank you very much for your time and effort. If things are not clear please let me know and I am more than willing to clear up things where needed.

 

Best regards,

 

Jumpmaster

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.