In this small project ScriptCommunicator generates the HTTP pages dinamically at "low level". Unfortunatly I had some problems with the readyReadSlot() function that seams does'not work very well with the browser as client and I did not had the possibiity to parse the client (browser) requests.
If someone want to improve this demo with request parsing (GET,POST etc), it should be possible to implement some node.js-like functionality by using ScriptCommunicator.
If the demo does not work, plese check the firewall!
Kindest regards,
Pier Andrea.
Hi Stefan,
if I write the response packet inside the readyReadSlot() slot the browser does not receive the correct packet from SC and still wait for an answer. The only working way I've found is in the demo I've posted.
Kindest regards,
Pier Andrea.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Stefan,
I've found a problem in the uHTTPServer. The auto-reload function of the page sometimes resets the connection. It could be better to introduce a AJAX quering system but, at momet it could be too complex to do this in pure ECMASCRIPT.
At moment this remains only a proof of concept.
I'll start to work to an alternate solution.
For instance, do you know this amazing QT library? http://stefanfrings.de/qtwebapp/index-en.html
It seems perfect for future integration in SC (or for making a SC-interfaceable App).
Thank you,
Kindest regards,
Pier Andrea.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Stefan,
I'm working on the uHTTPServer demo and I'm found some conceptual issues. The demo is based on your TCP server/client example. I'm considering that you connected only ONE client to the SERVER but, in real browser connections it is possible (normal) to have MANY clients connected to the same server. I think it could be necessary to keep in memory the client reference (once connected) for using it in different slots. My program (as yours) is organized to have only ONE client and works very well if you do all the server operations inside the same slot (connectionEstablished) but if you want to use the signals (i.e readyReadSignal) whit many clients the reference to tcpServerClient can change overtime if new connections are in progress.I'll try to indicize the connecting clients but, the issue could be solved by passing the CLIENT reference to all the slots that use it.
Think a little bit about this issue and let me know if my thought is correct.
Thank you for your attention.
Kindest regards,
Pier Andrea.
Last edit: Anonymous 2016-01-26
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Stefan,
thank you, can I do the same with other signals (i.e. disconnect)?
I'll work on the demo on the basis of your suggestion.
In the meantime I've modified my example for accepting/processing/disconnecting only a client at time and it seems to work. Try the new argument-parsing function for brower-level user interaction: http://localhost:8080/?slider1=44&slider4=55
and, of course, improve it (I'm no so good with RegEx).
kindest regards,
Pier Andrea.
Hi Stefan,
this is the last version of the uHTTPServer modified by following your suggestions. It seems to work as expected.
I've introduced a new argument for the custom refresh rate of the page that bypasses the SC server predefined value: http://localhost:8080/?slider1=88&slider4=55&refresh=1
Thank you again for your help.
Kindest regards,
Pier Andrea.
I have tried your project and have following problems:
- IE does not work
- Firefox sometimes gets no page (firefox is waiting). In this case I have to manually reload the page
Best regards,
Stefan
Last edit: Stefan Zieker 2016-01-27
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Stefan,
didi you try the last version (uHTTPServer2.zip)?
With Chrome it seems to work well. I'll try with other browsers.
Kindest regards,
Pier Andrea.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Stefan,
The mentioned line creates the favicon (https://en.wikipedia.org/wiki/Favicon) in base64 format.
Yes, you can add this to the example scripts.
kindest regards,
Pier Andrea.
ps. in attachment you can find an optimized version of the uHTTPServer.
Hi Stefan,
another amazing remote data visualization tool by combining uHTTPServer and Dygraphs (http://dygraphs.com/).
Let me know what do you think.
Kindest regards,
Pier Andrea.
Hi Stefan,
I'm working on a remote filemanager for listing and displaying data contained in a specific dataFolder via uDATAServer. Unfortunatly, we do not have the gzip compression for transferring http data, but the great thing is that the resulting HTTP page (in the browser) is self-contained and not needs external dependencies. If you save the html page (in the browser) you have a well-formatted page for future use (that you could show in every browser and every device).
Kindest regards,
Pier Andrea.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Stefan,
yes, of course, like the CGI server approach. I'll try ASAP.
The amazing thing is that the generated plot is a quite complete HTML-5 browser-side data-visualization app.
The only limitation is the amount of transferred data. GZIPping the <html> content could be a great improvement.
See in attachemt a demo generated by SC by parsing real data files (dopamine calibration) made in my lab Yestarday.
Kindest regards,
Pier Andrea.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Stefan.
thank you for the release of the version 4.0 and for the great effort you did (also) in the documentation.
Very,very impressive.
Kindest regards,
Pier Andrea.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Stefan,
just a curiosity.
The entire canvas2D layer is made at HTML level for rendering a canvas is it correct?
Do you think it could be possible to access to the generated HTML string?
In this case it could be possible to use this function to DRAW in a browser by sending the string as in the uHHPServer example.
Sorry, my brain just does not stop working.
Kindest regards,
Pier Andrea.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "User Contributions" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hi Stefan,
this is a micro HTTP server based on ScriptCommunicator.
Kindest regards,
Pier Andrea.
Last edit: Anonymous 2016-01-25
View and moderate all "User Contributions" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
In this small project ScriptCommunicator generates the HTTP pages dinamically at "low level". Unfortunatly I had some problems with the readyReadSlot() function that seams does'not work very well with the browser as client and I did not had the possibiity to parse the client (browser) requests.
If someone want to improve this demo with request parsing (GET,POST etc), it should be possible to implement some node.js-like functionality by using ScriptCommunicator.
If the demo does not work, plese check the firewall!
Kindest regards,
Pier Andrea.
Last edit: Anonymous 2016-01-25
Hi Pier,
thx for uploading your project. What do you mean with 'some problems with the readyReadSlot() function'?
Best regards,
Stefan
View and moderate all "User Contributions" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hi Stefan,
if I write the response packet inside the readyReadSlot() slot the browser does not receive the correct packet from SC and still wait for an answer. The only working way I've found is in the demo I've posted.
Kindest regards,
Pier Andrea.
Hi Pier,
I will have a look at this problem.
Best regards,
Stefan
View and moderate all "User Contributions" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hi Stefan,
I've found a problem in the uHTTPServer. The auto-reload function of the page sometimes resets the connection. It could be better to introduce a AJAX quering system but, at momet it could be too complex to do this in pure ECMASCRIPT.
At moment this remains only a proof of concept.
I'll start to work to an alternate solution.
For instance, do you know this amazing QT library?
http://stefanfrings.de/qtwebapp/index-en.html
It seems perfect for future integration in SC (or for making a SC-interfaceable App).
Thank you,
Kindest regards,
Pier Andrea.
View and moderate all "User Contributions" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hi Stefan,
I'm working on the uHTTPServer demo and I'm found some conceptual issues. The demo is based on your TCP server/client example. I'm considering that you connected only ONE client to the SERVER but, in real browser connections it is possible (normal) to have MANY clients connected to the same server. I think it could be necessary to keep in memory the client reference (once connected) for using it in different slots. My program (as yours) is organized to have only ONE client and works very well if you do all the server operations inside the same slot (connectionEstablished) but if you want to use the signals (i.e readyReadSignal) whit many clients the reference to tcpServerClient can change overtime if new connections are in progress.I'll try to indicize the connecting clients but, the issue could be solved by passing the CLIENT reference to all the slots that use it.
Think a little bit about this issue and let me know if my thought is correct.
Thank you for your attention.
Kindest regards,
Pier Andrea.
Last edit: Anonymous 2016-01-26
Hi Pier,
you can give the client as argument to the connect function. In the called slot you can access it with this:
I hope that I've understand you correct.
Best regards,
Stefan
View and moderate all "User Contributions" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hi Stefan,
thank you, can I do the same with other signals (i.e. disconnect)?
I'll work on the demo on the basis of your suggestion.
In the meantime I've modified my example for accepting/processing/disconnecting only a client at time and it seems to work. Try the new argument-parsing function for brower-level user interaction:
http://localhost:8080/?slider1=44&slider4=55
and, of course, improve it (I'm no so good with RegEx).
kindest regards,
Pier Andrea.
Last edit: Anonymous 2016-01-26
View and moderate all "User Contributions" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hi Stefan,
this is the last version of the uHTTPServer modified by following your suggestions. It seems to work as expected.
I've introduced a new argument for the custom refresh rate of the page that bypasses the SC server predefined value:
http://localhost:8080/?slider1=88&slider4=55&refresh=1
Thank you again for your help.
Kindest regards,
Pier Andrea.
Hi Pier,
I have tried your project and have following problems:
- IE does not work
- Firefox sometimes gets no page (firefox is waiting). In this case I have to manually reload the page
Best regards,
Stefan
Last edit: Stefan Zieker 2016-01-27
View and moderate all "User Contributions" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hi Stefan,
didi you try the last version (uHTTPServer2.zip)?
With Chrome it seems to work well. I'll try with other browsers.
Kindest regards,
Pier Andrea.
Yes I used uHTTPServer2.zip).
Best regards,
Stefan
View and moderate all "User Contributions" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hi Stefan,
try this new version I've tested on Windows 7 (Chrome, IExplorer and Firefox) that seems to work now.
Kindest regards,
Pier Andrea.
Hi Pier,
now it works. Whats does the following line?
Can I add this to the example scripts?
Best regards,
Stefan
View and moderate all "User Contributions" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hi Stefan,
The mentioned line creates the favicon (https://en.wikipedia.org/wiki/Favicon) in base64 format.
Yes, you can add this to the example scripts.
kindest regards,
Pier Andrea.
ps. in attachment you can find an optimized version of the uHTTPServer.
Last edit: Anonymous 2016-01-27
View and moderate all "User Contributions" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hi Stefan,
another amazing remote data visualization tool by combining uHTTPServer and Dygraphs (http://dygraphs.com/).
Let me know what do you think.
Kindest regards,
Pier Andrea.
Hi Pier,
nice project. I didn't know dygraphs. Thx for pointing this out to me.
Best regards,
Stefan
Last edit: Stefan Zieker 2016-01-28
View and moderate all "User Contributions" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hi Stefan,
I'm working on a remote filemanager for listing and displaying data contained in a specific dataFolder via uDATAServer. Unfortunatly, we do not have the gzip compression for transferring http data, but the great thing is that the resulting HTTP page (in the browser) is self-contained and not needs external dependencies. If you save the html page (in the browser) you have a well-formatted page for future use (that you could show in every browser and every device).
Kindest regards,
Pier Andrea.
Hi Pier,
you could start gzip as an external process (scriptThread.createProcess).
Best regards,
Stefan
View and moderate all "User Contributions" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hi Stefan,
yes, of course, like the CGI server approach. I'll try ASAP.
The amazing thing is that the generated plot is a quite complete HTML-5 browser-side data-visualization app.
The only limitation is the amount of transferred data. GZIPping the <html> content could be a great improvement.
See in attachemt a demo generated by SC by parsing real data files (dopamine calibration) made in my lab Yestarday.
Kindest regards,
Pier Andrea.
nice
View and moderate all "User Contributions" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hi Stefan.
thank you for the release of the version 4.0 and for the great effort you did (also) in the documentation.
Very,very impressive.
Kindest regards,
Pier Andrea.
thx :-)
View and moderate all "User Contributions" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hi Stefan,
just a curiosity.
The entire canvas2D layer is made at HTML level for rendering a canvas is it correct?
Do you think it could be possible to access to the generated HTML string?
In this case it could be possible to use this function to DRAW in a browser by sending the string as in the uHHPServer example.
Sorry, my brain just does not stop working.
Kindest regards,
Pier Andrea.