

Show HN: Reusing browser JavaScript code on server - zubairov
http://blog.elastic.io/post/23672709839/client-side-javascript-running-on-server-yes-makes?utm_source=hn&utm_medium=post&utm_campaign=hnews

======
kangax
As an author of fabric.js, I'm glad to see you guys found it useful! Just
wanted to mention that fabric's requirement for old Node.js is definitely
something we can't wait to get rid of. As soon as we find a replacement to
"o3-xml" package, you'll be able to take advantage of newer (and faster) Node
versions.

------
tfennelly
That's a really nice idea. How does doing this on the server side effect
performance? Maybe ye can cache the result.

~~~
zubairov
Yes. Good point. It's indeed quite expensive to do the graphic generation on
the server.

We use a caching from Amazon CloudFront. They have a great feature 'custom
origin'. We just put our heroku server URL as an origin for CloudFront and
configured HTTP headers properly. After that we were able to significantly
reduce the load on a server.

We also blogged about it: <http://blog.elastic.io/post/22773181715>

