Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the JavaScript engine that runs mongoDB shell? [closed]

Is it V8? Can't seem to find this information.

like image 239
Randomblue Avatar asked Nov 30 '11 18:11

Randomblue


2 Answers

As of v3.1.7 it is SpiderMonkey - confirmed on the MongoDB 3.2 release notes.

The reasons are explained on the compatibility notes:

The change allows the use of more modern JavaScript language features, and comes along with minor mongo shell improvements and compatibility changes

There are some further notes on here.

A recent MongoDB release v3.3.5 received an update to the SpiderMonkey version to 45.0.2 ESR.

Development on switching back to SpiderMonkey from V8 was carried out in the v3.1.6 release - see SERVER-18531, but SpiderMonkey was not enabled by default until v3.1.7 - see SERVER-19376.

Before v3.1.6 it was the V8 JavaScript engine, which became the default in v2.3.1, according to the release notes and is also highlighted in the v2.4 release notes.

SpiderMonkey was removed from the source in v2.5.1

Before that, it was an extended SpiderMonkey v1.7 shell that used some non-standard JavaScript extensions, for example the ECMAScript for XML extensions.

It seems to have been V8 even further back, but was migrated in April 2009 from V8 to SpiderMonkey. It looks like it was still SpiderMonkey for MongoDB in v1.1.4 according to this post, but I can't find out when the original switch was.

like image 186
andyb Avatar answered Oct 23 '22 08:10

andyb


MongoDB uses SpiderMonkey, not V8.

Source: http://www.mongodb.org/display/DOCS/mongo+-+The+Interactive+Shell

You can build MongoDB with V8 if you want.

like image 41
Dutchman Avatar answered Oct 23 '22 10:10

Dutchman