syzer / JS-Spark

Realtime calculation distributed system. AKA distributed lodash
190 stars 14 forks source link

EVALing #1

Closed kichooo closed 10 years ago

kichooo commented 10 years ago

Maybe we can just use it? Just catch all the exceptions, and we are fine. Clients need to trust the host anyway. Only thing to do, it can be made https ready, so that nobody should MitM attack multiple browsers by injecting anything into the logic code.

syzer commented 10 years ago

good idea with https, + might run some build script to generate the self signed cert

kichooo commented 10 years ago

Another problem worth noting is that eval is said to be significally slower than stardard scripts. I will try to run some tests on my laptop today to see how much of a problem it is.

syzer commented 10 years ago

Speed of eval is not an issue, since its the client speed, eval could be up to twice slower, but can also evaluate to expression(not only function)

more important is setting tasks for clients correctly. scoring clients.

2014-08-07 13:19 GMT+02:00 Krzysztof Burliński notifications@github.com:

Another problem worth noting is that eval is said to be significally slower than stardard scripts. I will try to run some tests on my laptop today to see how much of a problem it is.

— Reply to this email directly or view it on GitHub https://github.com/syzer/JS-Spark/issues/1#issuecomment-51459081.

--Lukas 'SyZer' Gintowt

kichooo commented 10 years ago

According to some benchmarks I made, eval execution takes from 2 to 3 times more time than normal script or function created using "Function()" call. Let's just use "Function" and catch all for now, we should be fine with that. Closing.

edit: checked on FF, Chrome and nodejs

kichooo commented 10 years ago

https://gist.github.com/kichooo/e2cd257431abd8e6432f

Gist of the benchmark.

syzer commented 10 years ago

:+1:

2014-08-07 15:59 GMT+02:00 Krzysztof Burliński notifications@github.com:

https://gist.github.com/kichooo/e2cd257431abd8e6432f

Gist of the benchmark.

— Reply to this email directly or view it on GitHub https://github.com/syzer/JS-Spark/issues/1#issuecomment-51474887.

--Lukas 'SyZer' Gintowt