On Tuesday, GigaOM published 10 Reasons Enterprises Aren’t Ready to Trust the Cloud.
I personally think the title is somewhat misleading. It would have been more appropriately named “10 Reasons Enterprises Aren’t Ready to Take Their Entire In-House IT Operations to the Cloud.” The difference is huge. Enterprises can totally trust the cloud to perform certain operations. Massive data crunching tasks that need to run occasionally are perfect for this.
There is a single reason why we don’t hear more about enterprises adopting clouds (yet!) - it’s not that easy. First of all, if we have a massive dataset to run through a computation cycle, this dataset first needs to be transferred somewhere where cluster nodes can get to it. In case of Amazon Web Services,S3 is where one could put it. But before we can transfer the data, we need to extract it from the source (database, data warehouse etc). This can be easier said than done.
Once the dataset is ready, a number of cluster nodes need to be started - you need an AMI and a private communication mechanism for your instances. You also will need discovery tools, because EC2 assigns dynamic IP addresses and without discovery, your cluster nodes will not be aware of each other. And these are only high level steps…
So, if you are an enterprise and you would like to show GigaOM that you do trust the cloud, are you on your own to make it all happen? I happen to know the answer. I work for company called CohesiveFT and our Elastic Server platform can help you in several important ways. Firstly, remember that first step of extracting the dataset from your internal system? How would you feel if I told you that you can skip this step - instead you can set up a private virtual network between your Amazon EC2 instances and your corporate datacenter so that cluster nodes can access the data source directly? If you are interested, check out our VcubeV multisourcing technique. It will also help you sort out the problem of dynamically assigned IP addresses (hint: VcubeV virtual IP addresses can be static).
Secondly, you can use Upload Your Package feature to easily embed your home-grown software to be included in every cluster node. You will save quite a lot of time if you use a nice web GUI to assemble your cluster node instead of building and bundling an AMI manually. Patch management will also be easier - consider a couple of clicks to upload a new version of software and rebuild the server, vs. repeating entire bundling process from its very beginning.
And finally, Elastic Server On Demand can launch your servers in EC2 as easily as it can build a vmware image of exactly the same stack for you to test locally.
If you are an enterprise looking for help to get started in the cloud, you now know where to find us.
Tags: cloud computing · work
In this post I would like to show how one can exchange messages using AMQP protocol from Ruby, using RabbitMQ as a broker. I posted the original version of this script to rabbitmq-discuss mailing list back in September 2007.
Prerequesites:
- RabbitMQ broker configured, up and running on 127.0.0.1 (localhost) on port 5672 (standard AMQP port).
- Apache QPid Ruby library installed within RUBYPATH (svn co http://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid/ruby)
- AMQP specification XML form AMQP official site saved as /etc/amqp0-8.xml
You can also download this script from here.
#!/usr/bin/ruby -I/usr/local/qpid-svn/qpid/ruby
#
#
__doc__ = %q(
disttailf.rb - distributed "tail -f"
Aggregates "tail -f" output from multiple machines and multiple files
into a single RabbitMQ pubsub queue (kind of splunk's log consolidation
function)
Usage:
Producer: disttailf.rb [-s broker_host] [-p broker_port] [-x spec_xml] file ...
Consumer: disttailf.rb [-s broker_host] [-p broker_port] [-x spec_xml] -c
)
require 'qpid'
require 'socket'
def consumer(client, ch)
myqueue = ch.queue_declare()
ch.queue_bind(:queue=>myqueue.queue, :exchange=>'amq.topic',
:routing_key=>'disttailf.#')
cons = ch.basic_consume(:queue=>myqueue.queue, :no_ack => true)
ruby_queue = client.queue(cons.consumer_tag)
while true
raise "Rabbitmq broker disconnected" if client.closed?
begin
msg = ruby_queue.pop(non_block=true)
puts "== #{msg.content.headers[:headers]} " \
"#{msg.routing_key.split('.')[-1]}"
puts msg.content.body
rescue
sleep(0.5)
end
end
end
def producer(client, ch, filenames)
rkey = "disttailf." + Socket.gethostname.split('.')[-1]
tail_f(filenames) do |filename, line|
h = {'sent' => Time.now.to_i, 'filename' => filename }
c = Qpid::Content.new({:headers=>h}, line)
ch.basic_publish(:routing_key=>rkey, :content=>c,
:exchange=>'amq.topic')
puts "#{filename}: #{line}"
end
end
def tail_f(filenames, &block)
filedict = Hash.new
filenames.each { |f| filedict[f] = open_or_nil(f) }
reopen_counter = 0
while true:
if reopen_counter > 120
reopen_counter = 0
filenames.reject { |f| filedict[f] }.each {
|f| filedict[f] = open_or_nil(f) }
end
filedict.values.reject { |f| not f }.each do |f|
begin
raise "trunc" unless File.stat(f.path).size >= f.tell
rescue
$stderr << "#{f.path}: removed or truncated\n"
f.close
filedict[f.path] = nil
next
end
begin
block.call(f.path,f.readline) while true
rescue EOFError
true
end
end
reopen_counter += 1
sleep(0.5)
end # while true
end
def open_or_nil(filename)
begin
File.open(filename)
rescue
nil
end
end
if __FILE__ == $0
require 'getoptlong'
server = '127.0.0.1'
port = 5672
specxml = '/etc/amqp0-8.xml'
acts_as_consumer = false
opts = GetoptLong.new(
['--server', '-s', GetoptLong::REQUIRED_ARGUMENT],
['--port', '-p', GetoptLong::REQUIRED_ARGUMENT],
['--specxml', '-x', GetoptLong::REQUIRED_ARGUMENT],
['--consume', '-c', GetoptLong::NO_ARGUMENT])
opts.each do |opt,arg|
case opt
when '--server'
server = arg
when '--port'
port = arg.to_i
when '--specxml'
specxml = arg
when '--consume'
acts_as_consumer = true
end
end
# set up connection to rabbitmq broker
client = Qpid::Client.new(server, port, spec=Spec.load(specxml))
client.start({ "LOGIN" => "guest", "PASSWORD" => "guest" })
ch = client.channel(1)
ch.channel_open()
if acts_as_consumer
consumer(client, ch)
else
if ARGV.length == 0
puts __doc__
raise "List of file names is empty - nothing to do"
end
producer(client, ch, ARGV)
end
end
Tags: rabbitmq · ruby
It appears that Amazon EC2 instances always boot to runlevel 4, no matter what runlevel you set as default in your /etc/inittab. I found a very old reference to this fact in forums (see here), which explains *how* it happens (XEN does it) but doesn’t explain *why*. And yes, by passing “4″ as last argument to kernel “command line” (as you can see here) they can do it. I am just wondering why…
Tags: linux · virtualization
Today I discovered that Firefox 3 will refuse to display a site over HTTPS if its SSL certificate is revoked. And even though I am not questioning merits of this decision, I still would have preferred to have this behavior configurable, either somewhere deep in Preferences or at least via about:config (quick scan of the latter did not result in anything useful - did I overlook it?)
Tags: technology
It’s started - AA will be charging for each bag you check in (via Today In The Sky). People will stop checking in their bags at first of course. So if you are boarding in group 3 or late in group 2, expect to find no room in overhead bins to put your bag. And if it’s big enough not to fit under the seat in front of you (or if you are flying on MD80 and your seat is next to left engine - there is no seat in front of you at all, it’s just a wall) - you might be SOL.
I think AA can kiss good bye to their on time performance for at least several months (if they are lucky!), but it will be pretty sad if other airlines will follow their lead. Good luck to us all! I also sympathize with American’s flight attendants who will have to face a lot of very angry customers.
Tags: Misc
Tags: blogging
Tags: technology · work
What we in IT call a “bad state” (as in “application ended up in a bad state and needed to be restared”) in economics is called “bad equilibrium.” Here is more on General Equilibrium theory.
Tags: Economics · technology
Check this out - someone else is thinking along the same lines - http://elasticvapor.com/2008/05/virtual-private-cloud-vpc.html
Tags: cloud computing · technology · work
Starting today, Elastic Server On Demand allows you to select Phusion Passenger (mod_rails for Apache) as a web container for your Rails 2 application. This allows you to deploy a Rails app on Apache, the world’s most popular web server. Check it out at http://es.cohesiveft.com/site/rails2.
Tags: ruby · work