So…here’s a link to the equivalent of “only using callbacks” [instead of using fibers]
http://www.ibm.com/developerworks/library/wa-aj-hiperform/?S_TACT=105AGX01&S_CMP=HP
Is that ugly because of java or because of not having fibers [like NeverBlock] so you don’t have to rewrite your app at all to take advantage of them. Yipes.
I found this link interesting. Not sure if I condone it, but hey, here it is 
http://plainbookofmormon.com/
NeverBlock provides a way to use fibers and rails and…never block.
It is also possible to use a NeverBlock spin off [mysqlplus] to be used in a threaded rails project (thus allowing you to have non blocking IO in the threaded realm, i.e. allowing rails to be true multi-threaded, once that happens with rails 2.2).
Here’s how:
setup an edge rails project [1] [or use rails 2.2]
install mysqlplus
copy https://github.com/methodmissing/mysqlplus_adapter/tree library to the vendor/plugins directory
change your database.yml entries say mysqlplus instead of mysql
add pool: 4 to the database.yml entries [from [2]]
within environment.rb add
config.threadsafe! # from [3]
edit rails.rb within the mongrel gem and comment out any time it uses synchronize [since it's not thread ready]
ex on my machine:
vi ~/dev/ruby_186_installed/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb
@guard.synchronize {
stuff
}
becomes
#@guard.synchronize
stuff
#}
then script/server should work in a multi-threaded way. Test by creating an action that is ActiveRecord::Base.connection.execute(”select sleep(1)”) and run two simultaneously requests–they should both come back in 1s.
Now if only rails 2.2 can come out…
[1] http://betterlogic.com/roger/?p=464
[2] http://groups.google.com/group/rubyonrails-core/browse_thread/thread/ab6ecc43f7c0f462/fa4f1fc1cbe3b09e?lnk=gst&q=pool#fa4f1fc1cbe3b09e
[3] http://www.infoq.com/news/2008/08/rails-threadsafe-etags-support
clone the rails github repo, then
ruby rails_clone//railties/bin/rails
…does this…
create
create app/controllers
create app/helpers
create app/models
So…you want redundancy in your “gateways” (head gateways, I’d call them) in setting up your personal bamboo implementation?
Have no fear!
Just follow the example in opendht.cfg–it lists several gateways and your clients will round robin between them and [thankfully] despite which one they end up joining on, they will be part of the same DHT.
Note: if there’s a question navigate to their page in http land, and/or try getting and setting from one and receiving in another.
here’s what worked–not sure which ONE of these caused it to work, but this one did make it work
239 ./configure –prefix=/home/byu_p2pweb/installed_apache_2 –enable-so –enable-rewrite –enable-modules=mod_rewrite –with-mpm=worker –enable-module=most –enable-module=rewrite && make && make install
thus avoiding the infamous
[Wed Sep 19 15:16:52 2001] [alert] /usr/local/www/htdocs/deals/.htaccess: Invalid command ‘RewriteEngine’, perhaps mis-spelled or defined by a module not included in the server configuration
It appears that you can indeed have weird named methods.
>> class A; end
>> b = proc {}
>> A.send :define_method, :'abc*def', b
=> #
>> A.instance_methods.grep /abc/
=> ["abc", "abc*def"]
>> class A; def gogo; end; alias :’goo ‘ :gogo; end
=> nil
>> A.instance_methods.grep /go/
=> ["gogo", "goo "]
I’m not sure how to actually call them, without maybe #send, though.
Gleaned from http://t-a-w.blogspot.com/2007/06/ruby-and-methods-with-weird-names.html
I think that you do it a la
# delete local copy
git branch -d origin/branch_name
git push origin :heads/branch_name
error: dst refspec heads/pja_add_hs_grad_year does not match any existing ref on the remote and does not start with refs/.
may mean “somebody else already deleted it!”
I thought I’d start my own git annoyances list, just to gripe about it
1) it does not synchronize submodule when you do a git checkout. Does anybody else find this slightly disturbing?
2) say you switch to a new branch, and one of the files in the old branch [that belongs there and should only be there] is created by root, git will silently ignore the fact that it was unable to delete that file. It will leave it there! Whoa!
3) the instructions on what to do during a conflict are unclear “commit your changes after you’ve fixed the conflict?? how?”
4) at times git places itself in unstable states, where…you have to do reset –hard and all manner of other weirdness just to get it to be sane.
5) sometimes directories disappear. They do.
Turns out rails already has one of these helpful functions:
ary.in_groups_of(2, false)