开发者

Using EC2 to run CPU-heavy tasks

So I'm trying to figure out what's involved with doing the following using EC2:

I've got a desktop application that sometimes has to do cpu-intensive operations. What I need to do is offload these tasks to a cloud server which w开发者_Python百科ill run a version of the app specifically to handle the running of that task and return the results.

There will be situations where multiple instances of the desktop app are being run by different users and several might request offloading of tasks concurrently.

My question: Can the desktop app establish its own new EC2 instance to do the work and, if so, does is there a single ip address that it connects to to start the instance creation? When the instance is created, does it get its own IP address?

As you can see by my question I'm misunderstanding some key part of the EC2 system. Some clarification would be much appreciated


Amazon has an EC2 API that can be used to create, modify, or delete instances. This API is available in many of the popular programming languages so your desktop app should be able able to stat an EC2 instance and offload the work automatically.

http://www.programmableweb.com/api/amazon-ec2/links

Each new EC2 instance has its own unique public IP address which can be retrieved via the APIs mentioned above.

Amazon EC2 has a free usage tier that allows you to run one micro instance at a time, free for a year. So go ahead and try it out, even if you run more than one instance at a time, its super cheap. At least use the free micro instance to become farmiliar with how EC2 works.

In your code

  • Detect need to offload computation
  • Use EC2 API to create another instance of a saved virtual machine state you previously setup
  • Use the API to get the IP address of the new instance
  • Connect to the IP address of the instance you just started and tell it what work to do
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜