SmartOS is used as a base platform for Triton (née SmartDataCenter), a 
datacenter orchestration platform. SmartDataCenter was written in js, so it 
made sense to write many of the necessary platform utilities in js as well 
because they either needed to work with upstack services or could share 
libraries.

There's nothing in the Unix philosophy that dictates what language things 
should be written in. The components written in node, do follow very well the 
Unix philosophy.

* Write programs that do one thing and do it well.
* Write programs to work together.
* Write programs to handle text streams, because that is a universal interface.

Node.js is quite good at fulfilling those tenets.

Additionally, a lot of effort has been put into mdb and dtrace for debugging 
node.js. Both of which are already used extensively by us for debugging the 
kernel and various C programs. So writing systems utilities in js gives us the 
same debugging workflow as C, which isn't something that can currently be done 
with languages like python, ruby, rust, or go (go is getting better, but that's 
only fairly recent, and still has a way to go).

So, there were a lot of reasons (and more than the ones I mentioned here). 
Node.js was best suited to what we needed at the time.

-- 
Brian Bennett
Systems Engineer, Cloud Operations
Joyent, Inc. | www.joyent.com <http://www.joyent.com/>

> On Oct 30, 2017, at 6:59 PM, Mayuresh Kathe <[email protected]> wrote:
> 
> On Mon, Oct 30, 2017 at 12:07:18PM -0700, Joshua M. Clulow wrote:
>> On 30 October 2017 at 11:42, Mayuresh Kathe <[email protected]> wrote:
>>> I have been wondering as to what be the purpose of having Node.js in
>>> SmartOS.
>>> I believe it's been there right from the very beginning.
>>> May I get to know more about it?
>> 
>> We have built a lot of tools using Node, some of which ship in the
>> SmartOS platform image.  The copy of "node" in the platform is shipped
>> as part of those tools.
> 
> Yes, I noticed that, and then digging up on various notes on the web led
> me to notice that "node" in a way is quite well integrated with SmartOS.
> 
> What I wanted to know is why was "node" chosen in the first place.
> No belittling anyone's intelligence, but, wouldn't the standard UNIX tools
> used while adhering to the UNIX philosophy have been good enough?
> 
> While pondering this, I also thought that JSON might be the key reason.
> Am I right?
> 
> Thanks,
> 
> ~Mayuresh
> 

Attachment: smime.p7s
Description: S/MIME cryptographic signature




-------------------------------------------
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com

Reply via email to