I want to investigate youtube streaming quality using youtube APIs like the following https://developers.google.com/youtube/js_api_reference

Using these APIs, the values of quality metrics will be taken on by varables. like number of download bytes, playback duration, I want to log these statistics

since I can't use javascript to create/write log files on the client side, someone suggests that I need to create a webserver with sql database and use jsonp or Cors to make cross domain ajax requests.

my idea is:

set up a webserver with sql database
create a html(html5)page which embed a youtube video and has javascripts/ajax which log statistics and send these statistics to the webserver
put the html page on the webserver
use a client browser to access the html page

most importantly, I hope that the webserver can be on the same machine with the client, so I use localhost to access the page.

but I'm not familiar with javascript, ajax, jsonp and webserver, but I hope I can achieve my target as fast as possible, can anyone tell me:

is there anything wrong with my idea? do I need to adjust my steps?
what webserver, sql database do I need to set up? any article links about this?
any good articles on javascript/ajax/jsonp which are closely related to my target? any article links about this?