[yast-devel] Re: [yast-commit] <rest-service> master : add Brute force protection

Martin Kudlvasr write:
Hi, Can you reproduce it? I am not able to do it. Also if singleton doesn't preserve between request then something is very bad with ruby garbage collector (if rails doesn't restart itself after each request), because there exist reference to instance of class and it should not be destroyed. What you maybe find is problem with class reloading in development mode (it affects also singleton, as it reloads also its only instance), but maybe I have some gaps in my ruby knowledge. I also know why is singleton bad http://code.google.com/p/google-singleton- detector/wiki/WhySingletonsAreControversial but I think that in this case is adequate to use singleton as it is small class coupled with only one class which must survive between requests. -- Josef Reidinger YaST team maintainer of perl-Bootloader, YaST2-Repair, webyast modules language and time -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org

Josef Reidinger write:
Just link to similar problem and explanation http://groups.google.com/group/rubyonrails- talk/browse_thread/thread/ee8e7888dfc51833 So I think that in production mode where class is not reloaded on request it works. -- Josef Reidinger YaST team maintainer of perl-Bootloader, YaST2-Repair, webyast modules language and time -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org

Martin Kudlvasr write:
Hi, Can you reproduce it? I am not able to do it. Also if singleton doesn't preserve between request then something is very bad with ruby garbage collector (if rails doesn't restart itself after each request), because there exist reference to instance of class and it should not be destroyed. What you maybe find is problem with class reloading in development mode (it affects also singleton, as it reloads also its only instance), but maybe I have some gaps in my ruby knowledge. I also know why is singleton bad http://code.google.com/p/google-singleton- detector/wiki/WhySingletonsAreControversial but I think that in this case is adequate to use singleton as it is small class coupled with only one class which must survive between requests. -- Josef Reidinger YaST team maintainer of perl-Bootloader, YaST2-Repair, webyast modules language and time -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org

Josef Reidinger write:
Just link to similar problem and explanation http://groups.google.com/group/rubyonrails- talk/browse_thread/thread/ee8e7888dfc51833 So I think that in production mode where class is not reloaded on request it works. -- Josef Reidinger YaST team maintainer of perl-Bootloader, YaST2-Repair, webyast modules language and time -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (2)
-
Josef Reidinger
-
Martin Kudlvasr