Closed dhanielo closed 9 years ago
Please see https://github.com/decafjs/decaf and https://github.com/decafjs
So is this project defunct??
On Tue, Oct 7, 2014 at 2:14 PM, Michael Schwartz notifications@github.com wrote:
Please see https://github.com/decafjs/decaf and https://github.com/decafjs
— Reply to this email directly or view it on GitHub https://github.com/mschwartz/SilkJS/issues/39#issuecomment-58232441.
It's not defunct in the sense that I'm happy to support people already using it. My energies are being spent on decafjs these days, however.
On Tue, Oct 7, 2014 at 11:17 AM, dorgan@donaldorgan.com < notifications@github.com> wrote:
So is this project defunct??
On Tue, Oct 7, 2014 at 2:14 PM, Michael Schwartz notifications@github.com
wrote:
Please see https://github.com/decafjs/decaf and https://github.com/decafjs
— Reply to this email directly or view it on GitHub https://github.com/mschwartz/SilkJS/issues/39#issuecomment-58232441.
— Reply to this email directly or view it on GitHub https://github.com/mschwartz/SilkJS/issues/39#issuecomment-58232942.
Due to a peculiarity (I'm writing a short paper for my graduate degree) need to find a solution to this bug.
I don't see that bug in SilkJS programs I run here. I cannot diagnose what's going on without seeing how you are trying to use it.
On Tue, Oct 7, 2014 at 11:29 AM, Daniel Oliveira notifications@github.com wrote:
Due to a peculiarity (I'm writing a short paper for my graduate degree) need to find a solution to this bug.
— Reply to this email directly or view it on GitHub https://github.com/mschwartz/SilkJS/issues/39#issuecomment-58235031.
See attached images
Some things to think about:
Is this happening with your local environment or remote server? Is this something that can be replicated across different environments? Is SILK throwing exceptions or is this somehow failing silently.
I've never run into this particular issue, but am very curious to see if somehow I can help find a solution.
CTO, Modus Create Inc. Ext JS in Action, Author Sencha Touch in Action, Author (coming soon)
web :: moduscreate.com twitter :: @ModusJesus mobile :: 301.785.6030
On Tue, Oct 7, 2014 at 1:47 PM, Daniel Oliveira notifications@github.com wrote:
I created a MVVM architecture with AngularJS and SilkJS but in several occurrences silkjs don't render a full js content or keeping last html, example: Original:
'use strict';
var lightApp = angular.module('lightApp', [ 'ngRoute', 'lightControllers' ]);
lightApp.config(['$routeProvider', function($routeProvider) { $routeProvider. when('/tasks', { templateUrl: 'tasks.html', controller: 'tasksController' }); }]);
Rendered:
'use strict';
var lightApp = angular.module('lightApp', [ 'ngRoute', 'lightControllers' ]);
lightApp.config(['$routeProvider', function($routeProvider) { $routeProvider. when('/dashboard', { templateUrl: 'dashboard.html', controller: 'dashboardController'
Sometimes on update html page (ex.: index.html), SilkJS don't render the new code but return the last index.html even when the server has been restarted.
Some idea for fix the bug?
Thanks all!
— Reply to this email directly or view it on GitHub https://github.com/mschwartz/SilkJS/issues/39.
You are likely right, Jay. It seems as if he's got some proxy or cache in between his server and his browser. There's no way SilkJS would cache an HTML file and keep sending it if it is changed on disk. Especially after a restart. However, if the old HTML file is cached somewhere in between, it could be served by that cache over and over again.
On Tue, Oct 7, 2014 at 11:40 AM, Jay Garcia notifications@github.com wrote:
Some things to think about:
Is this happening with your local environment or remote server? Is this something that can be replicated across different environments? Is SILK throwing exceptions or is this somehow failing silently.
I've never run into this particular issue, but am very curious to see if somehow I can help find a solution.
Jay Garcia
CTO, Modus Create Inc. Ext JS in Action, Author Sencha Touch in Action, Author (coming soon)
web :: moduscreate.com twitter :: @ModusJesus mobile :: 301.785.6030
On Tue, Oct 7, 2014 at 1:47 PM, Daniel Oliveira notifications@github.com
wrote:
I created a MVVM architecture with AngularJS and SilkJS but in several occurrences silkjs don't render a full js content or keeping last html, example: Original:
'use strict';
var lightApp = angular.module('lightApp', [ 'ngRoute', 'lightControllers' ]);
lightApp.config(['$routeProvider', function($routeProvider) { $routeProvider. when('/tasks', { templateUrl: 'tasks.html', controller: 'tasksController' }); }]);
Rendered:
'use strict';
var lightApp = angular.module('lightApp', [ 'ngRoute', 'lightControllers' ]);
lightApp.config(['$routeProvider', function($routeProvider) { $routeProvider. when('/dashboard', { templateUrl: 'dashboard.html', controller: 'dashboardController'
Sometimes on update html page (ex.: index.html), SilkJS don't render the new code but return the last index.html even when the server has been restarted.
Some idea for fix the bug?
Thanks all!
— Reply to this email directly or view it on GitHub https://github.com/mschwartz/SilkJS/issues/39.
— Reply to this email directly or view it on GitHub https://github.com/mschwartz/SilkJS/issues/39#issuecomment-58236982.
Yes folks, do not discount the chance of an adjacent problem, I'm on a windows machine running vagrant with ubuntu 12.04.
The complete code of the application is:
https://github.com/rill-l33t/light-linux.git
It's pretty simple because I started to develop a little time.
note: I believe it is not the browser cache, tested in another browser, but I think yes: somewhere a cache is created, but can not find.
Try remove LogFile line from your config.js. It fails to run for me because server/logs directory does not exist.
On Tue, Oct 7, 2014 at 11:49 AM, Daniel Oliveira notifications@github.com wrote:
Yes folks, do not discount the chance of an adjacent problem, I'm on a windows machine running vagrant with ubuntu 12.04.
The complete code of the application is:
https://github.com/rill-l33t/light-linux.git
It's pretty simple because I started to develop a little time.
note: I believe it is not the browser cache, tested in another browser, but I think yes: somewhere a cache is created, but can not find.
— Reply to this email directly or view it on GitHub https://github.com/mschwartz/SilkJS/issues/39#issuecomment-58238734.
I'm sorry, please create directory "logs" in "server" because I add this folder in .gitignore.
When I create the directory, this is what I see:
Access: http://localhost:9090/#/tasks, see source page and open js/app.js
I get a bug in your angular js program:
ReferenceError: $location is not defined
at new
Please paste the js/app.js rendered in your browser.
I fixed this, update the project and try again.
Or replace this (js/controllers.js):
function ($scope, $http, $location) {
$http.get('http://'+$location+'/getTaskMockup').success(function(data) {
For this:
function ($scope, $http) {
$http.get('http://'+$location+'/getTaskMockup').success(function(data) {
I did a git pull and new errors occur:
GET http://undefined/getTaskMockup net::ERR_NAME_NOT_RESOLVED angular.js:9118 GET http://undefined/getTaskMockup net::ERR_NAME_NOT_RESOLVED angular.js:9118
On Tue, Oct 7, 2014 at 12:13 PM, Daniel Oliveira notifications@github.com wrote:
I fixed this, update the project and try again.
Or replace this (js/controllers.js):
function ($scope, $http, $location) { $http.get('http://'+$location+'/getTaskMockup').success(function(data) {
For this:
function ($scope, $http) { $http.get('http://'+$location+'/getTaskMockup').success(function(data) {
— Reply to this email directly or view it on GitHub https://github.com/mschwartz/SilkJS/issues/39#issuecomment-58242955.
$location is angularJS service, for some reason it is not being recognized but this isn't main problem. I change $location for "localhost:9090" to continue testing, try again a pull.
I don't know what else to do for you. I run your app and it seems to work. You have bugs, but we all do :)
This is what I see:
It is likely you have some software like Norton or something similar that is trying to "help" your web browser, but it is getting in the way of your WWW development.
Yes, you get the result I expected (I got at the beginning), the problem is something here in the company machine (we use Trend Micro), had not thought of that, I'll do some tests to find out the real source.
Not... the problem is not related with security softwares, I downloaded the file ('app.js') through the "links" on "vagrant" and he came in half.
'use strict';
var lightApp = angular.module('lightApp', [
'ngRoute',
'lightControllers'
]);
lightApp.config(['$routeProvider',
function($routeProvider) {
$routeProvider.
when('/dashboard', {
templateUrl: 'dashboard.html',
controller: 'dashboardController'
Sounds like the VM itself might be the issue? I have trie hammering Silk in the past and have not run into this at all. =(
Does it occur After you change a file or is it something that is persistent after rebooting the VM? I've seen a similar issue with something called sendfile http://man7.org/linux/man-pages/man2/sendfile.2.html() using a different technology (VertX).
@Mike, what are your thoughts on this?
CTO, Modus Create Inc. Ext JS in Action, Author Sencha Touch in Action, Author (coming soon)
web :: moduscreate.com twitter :: @ModusJesus mobile :: 301.785.6030
On Tue, Oct 7, 2014 at 4:01 PM, Daniel Oliveira notifications@github.com wrote:
Not... the problem is not related with security softwares, I downloaded the file ('app.js') through the "links" on "vagrant" and he came in half.
'use strict';
var lightApp = angular.module('lightApp', [ 'ngRoute', 'lightControllers' ]);
lightApp.config(['$routeProvider', function($routeProvider) { $routeProvider. when('/dashboard', { templateUrl: 'dashboard.html', controller: 'dashboardController'
— Reply to this email directly or view it on GitHub https://github.com/mschwartz/SilkJS/issues/39#issuecomment-58250971.
SilkJS uses sendfile(2) to deliver files. However, there's no way that sendfile() is caching previous file contents. All it does is copy from one fd to another in kernel space - more optimal to copy that way than to read into user space memory then write through the kernel to the socket. In other words, sendfile reads from the file on disk (fd) and writes to the socket (browser, fd).
I'm not sure if he's got SilkJS installed per the instructions? How he's running it?
On Tue, Oct 7, 2014 at 2:16 PM, Jay Garcia notifications@github.com wrote:
Sounds like the VM itself might be the issue? I have trie hammering Silk in the past and have not run into this at all. =(
Does it occur After you change a file or is it something that is persistent after rebooting the VM? I've seen a similar issue with something called sendfile http://man7.org/linux/man-pages/man2/sendfile.2.html() using a different technology (VertX).
@Mike, what are your thoughts on this?
Jay Garcia
CTO, Modus Create Inc. Ext JS in Action, Author Sencha Touch in Action, Author (coming soon)
web :: moduscreate.com twitter :: @ModusJesus mobile :: 301.785.6030
On Tue, Oct 7, 2014 at 4:01 PM, Daniel Oliveira notifications@github.com
wrote:
Not... the problem is not related with security softwares, I downloaded the file ('app.js') through the "links" on "vagrant" and he came in half.
'use strict';
var lightApp = angular.module('lightApp', [ 'ngRoute', 'lightControllers' ]);
lightApp.config(['$routeProvider', function($routeProvider) { $routeProvider. when('/dashboard', { templateUrl: 'dashboard.html', controller: 'dashboardController'
— Reply to this email directly or view it on GitHub https://github.com/mschwartz/SilkJS/issues/39#issuecomment-58250971.
— Reply to this email directly or view it on GitHub https://github.com/mschwartz/SilkJS/issues/39#issuecomment-58263743.
Oh dear. Virtualbox and the vboxsf file system and sendfile do not get along. Vagrant usually uses Virtualbox as its virtualization container and uses vboxsf as the default shared file system to share files between the host and the guest. See:
https://www.virtualbox.org/ticket/819 https://www.virtualbox.org/ticket/9069 https://www.virtualbox.org/ticket/12597
The workaround is well known, to turn off sendfile support in whatever web server you are using:
http://www.mabishu.com/blog/2013/05/07/solving-caching-issues-with-vagrant-on-vboxsf/
I'd recommend that SilkJS add a configuration option to turn off sendfile(2) support for delivering files to work around this issue.
Can you install Chrome or Firefox in your virtual box instance?
On Tue, Oct 7, 2014 at 5:46 PM, Richard Bullington-McGuire < notifications@github.com> wrote:
Oh dear. Vagrant and sendfile do not get along.
https://www.virtualbox.org/ticket/819
The workaround is well known, to turn off sendfile support in whatever web server you are using:
http://www.mabishu.com/blog/2013/05/07/solving-caching-issues-with-vagrant-on-vboxsf/
I'd recommend that SilkJS add a configuration option to turn off sendfile(2) support for delivering files to work around this issue.
— Reply to this email directly or view it on GitHub https://github.com/mschwartz/SilkJS/issues/39#issuecomment-58287837.
@mschwartz I can't install chrome or fx in vbox because vagrant don't create xserver in vm. The solution of @obscurerichard seems to me the most right at the moment. Is it possible disable sendfile() in silkjs?
You can install X and desktop with vagrant. I use it all the time.
On Wed, Oct 8, 2014 at 4:35 AM, Daniel Oliveira notifications@github.com wrote:
@mschwartz https://github.com/mschwartz I can't install chrome or fx in vbox because vagrant don't create xserver in vm. The solution of @obscurerichard https://github.com/obscurerichard seems to me the most right at the moment. Is it possible disable sendfile() in silkjs?
— Reply to this email directly or view it on GitHub https://github.com/mschwartz/SilkJS/issues/39#issuecomment-58344577.
Yes, I can install x on vagrant, but is really necessary for the test? I used LINKS browser before and got the same result.
https://github.com/mschwartz/SilkJS/blob/master/httpd/response.js#L193
You can change the code to not call sendfile here.
On Wed, Oct 8, 2014 at 5:42 AM, Daniel Oliveira notifications@github.com wrote:
Yes, I can install x on vagrant, but is really necessary for the test? I used LINKS browser before and got the same result.
— Reply to this email directly or view it on GitHub https://github.com/mschwartz/SilkJS/issues/39#issuecomment-58351197.
nice! I will try it.
Just try with wget or curl on the Linux machine. That will tell you if the send file on flagrant is the culprit (my strong feeling).
Also, to fix this easily, you can front silks with Ngnix on your vm.
JG
301.785.6030 :: @moduscreate
:: sent from my mobile device ::
On Oct 8, 2014, at 08:46, Daniel Oliveira notifications@github.com wrote:
nice! I will try it.
— Reply to this email directly or view it on GitHub.
It is a bug in VirtualBox, Jay.
I don't think there's a fix, other than to replace sendfile() call with open(), read()/write() loop, close()
The beauty of the situation is that the logic is written in JavaScript and this is an open source project so people are free to hack on it to suit their needs :)
On Wed, Oct 8, 2014 at 6:17 AM, Jay Garcia notifications@github.com wrote:
Just try with wget or curl on the Linux machine. That will tell you if the send file on flagrant is the culprit (my strong feeling).
Also, to fix this easily, you can front silks with Ngnix on your vm.
JG
301.785.6030 :: @moduscreate
:: sent from my mobile device ::
On Oct 8, 2014, at 08:46, Daniel Oliveira notifications@github.com wrote:
nice! I will try it.
— Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHub https://github.com/mschwartz/SilkJS/issues/39#issuecomment-58355400.
We resolved this with a project that used VirtualBox, Flagrant, and VertX by fronting the with VertX stack nginx. That's a viable, cheap and quick solution to the problem. No need to hack/modify Silk.
Jay Garcia -------------------------------------------- CTO & Co-founder, Modus Create Inc. Author of Ext JS & Sencha Touch in Action
moduscreate.com @ModusCreate 301.785.6030
This electronic mail transmission contains information from Modus Create, Inc. which may be privileged and/or confidential. The information contained herein is for the exclusive use of the addressee named above. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of this information is prohibited. If you have received this electronic mail transmission in error, please notify us by telephone *(301-785-6030) or by electronic mail (*contact@moduscreate.com contact@moduscreate.com ).
On Wed, Oct 8, 2014 at 9:20 AM, Michael Schwartz notifications@github.com wrote:
It is a bug in VirtualBox, Jay.
I don't think there's a fix, other than to replace sendfile() call with open(), read()/write() loop, close()
The beauty of the situation is that the logic is written in JavaScript and this is an open source project so people are free to hack on it to suit their needs :)
On Wed, Oct 8, 2014 at 6:17 AM, Jay Garcia notifications@github.com wrote:
Just try with wget or curl on the Linux machine. That will tell you if the send file on flagrant is the culprit (my strong feeling).
Also, to fix this easily, you can front silks with Ngnix on your vm.
JG
301.785.6030 :: @moduscreate
:: sent from my mobile device ::
On Oct 8, 2014, at 08:46, Daniel Oliveira notifications@github.com wrote:
nice! I will try it.
— Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHub https://github.com/mschwartz/SilkJS/issues/39#issuecomment-58355400.
— Reply to this email directly or view it on GitHub https://github.com/mschwartz/SilkJS/issues/39#issuecomment-58355686.
If silk is using sendfile to read files that it sends out to the network, and the source filesystem is vboxsf, this will affect it. Sure, you could use a different web server to serve up some static assets to work around the problem too. You'll have to configure that server to avoid using sendfile.
@mschwartz, @jaygarcia , @obscurerichard, @moduscreate Hi guys! thanks all! I fix it, I rewrite a code snippet responsible for send file to sock as you recommended.
if (Config.sendFile || Config.sendFile == undefined) {
net.sendFile(res.sock, fn, 0, size); // (FileSystem.readfile64(fn));
} else {
var file = fs.open(fn, fs.O_RDONLY);
var content = net.read(file, size, size);
net.write(res.sock, content, size);
fs.close(file);
}
What was the resolution? :)
Jay Garcia -------------------------------------------- CTO & Co-founder, Modus Create Inc. Author of Ext JS & Sencha Touch in Action
moduscreate.com @ModusCreate 301.785.6030
This electronic mail transmission contains information from Modus Create, Inc. which may be privileged and/or confidential. The information contained herein is for the exclusive use of the addressee named above. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of this information is prohibited. If you have received this electronic mail transmission in error, please notify us by telephone *(301-785-6030) or by electronic mail (*contact@moduscreate.com contact@moduscreate.com ).
On Wed, Oct 8, 2014 at 11:46 AM, Daniel Oliveira notifications@github.com wrote:
@mschwartz https://github.com/mschwartz, @jaygarcia https://github.com/jaygarcia , @obscurerichard https://github.com/obscurerichard, @moduscreate https://github.com/moduscreate Hi guys! thanks all! I fix it, I rewrite a code snippet responsible for send file to sock as you recommended.
— Reply to this email directly or view it on GitHub https://github.com/mschwartz/SilkJS/issues/39#issuecomment-58379122.
I change sendFile() for open(), read(), write(), close() and I created option for change modes according to need.
@rill-l33t could you submit a pull request with your changes?
Also instead of reading the entire file into memory, it might be better to read and write it in chunks of say, 64K at a time to avoid exhausting memory if it attempts to serve a large file.
He did submit a pull request which has been merged.
Awesome! I missed that.
Richard Bullington-McGuire +1 571 236 0938
On Oct 13, 2014, at 4:42 PM, Michael Schwartz notifications@github.com wrote:
He did submit a pull request which has been merged.
— Reply to this email directly or view it on GitHub.
@obscurerichard you saw my changes? you agree with them? https://github.com/mschwartz/SilkJS/pull/40
I did. The pull request looks good. It might be better not to read in the entire file before writing it out, though.
I understand, but do not know make how different. how read 64k in 64k?
I created a MVVM architecture with AngularJS and SilkJS but in several occurrences silkjs don't render a full js content or keeping last html, example: Original:
Rendered:
Sometimes on update html page (ex.: index.html), SilkJS don't render the new code but return the last index.html even when the server has been restarted.
Some idea for fix the bug?
Thanks all!