当前位置: 动力学知识库 > 问答 > 编程问答 >

Ruby: Memory Management for "Infinite Processes"

问题描述:

I'm wondering if I should even consider to write a server-like program in Ruby (which will run for an infinite amount of time), since I'm worried about memory bloating.

I already have read this: Ruby Memory Management

However I'm still asking myself if it's a bad idea in general to do something in Ruby that is more than a little script.

For example, I have a [Ruby] program that is creating images with RMagick every few minutes and uploads them to a server. The only "trick" that I found is to work with forks (I have a 'looper' that will start a fork every few minutes which is doing all the actual work).

Are there more elegant solutions to handle something like that in Ruby, or should I look for another language?

网友答案:

Ruby on Rails is written in Ruby. That answers your question if Ruby can be used for long-running servers or not.

分享给朋友:
您可能感兴趣的文章:
随机阅读: