{"id":2853,"date":"2015-04-23T16:24:48","date_gmt":"2015-04-23T16:24:48","guid":{"rendered":"http:\/\/13.52.125.237\/?p=2853"},"modified":"2015-04-24T17:23:06","modified_gmt":"2015-04-24T17:23:06","slug":"meteor-development-moved-to-windows","status":"publish","type":"post","link":"https:\/\/sotaenterprises.com\/?p=2853","title":{"rendered":"Meteor Development Moved to Windows"},"content":{"rendered":"<p>For almost two years, I&#8217;ve been developing Meteor using several\u00a0Ubuntu VMWare virtual machines\u00a0running inside a Windows host; this weekend, I moved all of my Meteor development functions to Windows native, taking advantage of\u00a0the new Meteor Windows support.<\/p>\n<p><a href=\"http:\/\/sotaenterprises.com\/wp-content\/uploads\/2015\/04\/meteorwindows.jpg\"><img loading=\"lazy\" class=\"aligncenter  wp-image-2883\" src=\"http:\/\/sotaenterprises.com\/wp-content\/uploads\/2015\/04\/meteorwindows.jpg\" alt=\"meteorwindows\" width=\"727\" height=\"465\" srcset=\"https:\/\/sotaenterprises.com\/wp-content\/uploads\/2015\/04\/meteorwindows.jpg 1066w, https:\/\/sotaenterprises.com\/wp-content\/uploads\/2015\/04\/meteorwindows-300x192.jpg 300w, https:\/\/sotaenterprises.com\/wp-content\/uploads\/2015\/04\/meteorwindows-1030x660.jpg 1030w, https:\/\/sotaenterprises.com\/wp-content\/uploads\/2015\/04\/meteorwindows-705x452.jpg 705w, https:\/\/sotaenterprises.com\/wp-content\/uploads\/2015\/04\/meteorwindows-450x288.jpg 450w\" sizes=\"(max-width: 727px) 100vw, 727px\" \/><\/a><\/p>\n<p>You might ask: why would one\u00a0do this?\u00a0 The main reason is that it will smooth out some kinks in my development process. \u00a0Much of this has to do with Eclipse.\u00a0 Many months back, I used to run Eclipse on Ubuntu (Unity) on VMWare, and I\u2019d do all of my editing from within the Ubuntu operating system.<\/p>\n<p>This approach had a couple of drawbacks: speed, and also VMWare Ubuntu limits you to only a single display.\u00a0 This is a significant drawback with Meteor, because there is a huge efficiency advantage to having HTML, CSS and JavaScript side-by-side on separate displays.\u00a0 Most Meteor developers tend to do this, because all three types of artifacts are interdependent, and you can see how they work together\u00a0at a glance. \u00a0I\u2019ll often rough out the HTML and CSS for a page, then start building JavaScript that refers to the HTML elements by IDs or classes.\u00a0 These artifacts evolve in tandem, and with a single display you are constantly having to switch back and forth trying to remember the names of things as you make changes.<\/p>\n<p>Because I desperately needed multiple displays, I was doing something kludgy:\u00a0 I had created a network mount\u00a0on Ubuntu (which contained my source code), then using Eclipse on Windows, I was able to map a network drive to that Ubuntu network share using Samba.\u00a0 The effect was my Windows Eclipse would modify the Ubuntu-resident source code, and I could therefore use multiple displays.\u00a0 In order to build or do other things, I\u2019d switch over to Ubuntu, but editing was done on Windows.<\/p>\n<p>This worked, and I\u2019ve had this setup for several months, but there were some problems.\u00a0 Some of the Eclipse plug-ins do a lot of I\/O to the folders, and I think the Eclipse developers didn&#8217;t anticipate that developers\u00a0would have their source folders on Ubuntu network drive.\u00a0 Many operations, such as simply changing a line of JavaScript would cause the Eclipse client to hang for as much as 30 seconds.\u00a0 This would not happen every time, so it was tolerable.\u00a0 Also, checking into GitHub was extremely slow, a commit could take several minutes for a large check-in.\u00a0 Lastly, the Eclipse syntax highlighting logic apparently does a lot of I\/O to determine whether a JavaScript variable is local, argument or global.\u00a0 This would mean that after making a change, I\u2019d often have to wait 30 seconds or more for the system to properly color the variables.<\/p>\n<p>Now, all of that waiting is history.\u00a0 Changes to JavaScript are instant, and syntax highlighting is almost instant.\u00a0 \u00a0Moreover, my MongoDB is now on a native SSD, so performance is better (on my system, all VMWare machines are on a spinning hard drive because SSD space is at a premium).<\/p>\n<p>I am now building Meteor on Windows.\u00a0 I have created a bunch of batch scripts that support the build\/release process, including scripts to automatically SSH or FTP builds to my test Ubuntu machine or EC2.<\/p>\n<p>So, things are better, but not perfect.\u00a0 Because Meteor Windows support is bleeding-edge, there are some warning messages that are generated during the build and install processes.\u00a0 Apparently these messages are non-fatal, but they can give you pause because during those operations you tend to want everything to go perfectly.\u00a0 I believe that when Meteor upgrades to a later version of Node.js these problems will be solved.\u00a0 Currently Meteor is on Node.js 0.10.36, which is a couple of releases back (Node.js is now at 0.12.X).<\/p>\n<p>I still have one mundane task left to complete this process, and that is to get my Windows MongoDB database set up as a replica set so that it closely matches production.\u00a0 Replica set can really help Meteor performance, because Meteor can leverage the so-called OPLOG to get notified of state changes in MongoDB the second they happen.\u00a0 Without a replica set, Meteor goes into a different mode where it polls for state changes.\u00a0\u00a0 It also spends a significant amount of time doing comparisons (before and after) of result sets to infer state changes.\u00a0 None of this is needed with OPLOG enabled, so once this is done I should be getting snappy performance from my development environment. \u00a0We\u00a0have OPLOG tailing set up on\u00a0on all of our production instances, and I can attest it makes a big difference.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For almost two years, I&#8217;ve been developing Meteor using several\u00a0Ubuntu VMWare virtual machines\u00a0running inside a Windows host; this weekend, I moved all of my Meteor development functions to Windows native, taking advantage of\u00a0the new Meteor Windows support. You might ask: why would one\u00a0do this?\u00a0 The main reason is that it will smooth out some kinks [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0},"categories":[1],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/sotaenterprises.com\/index.php?rest_route=\/wp\/v2\/posts\/2853"}],"collection":[{"href":"https:\/\/sotaenterprises.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sotaenterprises.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sotaenterprises.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sotaenterprises.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2853"}],"version-history":[{"count":5,"href":"https:\/\/sotaenterprises.com\/index.php?rest_route=\/wp\/v2\/posts\/2853\/revisions"}],"predecessor-version":[{"id":2884,"href":"https:\/\/sotaenterprises.com\/index.php?rest_route=\/wp\/v2\/posts\/2853\/revisions\/2884"}],"wp:attachment":[{"href":"https:\/\/sotaenterprises.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2853"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sotaenterprises.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2853"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sotaenterprises.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2853"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}