Open andrejj opened 9 years ago
Hi Andej,
Agreed. Its kind of grown organically over time. Sounds like its due for a v2. :). Regarding your points,
Cool, so all good suggestions. I've been hesitant to make breaking changes, but will start a v2 branch next time i get a chance. i'll give you a shout once it's there and if you've got any changes fire a pull request to it,
thanks, Stewart.
On 18 Nov 2014, at 08:44, Andrej Jančič notifications@github.com wrote:
Hi, first I want to say thank you for sharing this crawler and for the work you put in it.
Here is our experience with it and thoughts for improvements. I would be happy to know if you agree and if you would like to get this implemented (we can contribute of course).
We have a repository of code, we use for doing lots of data processing using resque. We tried to use cobweb within our repository and here are our issues:
name conflicts, classes are declared on a global level. Classes declared in cobweb should be name-spaced in a module. Example: Cobweb::Stats
Sinatra loaded by default. We run our code on multiple machines with multiple processes. As I understand sinatra's purpose is to provide a UI for stats. We don't need/want it to be loaded every time on all boxes consuming memory and slowing down the boot time of our app. So this should be optional (example: 'require cobweb-web' or separate gem).
files directive in gemspec. Everything you put in the files directive, can be loaded automatically. This again exposes naming conflicts. For example we use Fozzie that declares Stats module. But when you do 'require stats', you don't know which one is going to be loaded.
sidekick vs resque, could be optional programmers decision and I would avoid auto detection
logging should be configurable and puts statements should not be used. ruby Cobwbeb.logger = Logger.new
In conclusion this is what i have in mind:
require 'cobweb-resque'
OR
require 'cobweb-sidekick' require 'cobweb-web' # optional Cobweb.logger = Logger.new("crawler.log") — Reply to this email directly or view it on GitHub.
Hi, first I want to say thank you for sharing this crawler and for the work you put in it.
Here is our experience with it and thoughts for improvements. I would be happy to know if you agree and if you would like to get this implemented (we can contribute of course).
We have a repository of code, we use for doing lots of data processing using resque. We tried to use cobweb within our repository and here are our issues:
ruby Cobwbeb.logger = Logger.new
In conclusion this is what i have in mind: