Interactive web application with ESP8266

Hi everyone,

First of all, please forget me about my not really perfect English.

I'm here because I have some troubles into "schematize" the concept of a project I have in my mind.

I go to the point: I want to create a project which previews the management of a stepper motor and a reading from a color sensor (rgb color sensor) and a temperature sensor.
The significantly loop cycle will preview:
1)reaching specific temperature, then wait for user start
2)when temperature reached, if user starts cycle
3)act "x number" of steps/movements from stepper motor
4)then, get a reading/values from the sensor and store it on microSD or database
5)then, evaluate it with comparing with my prefixed parameters on microSD or database
6)do again ad again from point 3 to 5 if user don't stop cycle.

Nothing of really difficult at this point.

But, as the title of this thread, I want to use an ESP8266, because I want to manage all the process via WiFi and so over the Internet (for the moment in local network).

I have think to provide the ESP8266 a web interface - made in HTML5, bootstrap and CSS - to show me live a kind of dashboard where is possible to give the start of the cycle, and where I can see live, for example, the temperature values detected from the ESP, as well as the rgb values detected from the same - and any changing of it from the start of loop cycle.
All this things must be done simply putting the assigned local IP address of ESP8266 into a random client available (PC, tablet, smartphone).

Again, to this point I think is all operable - please correct me if I'm wrong.

But from here, I have two main troubles:

-I want the ESP8266 will be independent. After the start - if not stopped from the user across the web interface - needs to go next with loop cycle continuously, until stop information. This because I want collect the data continuously and create an "history" to show in the web dashboard. To to this, can I manage the storage of the information with a microSD memory? Or I need to store the information into an external database (es. mySQL)?

-Then, please suppose to close the client browser after the start the ESP loop cycle. Can the ESP manage a new connection recovering the data stored - for example - in microSD, to show me what is happened meantime? And, after new connection, can manage again the live show of the information?

I hope to have explained myself in exhaustive way for your understanding.

Anyway I invite all of you for a confrontation.

Thanks a lot,

Luigi.