Don't forget about classic stuff, like rigorous testing. I've tried updating live production systems with Rails before, and it's burned me (Think bringing down the entire production website). Small changes you "are sure will work" often have subtle implications in different environments. A few things I've been burned by before:
* Is your fix the right thing? We all make mistakes. * Is the database in a similar state? Production might have nulls/ other weird values. * Is the filesystem in a similar state? This is important if your system depends on user files (like flickr). * Is the JVM the same version? * Are all the dependent .JARs the same revision? * Are there differences between the development & production OS (not as a big deal w/ Java, but still worth considering) * Are the configuration options on the production servers that are different. * Will your application source code be in the same state as the production system? What happens when you restart? This is annoying enough in development, let alone production. * Will you lose the history of he bug? Since Clojure is functional, it's really easy to recreate a unit test of the failure condition. Make sure to capture the existence of the bug. * Will your fix scale? Admittedly, this is harder to test than most other things. I know a lot my code is O(n) or O(n^2) first time around, and I could easily speed it up an order of magnitude just by indexing So I guess my final response to deploying untested changes to a production system is "Don't do it". My $.02 Sean On Sep 4, 4:22 am, Krukow <karl.kru...@gmail.com> wrote: > I was thinking about the capability of changing production systems on > the fly. E.g. by having an accessible repl in a running production > system. > > If you have a bug in a function, you can fix it by re-def'ing it - > that is great. However, suppose you want to do a system upgrade where > you want to change several things. Now you could just re-def each var > one at a time, but this might produce an inconsistent program in the > interval where you have re-def'ed some but not all vars. > > This first thing you would want is sort-of a atomic update of all > vars, similarly to what is possible with refs. Is this possible > somehow? If not are there any techniques or best practices for these > "system upgrades"? > > /Karl --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---