ngryman / ribs

:meat_on_bone: Responsive Images Baked Server-side.
GNU General Public License v3.0
39 stars 8 forks source link

Refactoring incoming! #13

Closed ngryman closed 10 years ago

ngryman commented 10 years ago

opencv

I've decided to use opencv as a direct dependency to handle image processing. This is a high performance, full featured, well documented library. So there is no reason not to use it.

They use cmake as build system, node is using gyp. In order to avoid the developer to have cmake installed I'll develop gyp configurations to build opencv and its dependencies. A good inspiration is google modpagespeed's implementation. opencv provides libjpeg, libpng and all, directly in their repository, so we'll use that for now, instead of trying to find machine local's version, and thus handle versions disparities.

libuv

I'll drop native async io for the first release. ribs is intended to be a node module, so we'll use node's existing facilities in the JavaScript layer to load files from the filesystem or the network. There is no need to do so in the native layer. However, we'll support basic io directly in the native layer.

SoC in native layer

Native layer will be separated in 2 parts:

I'm doing that way mainly for SoC. The core will only handle image processing stuff, no verbose v8 code here. This will help maintaining the code and also will allow any developer to build other wrappers for other languages.

ngryman commented 10 years ago

I've not exactly followed what has been said in this ticket. Yea I change my mind a lot :p

I do use OpenCV, but I compile ribs against already installed binaries instead of compiling OCV and all its dependencies. This is simpler for now.

libuv has been dropped and we now use builtin node io functions. I'll just wait benchmarks to see if we lose time passing data from / to node buffers. I'm still not very comfortable with those and do not exactly know what's the difference between slow and quick buffers. So we'll see.

soc in the native part is, imo, a little too overkill for now. Let's just produce a clean code.