#rubyonrails - Sun 4 Mar 2007 between 01:46 and 01:53

michaelbryneas in, i have a function that sets an array of options that I use for navigation tabs, and I want to use those options inside another controller
psticknebitsweat, right, a fork after the meat of RoR is loaded.
bitsweatI've been trying that with the fcgi dispatcher
psticknebitsweat, cool
Rappermasso i've decided that i'm just going to write my application and worry about replacing WEBrick later
bitsweatit's nice for ez setup and maintenance mostly
michaelbryneis there a better place to store these options than inside the controller?
bitsweathopefully moving it to mongrel, but that's more complex
psticknebitsweat, it seems like you'd need to do it after the DB schema is read then re-establish connections in the children?
bitsweat, how is it working?
bitsweatkinda half-assed yet :)
jeremydurhamRappermas: good move
bitsweatyeah you can choose where to fork
Rappermasjeremydurham: sanity is returning already
bitsweatjust be sure to reconnect to the db and reopen the log
pstickneDoes Rack define a fcgi-like coupling?
psticknebitsweat, have you done any tests on memory consumption/shared mem?
bitsweatruby gc means forking gives no memory advantage
bitsweatsince mark phase touches all objects
psticknethat makes sense.
bitsweatbut spawning children is certainly faster
psticknebut you still have the DB connection overhead; I suppose it could be pooled though
bitsweatdb connect is super fast
unless you're using oracle
pstickneokay then :)
bitsweatand persisted for the child's lifetime anyway
pstickneI wonder how bloody impossible it would be to make RoR (ruby) thread-safe
bitsweatI hacked something together by hand then came across http://tmtm.org/ruby/prefork/ and am trying to migrate to that instead
yakkophi. have a rails app server, and need to create j2me client -- anyone aware of any rails like j2me frameworks?
jeremydurhampstickne: it's happened before, so it can't be that bad... I'm sure it's mostly the libraries
psticknebitsweat, aiiiy! can you read Japanese?
bitsweatnot very hard.. the main reason Rails isn't thread safe is because it uses class variables within a single request
that page machine-translates well
plus all you need is the tarball :)
AR is mostly thread safe
and has tests to prove it
Sneaky_BastardAR ?

Page: 2 9 16 23 30 37 44 51 58 65 72 79 86 93 100 107