Why port a daemon from ruby to C++

Hello,

I’m was reading about ‘Clearskies[1]’, an interesting project, when I
crossed this quote:

“There is an effort to port the daemon to C++ in a different repository
which will replace the ruby proof-of-concept once it’s ready.”

Are there any generally accepted reasons, speed apart, for which one
would want to port a daemon from ruby to C++?

Best regards,

[1] https://github.com/jewel/clearskies

Panagiotis (atmosx) Atmatzidis

email: [email protected]
URL: http://www.convalesco.org
GnuPG ID: 0x1A7BFEC5
gpg --keyserver pgp.mit.edu --recv-keys 1A7BFEC5

Panagiotis A. [email protected] wrote:

Are there any generally accepted reasons, speed apart, for which one
would want to port a daemon from ruby to C++?

Ease-of-installation. It’s likely more systems have a C++ toolchain
installed than a Ruby runtime. The Ruby world evolves more rapidly than
C++, so users are more likely to have to deal with installation issues,
especially tough for users unfamiliar with Ruby.

It doesn’t help that stable versions of Linux distros tend to ship Ruby
versions which are several years old, so users end up having to manage
Ruby installs themselves (or resort to 3rd-party tools like rbenv/rvm).

I don’t know C++, but I have some experience with Perl vs C99: I wrote
an experimental server[1] in C99 and GNU autotools. Its main claim to
popularity within the small community of MogileFS users seems to be its
ease-of-build, install and deploy as a single file (compared to its Perl
equivalent). I don’t think users cared that it was a new, relatively
unproven codebase written from scratch, nor that it does strange things
unseen/uncommon in mainstream servers.

[1] - http://bogomips.org/cmogstored/README

Are there any generally accepted reasons, speed apart, for which
one would want to port a daemon from ruby to C++?

No other reason makes sense.

speed is the only reason.

The laziness of some admins nor the incompetence of distributions to
provide users with components that can easily be updated on its own,
won’t function as excuse to be able to update a system.

So the proper answer is speed.

You do gain more advantages with C++ though because you can use other
languages like python as well. Or lua, whereas if you use only ruby, you
are stuck with ruby - AND it is slow!

Subject: Re: Why port a daemon from ruby to C++
Date: lun 24 feb 14 09:53:23 +0000

Quoting Eric W. ([email protected]):

Ease-of-installation. It’s likely more systems have a C++ toolchain
installed than a Ruby runtime. The Ruby world evolves more rapidly than
C++, so users are more likely to have to deal with installation issues,
especially tough for users unfamiliar with Ruby.

My two eurocents: Ruby is much better in implementing the OO paradigm
than C++. Thus, writing Ruby extensions in C++ is not a good idea,
unless you write C code and have it compiled under C++, which is what
many do. But in that case, it is much better to just use C (and not
get forever lost in the messy tangle of STL and other wonders).

Carlo

On Mon, Feb 24, 2014 at 11:02 AM, Carlo E. Prelz [email protected]
wrote:

My two eurocents: Ruby is much better in implementing the OO paradigm
than C++. Thus, writing Ruby extensions in C++ is not a good idea,
unless you write C code and have it compiled under C++, which is what
many do. But in that case, it is much better to just use C (and not
get forever lost in the messy tangle of STL and other wonders).

Not sure what you are getting at: this is about Ruby vs. C++ - not
mixing both. The question was about porting a demon from Ruby to C++

  • not parts of it. What did I miss?

Kind regards

robert

On Mon, Feb 24, 2014 at 12:59 PM, Carlo E. Prelz [email protected]
wrote:

maintaining the daemon in Ruby, but code the parts that require
a performance boost in C.

So basically you were slightly changing the question to “Are there any
generally accepted reasons, speed apart, for which one would want to
port a daemon [or parts of it] from ruby to C++?” :wink:

I thought it was evident. Sorry if it wasn’t.

No sweat. Thanks for clarifying!

Kind regards

robert

Subject: Re: Why port a daemon from ruby to C++
Date: Mon 24 Feb 14 12:51:23PM +0100

Quoting Robert K. ([email protected]):

Not sure what you are getting at: this is about Ruby vs. C++ - not
mixing both. The question was about porting a demon from Ruby to C++

  • not parts of it. What did I miss?

Instead of thinking about porting from Ruby to C++, you can think of
maintaining the daemon in Ruby, but code the parts that require
a performance boost in C.

I thought it was evident. Sorry if it wasn’t.

Carlo

Smaller memory footprint?
Less dependencies?
More platforms supportted, like a wi-fi router for example (with or
without a complete operating system)?

Abinoam Jr.

On Mon, Feb 24, 2014 at 5:37 AM, Panagiotis A.

Abinoam Jr. wrote in post #1137817:

Smaller memory footprint?
Less dependencies?
More platforms supportted,
code obfuscation
performance
masochism (for that, you should use ADA…)

+1 for masochism !

On Mon, Feb 24, 2014 at 8:39 PM, Abinoam Jr. [email protected] wrote:

+1 for masochism !

Whether it’s that or sadism probably depends on who has to maintain the
code…

robert

On Tue, Feb 25, 2014 at 1:21 AM, Robert K.
[email protected] wrote:

On Mon, Feb 24, 2014 at 8:39 PM, Abinoam Jr. [email protected] wrote:

+1 for masochism !

Whether it’s that or sadism probably depends on who has to maintain the code…

+1 for diversity!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs