From pelargir at gmail.com Sat Apr 2 15:08:55 2011 From: pelargir at gmail.com (Matthew Bass) Date: Sat, 2 Apr 2011 15:08:55 -0400 Subject: [raleigh.rb] Caching AR queries Message-ID: Hey y'all, I have a database table in my Rails app that contains records that aren't updated very frequently. I'd like to cache this table to improve performance. The trick is that I need to do it in such a way that all of my existing queries still work. The records in the table are accessed through a variety of Rails associations. In other words, there isn't a single place where I can insert the caching. I've been hunting for a plugin or gem that would wrap my AR objects and cache them transparently, but I haven't found anything. Essentially, I want the AR objects to be pulled from the cache whenever a #find is executed (or whenever the records are accessed through an association). I could just extract the records into an array that exists as a constant in the system, but the records need to be editable from an admin interface (although, as I mentioned before, this editing takes place very rarely). There has to be a way to achieve what I'm wanting without taking drastic steps. Any suggestions? Matthew From nathaniel at talbott.ws Sat Apr 2 16:47:03 2011 From: nathaniel at talbott.ws (Nathaniel Talbott) Date: Sat, 2 Apr 2011 16:47:03 -0400 Subject: [raleigh.rb] Caching AR queries In-Reply-To: References: Message-ID: On Sat, Apr 2, 2011 at 3:08 PM, Matthew Bass wrote: > Hey y'all, I have a database table in my Rails app that contains records that > aren't updated very frequently. I'd like to cache this table to improve > performance. The trick is that I need to do it in such a way that all of my > existing queries still work. Rails automatically caches queries for the duration of a request, right? http://guides.rubyonrails.org/caching_with_rails.html#sql-caching Unless the objects you're wanting to cache take a long time to load for some reason, I'd be somewhat surprised if caching them for longer than a request cycle bought you much in the way of improved performance. Have you been able to do any measurements around the time to load these objects? -- Nathaniel Talbott <:((>< From pelargir at gmail.com Sat Apr 2 16:50:24 2011 From: pelargir at gmail.com (Matthew Bass) Date: Sat, 2 Apr 2011 16:50:24 -0400 Subject: [raleigh.rb] Caching AR queries In-Reply-To: References: Message-ID: <1E92C6CC-CAD7-469B-8842-1DBC591C4C29@gmail.com> On Apr 2, 2011, at 4:47 PM, Nathaniel Talbott wrote: > Rails automatically caches queries for the duration of a request, right? > > http://guides.rubyonrails.org/caching_with_rails.html#sql-caching > > Unless the objects you're wanting to cache take a long time to load > for some reason, I'd be somewhat surprised if caching them for longer > than a request cycle bought you much in the way of improved > performance. Have you been able to do any measurements around the time > to load these objects? The quirk in this case is that it's not a flat list of objects... it's a tree structure. Each object has a parent and may have children. The tree can only go 3 levels deep, but it makes it challenging to access it in a way that doesn't trigger cascading queries. I think I may have found a simple way to achieve what I want with Rails.cache Matthew -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.streicher at gmail.com Sun Apr 3 14:04:36 2011 From: martin.streicher at gmail.com (Martin Streicher) Date: Sun, 3 Apr 2011 14:04:36 -0400 Subject: [raleigh.rb] Rails gig for strong mid- or senior person Message-ID: <976E7362-4462-4087-9207-36AA86B0850D@gmail.com> Drop me a line if you are looking for a new Rails gig. The gig can offer up to full-time hours, but does not have benefits. Term of gig is minimum of 1 mo., up to 12 mos. Martin From jeff at jumpstartlab.com Sun Apr 3 15:20:06 2011 From: jeff at jumpstartlab.com (Jeff Casimir) Date: Sun, 3 Apr 2011 15:20:06 -0400 Subject: [raleigh.rb] JumpstartLab Return to Raleigh/Durham (Ruby, Rails, jQuery Classes?) Message-ID: Hi all, Thanks for your support with my recent classes! I had two good sized groups, loved the American Underground venue, and enjoyed creating a few new Ruby/Rails developers. I got a few requests to return later this spring and I need to figure out if there's critical mass. I put together a super quick 4 question survey. If you might be interested in a two-day Ruby, Rails, or jQuery class, please fill it out here: https://spreadsheets.google.com/viewform?formkey=dHp6U2wxeGl1Wmt5aGtKTWZiSFJsTnc6MQ Of course I'd love for you to pass it on to anyone you know that might be interested. Thanks, Jeff --- Jeff Casimir Jumpstart Lab by Casimir Creative, LLC http://jumpstartlab.com @jumpstartlab on twitter From jamey.cribbs at gmail.com Tue Apr 5 14:10:09 2011 From: jamey.cribbs at gmail.com (jamey.cribbs at gmail.com) Date: Tue, 5 Apr 2011 14:10:09 -0400 Subject: [raleigh.rb] Experienced Rails Developers Wanted Message-ID: It looks like the project I have been working on for the state of South Carolina will be expanding soon and we will be looking for a couple of experienced Rails developers for, I'm guessing, a year-long contract. Work can be remote. If you are interested in this or know of any experienced developers who would be interested, drop me a line. Jamey Cribbs -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.streicher at gmail.com Mon Apr 11 18:16:52 2011 From: martin.streicher at gmail.com (Martin Streicher) Date: Mon, 11 Apr 2011 18:16:52 -0400 Subject: [raleigh.rb] Gem for tracing Message-ID: <40EDC1F6-4078-47CB-BA6A-3DBCE18F7FFF@gmail.com> Is there a gem or portion of New Relic or other service that can tell me where a query came from? I want to know 'this line of (app not framework) code sparked this query'. I see query_trace from 2010 -- not sure if it still works. Nathaniel? Martin From nathaniel at talbott.ws Mon Apr 11 19:32:00 2011 From: nathaniel at talbott.ws (Nathaniel Talbott) Date: Mon, 11 Apr 2011 19:32:00 -0400 Subject: [raleigh.rb] Gem for tracing In-Reply-To: <40EDC1F6-4078-47CB-BA6A-3DBCE18F7FFF@gmail.com> References: <40EDC1F6-4078-47CB-BA6A-3DBCE18F7FFF@gmail.com> Message-ID: On Mon, Apr 11, 2011 at 6:16 PM, Martin Streicher wrote: > Is there a gem or portion of New Relic or other service that can tell me where > a query came from? I want to know 'this line of (app not framework) code > sparked this query'. I see query_trace from 2010 -- not sure if it still works. > Nathaniel? I'm pretty sure query_trace works fine with the latest Rails 2, but not sure about Rails 3. Patches welcome :-) -- Nathaniel Talbott <:((>< From martin.streicher at gmail.com Mon Apr 11 23:09:06 2011 From: martin.streicher at gmail.com (Martin Streicher) Date: Mon, 11 Apr 2011 23:09:06 -0400 Subject: [raleigh.rb] Gem for tracing In-Reply-To: References: <40EDC1F6-4078-47CB-BA6A-3DBCE18F7FFF@gmail.com> Message-ID: <6904F148-16FC-4C2A-A02E-A99C6960929D@gmail.com> Stuff is totally different in Rails 3. That's good news! Writing query_trace turns out to be very simple. Put this code in config/initializers/query_trace.rb. --- class QueryTrace < ActiveSupport::LogSubscriber def sql(event) return unless logger.debug? debug caller. select {|stack| stack =~ /\/app\//}. map {|stack| stack.gsub(/^.*app\//, '')}. join("\n") end def logger ActiveRecord::Base.logger end end QueryTrace.attach_to :active_record --- It subscribes to AR events. When it is called from AR, it simply calls caller to get the stack, pulls out the frames relevant to the app (ignoring the framework stack entries), and then cleans things up before emitting the lines. It produces stuff like this: Feature Load (0.1ms) SELECT `features`.* FROM `features` WHERE `features`.`name` = 'Stores' LIMIT 1 models/feature.rb:16:in `to_feature' helpers/application_helper.rb:139:in `feature_available?' helpers/application_helper.rb:591:in `show_menu' helpers/application_helper.rb:582:in `each' helpers/application_helper.rb:582:in `each_with_index' helpers/application_helper.rb:582:in `show_menu' views/shared/_tabs.html.haml:2:in `_app_views_shared__tabs_html_haml__796547580_2224868320_2407870' views/layouts/application.html.haml:51:in `_app_views_layouts_application_html_haml___1975730980_2228964600_0' controllers/sites_controller.rb:32:in `show' I am sure this could be formatted better, but it works great. So far. Improvements welcome. Martin On Apr 11, 2011, at 7:32 PM, Nathaniel Talbott wrote: > On Mon, Apr 11, 2011 at 6:16 PM, Martin Streicher > wrote: > >> Is there a gem or portion of New Relic or other service that can tell me where >> a query came from? I want to know 'this line of (app not framework) code >> sparked this query'. I see query_trace from 2010 -- not sure if it still works. >> Nathaniel? > > I'm pretty sure query_trace works fine with the latest Rails 2, but > not sure about Rails 3. Patches welcome :-) > > > -- > Nathaniel Talbott > <:((>< > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members From kandrews at hirenetworks.com Tue Apr 12 15:01:17 2011 From: kandrews at hirenetworks.com (Kendra Andrews) Date: Tue, 12 Apr 2011 15:01:17 -0400 Subject: [raleigh.rb] RoR need - Durham Message-ID: <021201cbf944$00f500e0$02df02a0$@com> Direct hire opportunity with one of our clients, and early stage company. Seeking front end web developers who have a demonstrated knack for creating elegant, highly-usable sites. Looking for RoR, HTML, CSS, JavaScript. Bonus points for Python, or Android / iPhone / iPad development. Company offers meaningful equity, competitive compensation, healthcare and retirement plans, and other perks. I have several Ruby needs so still send me your resume even if this doesn't seem to be an exact fit for you (or you can apply online at www.hirenetworks.com). Please forward to any Ruby people you know! Thank you, Kendra Andrews Director of Recruiting HireNetworks 919-981-6200 x313 888-334-3145 kandrews at hirenetworks.com www.hirenetworks.com facebook_32 linkedin_32 twitter_32 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 2391 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 2959 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/png Size: 2540 bytes Desc: not available URL: From javery at infozerk.com Wed Apr 13 14:33:29 2011 From: javery at infozerk.com (James Avery) Date: Wed, 13 Apr 2011 11:33:29 -0700 Subject: [raleigh.rb] Free ticket to Red Dirt Ruby Conf Message-ID: I have a free ticket to the Red Dirt Ruby Conf (http://reddirtrubyconf.com/) being held next week in Oklahoma City - it looks like it is going to be an awesome conference. First come first serve - shoot me an email and I can give you the code for free entrance. Feel free to forward it if you think someone else would be interested. Thanks! -- James Avery Adzerk - http://adzerk.com TekPub - http://tekpub.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From joe at bodkinconsulting.com Thu Apr 14 11:22:56 2011 From: joe at bodkinconsulting.com (joe Fair) Date: Thu, 14 Apr 2011 09:22:56 -0600 Subject: [raleigh.rb] Generic question: `Lay of the land? Message-ID: Hello fellow Rubyists! My name is Joe Fair, and I'm a developer in Denver, Colorado. I'd like to move back to the South, and North Carolina sounds like a great mix of jobs, culture, and weather. I've mostly been a Java developer, but I've been using Ruby and Rails off and on for the last 5 years. I was wondering if anyone would lend their experience in the research triangle area to orient me to the good places to work and the best places to avoid. You can private message me about that last bit, if you'd like. Where are the good jobs, good schools, and good places to live? Thanks, Joe -------------- next part -------------- An HTML attachment was scrubbed... URL: From missy at selectgroup-rtp.com Thu Apr 14 12:24:55 2011 From: missy at selectgroup-rtp.com (Missy McCormick) Date: Thu, 14 Apr 2011 09:24:55 -0700 Subject: [raleigh.rb] Generic question: `Lay of the land? In-Reply-To: References: Message-ID: <8D38A152E6793846AE4DDD5BF450B544F31B3F5E@VA3DIAXVS751.RED001.local> Hi Joe, I am a technical recruiter with The Select Group in Raleigh, NC. We work with top companies in the Raleigh-Durham area and have multiple job openings. Please let me know if we could set up a time to talk about what you are looking for. Thanks and I look forward to hearing from you! Thanks, Missy Missy McCormick Technical Recruiter THE SELECT GROUP Direct: 919.459.1046 | Cell: 919.271.0144 missy at selectgroup-rtp.com | LinkedIn 5420 Wade Park Blvd. Ste 100 | Raleigh, NC 27607 "Connecting great companies with quality talent." Web Site| Corporate Video | Awards | Career Resources From: raleigh-rb-members-bounces at rubyforge.org [mailto:raleigh-rb-members-bounces at rubyforge.org] On Behalf Of joe Fair Sent: Thursday, April 14, 2011 11:23 AM To: raleigh-rb-members at rubyforge.org Subject: [raleigh.rb] Generic question: `Lay of the land? Hello fellow Rubyists! My name is Joe Fair, and I'm a developer in Denver, Colorado. I'd like to move back to the South, and North Carolina sounds like a great mix of jobs, culture, and weather. I've mostly been a Java developer, but I've been using Ruby and Rails off and on for the last 5 years. I was wondering if anyone would lend their experience in the research triangle area to orient me to the good places to work and the best places to avoid. You can private message me about that last bit, if you'd like. Where are the good jobs, good schools, and good places to live? Thanks, Joe -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 167 bytes Desc: image001.png URL: From kevin at hypotheticalabs.com Thu Apr 14 21:10:07 2011 From: kevin at hypotheticalabs.com (Kevin A. Smith) Date: Thu, 14 Apr 2011 21:10:07 -0400 Subject: [raleigh.rb] Generic question: `Lay of the land? In-Reply-To: References: Message-ID: <6900A609-EE0F-4394-BF5B-25823FF3E22D@hypotheticalabs.com> Joe - So I don't do much Ruby any more but I've lived and programmed in the area for the past 12 years. Good and bad companies are hard to pick without knowing what you're looking for. We have several of the "bigs" in the area including Cisco, Glaxo, and IBM. If you like stable-ish work then they might be a good fit. On the other hand, this area has a number of interesting small- to medium-sized companies which I find to be more my cup of tea. It's easier to understand the entire business (since the company is smaller), easier to know everyone, and your work has a larger impact. There are a number of reps from those companies on the list so I'll let them pipe up as they see fit. I live in the northern part of Raleigh proper and really like it. We're close to 2 malls, several coffee shops, and about 15 minutes from downtown Raleigh which is rapidly improving with the addition of a new modern art museum and a bunch of new restaurants. The area is made up of a number of communities and many of them are pretty cool places to live. Chapel Hill has a vibe similar to what you'd find in the Bay Area regarding lifestyles and attitudes, Durham is experiencing a renaissance of sorts and seems to be drawing a lot of creative and technical talent, Raleigh is the largest but has less personality than Chapel Hill & Durham (IMO), and some of the surrounding towns (Cary, Apex, Holly Springs, Wake Forest) have a lot to recommend them if you want a smaller town feel. As for schools my gut feeling is Orange County (Chapel Hill & surrounding area) and Wake County (Raleigh & surrounding area) have better schools than Durham County (Durham). However, I don't follow school news in Durham County at all so it's possible the situation has gotten better as the area has improved. My daughter attends a magnet public school in Raleigh and I've been very happy with the experience overall. If you have more questions feel free to email me directly and I'll do my best to answer your questions. --Kevin On Apr 14, 2011, at 11:22 AM, joe Fair wrote: > Hello fellow Rubyists! > > My name is Joe Fair, and I'm a developer in Denver, Colorado. I'd like to move back to the South, and North Carolina sounds like a great mix of jobs, culture, and weather. > > I've mostly been a Java developer, but I've been using Ruby and Rails off and on for the last 5 years. I was wondering if anyone would lend their experience in the research triangle area to orient me to the good places to work and the best places to avoid. You can private message me about that last bit, if you'd like. > > Where are the good jobs, good schools, and good places to live? > > Thanks, > Joe > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members From jimmy at jimmythrasher.com Fri Apr 15 08:38:16 2011 From: jimmy at jimmythrasher.com (Jimmy Thrasher) Date: Fri, 15 Apr 2011 08:38:16 -0400 Subject: [raleigh.rb] Generic question: `Lay of the land? In-Reply-To: References: Message-ID: Hi Joe, In all honesty, it all depends on your criteria. There are accommodations for a lot of ways of life: - urban living in downtown Raleigh and Durham - typical suburban America in North Raleigh, "Way North" Raleigh - up-scale suburban America in Cary - country living in Creedmoor, or out near Hillsborough - small town living all over the place - hippie/greenie/lefty living in Carrboro The fact that I-85 and I-40 both merge on a lot of tech businesses means you have a lot of flexibility. I myself live out in the country northwest of Hillsborough and regularly attend the Raleigh.rb sessions. Not so much the hack nights.. There's a lot you can get to with an hour's drive. There are a ton of software companies, including the "bigs" that Kevin mentioned, but also a lot of smaller, more focused companies. A few of the smaller ones are Rails shops. There are also a few freelancers around, like me and a bunch of the others on this list. Relevance is in Durham. The foodies around will tell you we also have an excellent selection of restaurants. In fact, going to a place like Charleston is a bit of a letdown, since we have so much here. The places to avoid depend on your criteria. A lot of people love to hate Cary, for instance, but again it all depends on your criteria. Jimmy On Thu, Apr 14, 2011 at 11:22 AM, joe Fair wrote: > Hello fellow Rubyists! > > My name is Joe Fair, and I'm a developer in Denver, Colorado. I'd like to > move back to the South, and North Carolina sounds like a great mix of jobs, > culture, and weather. > > I've mostly been a Java developer, but I've been using Ruby and Rails off > and on for the last 5 years. I was wondering if anyone would lend their > experience in the research triangle area to orient me to the good places to > work and the best places to avoid. You can private message me about that > last bit, if you'd like. > > Where are the good jobs, good schools, and good places to live? > > Thanks, > Joe > > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members > -- +1-919-627-7546 -------------- next part -------------- An HTML attachment was scrubbed... URL: From kevin.olbrich at gmail.com Sat Apr 16 09:26:25 2011 From: kevin.olbrich at gmail.com (Kevin Olbrich) Date: Sat, 16 Apr 2011 09:26:25 -0400 Subject: [raleigh.rb] Generic question: `Lay of the land? In-Reply-To: References: Message-ID: Hi Joe, My employer (iContact) is looking to expand our Systems Engineering team. We tend to need people with a wide range of skills ranging from software development to systems administration. The systems engineering group also builds and maintains several internal tools that are built with ruby, capistrano, cucumber, rails, and sinatra. Here's the official job listing for it: http://www.icontact.com/about/careers#job19 If you are interested, I can put you in touch with our in-house technical recruiter. Feel free to ask me questions about the position and/or iContact in general. Phone calls are fine... 919-618-3331. Regarding the area: I live in the Cary/Morrisville area, about 5 minutes from work. The Wake county school system (where Morrisville is), is probably the second best in the state (I think Orange County is slightly better, but it's closer to Chapel Hill/Carboro). Morrisville is fairly centrally located in the triangle, which makes it convenient. -Kevin Olbrich On Thu, Apr 14, 2011 at 11:22 AM, joe Fair wrote: > Hello fellow Rubyists! > > My name is Joe Fair, and I'm a developer in Denver, Colorado. I'd like to > move back to the South, and North Carolina sounds like a great mix of jobs, > culture, and weather. > > I've mostly been a Java developer, but I've been using Ruby and Rails off > and on for the last 5 years. I was wondering if anyone would lend their > experience in the research triangle area to orient me to the good places to > work and the best places to avoid. You can private message me about that > last bit, if you'd like. > > Where are the good jobs, good schools, and good places to live? > > Thanks, > Joe > > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathaniel at talbott.ws Tue Apr 19 14:05:09 2011 From: nathaniel at talbott.ws (Nathaniel Talbott) Date: Tue, 19 Apr 2011 14:05:09 -0400 Subject: [raleigh.rb] Pre-meeting Chow Message-ID: Chow tonight will be had at Randy's Pizza: http://bit.ly/gafHf7 http://www.randyspizzartp.com/ I'll be there by 5:30, and everyone is invited to join me to chat a bit and unwind before heading over to iContact for the meeting proper. See you there! -- Nathaniel Talbott <:((>< From fmedlin at gmail.com Tue Apr 19 17:06:11 2011 From: fmedlin at gmail.com (Fred Medlin) Date: Tue, 19 Apr 2011 17:06:11 -0400 Subject: [raleigh.rb] Pre-meeting Chow In-Reply-To: References: Message-ID: gratuitous in On Tue, Apr 19, 2011 at 2:05 PM, Nathaniel Talbott wrote: > Chow tonight will be had at Randy's Pizza: > > http://bit.ly/gafHf7 > http://www.randyspizzartp.com/ > > I'll be there by 5:30, and everyone is invited to join me to chat a > bit and unwind before heading over to iContact for the meeting proper. > > See you there! > > > -- > Nathaniel Talbott > <:((>< > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members > -------------- next part -------------- An HTML attachment was scrubbed... URL: From info at lojic.com Fri Apr 22 15:07:28 2011 From: info at lojic.com (Brian Adkins) Date: Fri, 22 Apr 2011 15:07:28 -0400 Subject: [raleigh.rb] Long running, stateful Ruby processes Message-ID: <11E7ADAA-FCF6-455B-9A0E-01FEE8E11827@lojic.com> I'm developing a Rails app that will need to interact with a separate, long running, stateful Ruby process. I've managed to happily avoid the need for this sort of thing for years, but I need to maintain a persistent connection to a mainframe, so I'll need a stateful process to manage the connection. Any recommendations for monitoring tools to support this? I mainly need something to detect when the process is hung/crashed, and restart it automatically. The deployment platform is Linux, so maybe something like monit is sufficient, but I thought I'd see if folks know of anything better. Also, there is no relational db involved (only MongoDB), so even if something like delayed_job is able to maintain state, it might be a challenge if it depends on a rdb table. Thanks, Brian -- Brian Adkins Lojic Technologies, LLC http://lojic.com/ From fmedlin at gmail.com Fri Apr 22 15:23:39 2011 From: fmedlin at gmail.com (Fred Medlin) Date: Fri, 22 Apr 2011 15:23:39 -0400 Subject: [raleigh.rb] Long running, stateful Ruby processes In-Reply-To: <11E7ADAA-FCF6-455B-9A0E-01FEE8E11827@lojic.com> References: <11E7ADAA-FCF6-455B-9A0E-01FEE8E11827@lojic.com> Message-ID: I've been happy with the daemons gem http://rubygems.org/gems/daemons to keep a ruby process up and running for a long time. On Fri, Apr 22, 2011 at 3:07 PM, Brian Adkins wrote: > I'm developing a Rails app that will need to interact with a separate, long > running, stateful Ruby process. I've managed to happily avoid the need for > this sort of thing for years, but I need to maintain a persistent connection > to a mainframe, so I'll need a stateful process to manage the connection. > > Any recommendations for monitoring tools to support this? I mainly need > something to detect when the process is hung/crashed, and restart it > automatically. The deployment platform is Linux, so maybe something like > monit is sufficient, but I thought I'd see if folks know of anything better. > > Also, there is no relational db involved (only MongoDB), so even if > something like delayed_job is able to maintain state, it might be a > challenge if it depends on a rdb table. > > Thanks, > Brian > > -- > Brian Adkins > Lojic Technologies, LLC > http://lojic.com/ > > > > > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members > -------------- next part -------------- An HTML attachment was scrubbed... URL: From blakewatters at gmail.com Fri Apr 22 16:31:00 2011 From: blakewatters at gmail.com (Blake Watters) Date: Fri, 22 Apr 2011 16:31:00 -0400 Subject: [raleigh.rb] Long running, stateful Ruby processes In-Reply-To: <11E7ADAA-FCF6-455B-9A0E-01FEE8E11827@lojic.com> References: <11E7ADAA-FCF6-455B-9A0E-01FEE8E11827@lojic.com> Message-ID: I picked a project several months back that does a lot of processing of the Twitter firehose and stays running constantly, but does run into issues either on the connectivity side or during processing. What has worked well for me was to write a simple Job class that forks a child process to do its main work. The master process calls Process.waitpid to reap any crashes in the child and refork it. I run it under Ruby Enterprise to get copy-on-write for cheap forking. I then monitor it with Bluepill (a God inspired process monitor) and let it handle daemonizing the process and redirect stdout and stderr to log files. The whole deal is dead simple and you get a script you can just run interactively and see the output and turn it a long-running daemon with memory / CPU monitoring via a config file. On Fri, Apr 22, 2011 at 3:07 PM, Brian Adkins wrote: > I'm developing a Rails app that will need to interact with a separate, long > running, stateful Ruby process. I've managed to happily avoid the need for > this sort of thing for years, but I need to maintain a persistent connection > to a mainframe, so I'll need a stateful process to manage the connection. > > Any recommendations for monitoring tools to support this? I mainly need > something to detect when the process is hung/crashed, and restart it > automatically. The deployment platform is Linux, so maybe something like > monit is sufficient, but I thought I'd see if folks know of anything better. > > Also, there is no relational db involved (only MongoDB), so even if > something like delayed_job is able to maintain state, it might be a > challenge if it depends on a rdb table. > > Thanks, > Brian > > -- > Brian Adkins > Lojic Technologies, LLC > http://lojic.com/ > > > > > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members > -------------- next part -------------- An HTML attachment was scrubbed... URL: From info at lojic.com Fri Apr 22 17:44:04 2011 From: info at lojic.com (Brian Adkins) Date: Fri, 22 Apr 2011 17:44:04 -0400 Subject: [raleigh.rb] Long running, stateful Ruby processes In-Reply-To: References: <11E7ADAA-FCF6-455B-9A0E-01FEE8E11827@lojic.com> Message-ID: <257792D4-EA85-4D48-BF76-76BFA5EE4991@lojic.com> Thanks Blake - I had no idea that MRI negates much of the copy-on- write benefit of fork. In my case, it won't really be a problem, but I'm still bummed. I've been reluctant to use Enterprise Ruby instead of MRI thus far, but this is definitely some added motivation. On Apr 22, 2011, at 4:31 PM, Blake Watters wrote: > I picked a project several months back that does a lot of processing > of the Twitter firehose and stays running constantly, but does run > into issues either on the connectivity side or during processing. > What has worked well for me was to write a simple Job class that > forks a child process to do its main work. The master process calls > Process.waitpid to reap any crashes in the child and refork it. I > run it under Ruby Enterprise to get copy-on-write for cheap forking. > I then monitor it with Bluepill (a God inspired process monitor) and > let it handle daemonizing the process and redirect stdout and stderr > to log files. The whole deal is dead simple and you get a script you > can just run interactively and see the output and turn it a long- > running daemon with memory / CPU monitoring via a config file. > > On Fri, Apr 22, 2011 at 3:07 PM, Brian Adkins wrote: > I'm developing a Rails app that will need to interact with a > separate, long running, stateful Ruby process. I've managed to > happily avoid the need for this sort of thing for years, but I need > to maintain a persistent connection to a mainframe, so I'll need a > stateful process to manage the connection. > > Any recommendations for monitoring tools to support this? I mainly > need something to detect when the process is hung/crashed, and > restart it automatically. The deployment platform is Linux, so maybe > something like monit is sufficient, but I thought I'd see if folks > know of anything better. > > Also, there is no relational db involved (only MongoDB), so even if > something like delayed_job is able to maintain state, it might be a > challenge if it depends on a rdb table. > > Thanks, > Brian > > -- > Brian Adkins > Lojic Technologies, LLC > http://lojic.com/ > > > > > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members > > _______________________________________________ > raleigh-rb-members mailing list > raleigh-rb-members at rubyforge.org > http://rubyforge.org/mailman/listinfo/raleigh-rb-members -------------- next part -------------- An HTML attachment was scrubbed... URL: From gustin at entryway.net Fri Apr 22 17:46:23 2011 From: gustin at entryway.net (gustin) Date: Fri, 22 Apr 2011 17:46:23 -0400 Subject: [raleigh.rb] Code Retreat Floyd 2011 Message-ID: Hi All, A weekend long code retreat will be happening in Floyd, Va, April 29th -> May 1st, 2011. It is about a 2.5 hour drive from the raleigh/durham area. There are a few slots still open, last year we had around 40 participants. It is held at a beautiful location and lots of coding fun will be had by all: http://coderetreat.com/2011/04/29/floyd-virginia.html enjoy, gustin -------------- next part -------------- An HTML attachment was scrubbed... URL: From mshiltonj at gmail.com Mon Apr 25 15:55:06 2011 From: mshiltonj at gmail.com (Steven Hilton) Date: Mon, 25 Apr 2011 15:55:06 -0400 Subject: [raleigh.rb] Can rails know if the user stopped the request so I can abort my render? Message-ID: Hey all, If I have a rails request that may run a while, and I'm streaming text to the browser (via a render :text => proc), and the user stops the request, is there any way for me to detect that and abort the render early? Thanks. From michael at webadvocate.com Mon Apr 25 17:20:12 2011 From: michael at webadvocate.com (Michael Klett) Date: Mon, 25 Apr 2011 17:20:12 -0400 Subject: [raleigh.rb] Local contractor opportunity Message-ID: Hey guys, My wife's business is in need of a full-time Rails contractor for a 6+ month stint. I'm the original developer of her custom e-commerce application, but I don't have the time to give it the attention it needs. I wanted to give the members of the list first crack at this opportunity. The following is the job description I helped them write. I'm happy to answer any questions you may have! Thanks, Michael *Rails Contractor Needed* * * * Flex your web development ability and build real business value for a quirky Cary-based small business. The Green Kangaroo (http://www.tgkdesigns.com) sells wedding invitations and stationery to a national audience via a Rails-based custom e-commerce site. This is a paper company that operates paperlessly - the entire business flows through the web app. The gals behind "TGK" move fast and have a ton of ideas, wants, and needs - we need a developer who can keep up! We're seeking a rounded Rails developer for a 6+ month, full-time contract to fix, enhance, extend, innovate, deploy, and iterate. Opportunities will include: - Translating business needs in to new test-driven features, apps, and tools - Improving the usability and functionality of existing features - Slinging both back-end and front-end code - Selecting technologies and methodologies to get the job done The right candidate will be able to demonstrate their abilities through a portfolio of work. It is extremely important that the candidate be efficient, productive, self-starting, and self-sufficient. The developer of the existing Rails application will be involved as a guide and mentor. You'll be able to work wherever and whenever you please, but we strongly prefer a local candidate who is able to check-in onsite in Cary weekly or bi-weekly for iteration planning and demonstrations. To be considered, please email kwklett at tgkdesigns.com with a statement of why you're a fit, including any supporting materials you wish. * -------------- next part -------------- An HTML attachment was scrubbed... URL: