01.20.07
Posted in code at 2:30 am by Andrew Kuklewicz
I’m writing this w/o any prompting from the folks at Contegix, I ‘ve been just really pleased with these guys this week, and wanted to put a few kind words out there.
So we switched to Contegix not that long ago for prx, and I have to say, these guys are a class act. It’s not that our last hosting provider was bad - they weren’t - it’s just that Contegix is that much better.
The support just may be too good. They are spoiling me; what will I do if I have to deal with a different host?
I fear I may never get better at any sysadmin tasks, it is all too easy to simply write a request, and in moments you have a response, and in minutes you have it done. I have never had better support, even when I had a dedicated team of admins around the corner. And I’d say about half the time I ask for something, the response includes analysis and suggestions on how to do it better.
So this week alone, I can’t say enough about the strong work from Craig, Eric, Joe and Brian - thanks again guys!
Permalink
01.12.07
Posted in code at 3:43 am by Andrew Kuklewicz
I’ve been spending the last few days working with the AWS::S3 library.
Works well - we are streaming large audio files over it, so we needed something better than the ruby s3 bindings amazon released (though they are very clear in their code that they do not handle big files well).
Only hitch was setting metadata when creating an AWS::S3::S3Object - couldn’t get it to work.
Tried creating a 1 byte file to start, then updating with metadata, that was fine, but the initial create was erroring out, or the metadata would not take.
Luckily, there is a patch offered by ‘Lars’ which makes it all work for me now.
I posted this to the list, but here is some sample working code for setting metadata on create (once the patch is applied):
1) Using the store class method:
AWS::S3::S3Object.store(
'myfile-81805',
open('/data/production/amazon/myfolder/myfile-81805'),
'my-s3-bucket',
:content_type=>'audio/mpeg',
'x-amz-meta-my-file-name'=>'my.mp3')
2) Using the Bucket new_object method, and then store, you don’t have to include the metadata prefix ‘x-amz-meta-’:
my_bucket = AWS::S3::Bucket.find('my-s3-bucket')
s3o = my_bucket.new_object
s3o.key = 'myfile-81805'
s3o.value = open('/data/production/amazon/myfolder/myfile-81805')
s3o.content_type = 'audio/mpeg'
s3o.metadata['my-file-name'] = 'my.mp3'
s3o.store
So with that working, back to ActiveMessaging, and getting changes fully tested and checked in.
Permalink
01.05.07
Posted in code at 10:18 pm by Andrew Kuklewicz
Thanks to Brian McCallister, he put in the changes I mentioned.
This should make the changes to a13g cleaner, and we can now take advantage of having the reconnect wait time configurable.
All in all, it makes a13g closer to implementing a ‘reliable’ listening service.
There is one sorta ugly bit, the __old_receive method was a fine way to do this when I was extending the Connection class, but could use refactoring…after I get a good check in of fixes to a13g, I’ll submit something prettier. But as we used to say back in Stanley Eisenstat’s classes (which I wish I had taken more of): good is great, but done is better.
Permalink
Posted in code at 12:16 am by Andrew Kuklewicz
Jon Tirsen and friends created a great product, ActiveMessaging, to incorporate into Rails the ability to send and receive Stomp messages - specifically, this seems to mostly be used with ActiveMQ and its Stomp protocol support, and depends on the Ruby Stomp client courtesy Brian McCallister.
Since I am using a13g quite actively at prx, Jon has been kind enough to let me help maintain this product, and hopefully even add some to it. There is now a google code site, and a mailing list, thanks Jon.
First up are some bug fixes and quick enhancements - I sent a few in to Brian McCallister that will hopefully show up in a 1.0.3 release of the Ruby Stomp client. I also have a few fixes and minor enhancements to make to a13g that should show up soon, and I will also be working on any issues logged on the new google code site.
But what to do after that? I have some examples I want to throw out there for doing synchronous messaging between a rails and a java app, and I want to add even more documentation to the wiki so folks can get going with this easier - what else do people want? Get on the mailing list and let’s talk about it.
Permalink