Harmony

The problem statement(S)
How can multiple teams
all work together
on a huge product
under a tight deadline?
What tools / processes are other
companies using to solve
these problems?
angularjs

Angularjs modules


reusable components

angularJS

why is angular so popular
- Reduces boiler plate associated with updating the dom
- Good separation of model and view
- Module system
- Dependency injection
- Testing is part of the package
- Just enough structure, yet flexible
- Create your own html tags
- <emc-graphic>, <emc-list>, <emc-guided-ui>, ...
- Developed by Google to speed up development
- Open-sourced in 2011
angular.js modules
- Dependency injection at it's core
- Applications are made up of modules
-
Modules can package component libraries
-
Modules can package whole features
-
Modules can even package whole applications
- Modules can be worked on separately
- Separate repositories
- Versioned
- Testable
- Mockable
GUI FEATURES = Modules
Login
Error/Success Messaging
Navigation
User Management
Role-Based Access
Inactivity Timeout
Dashboard
Status Bar
User Preferences
Localization
...
DPAD FEATURES = modules
Systems List
System Details
Backup Config
Replication Config
File-Level Recovery
Activity Monitoring
...
Example: Login
emc.angular.login
-
publish it
-
use it
how can we all use it?
With 3 simple steps!
1. Use bower to install it
bower install http://ucas-gitlab.lss.emc.com/gui/emc.angular.login.git#0.0.6
2. Add a dependency in your application
"emc.angular.login",
3. Add a script tag to your html file
<script srce=".../emc.angular.login.js"></script>
bower

A look at bower.json
{
"name": "hyperv-flr",
"version": "0.1.2",
"dependencies": {
"angular": "1.2.6",
"jquery": "~1.10.2",
"emc-ui": "http://ucaslab.lss.emc.com/gui/emc-ui#0.1.12",
"emc-angular-login": "http://ucaslab.lss.emc.com:gui/emc-login#0.1.4"
},
"devDependencies": {
"angular-mocks": "1.2.6",
"angular-scenario": "1.2.6"
}
}
install ALL the dependencies listed in bower.json
bower install
bower works for millions
- installed through npm
- runs on node
- runs over git
- created by twitter ( open sourced )
which millions?
- jquery
- angularjs
- underscore
- 12,077 registered gui packages
- AND both EMC FLR Projects
secret saucE
wait! we can do even more!
This is not limited to GUI components
running in browsers

node overview
- What it is
- What it's good for (and not good for)
- Why it's so popular
- Why it matters to us
What is node.js ?
- Javascript on the server
- Made possible by Google's V8 virtual machine
- V8 is the engine inside Chrome browser
- Ryan Dahl, started in 2009, released in 2011
- Started because : he wanted a web application framework built with two-way communication in mind.
- Written in C/C++, .js (downloadable libraries available for all popular OSes)
- Open source (MIT license)
- 516 contributors on github
What can you do with NODE?
- Basics (File IO, Network IO, TCP,UDP,HTTP, REST,...)
- Database drivers (Mongo, Couch, Cassandra,...)
- Message bus drivers (AMQP, JMS)
- Call Java APIs (node java bridge)
- Unit test frameworks (Mocha, Jasmine)
- Code test coverage (Istanbul)
- Static code analysis (JSHint)
- Build automation (Grunt)
- There are 73k node packages in the node package repository
- Home automation?!
Who is using node?
this is how we use node
In BRM 1.2 we used Java Jersey for REST

this is how we use node
Harmony HyperV FLR we use Node for REST

What node is really good at
Many patterns and libraries for solving common problems:
- Mapping URLs to handlers, cache busting, cookies, ...
- Two-way communication with web sockets
- Easily building fast scalable network applications
- Event loop, single thread, non-blocking IO
- Same technique as Nginx HTTP server
What node is not so good at
- CPU intensive tasks
- Only uses a single CPU core
- Simple CRUD, static HTML Apps
node single thread

node vs java at paypal

Node is state of the art for internet apps
- First we had Java / J2EE
- Then 'better faster lighter java'
- Spring, Hibernate, ...
- Then Ruby, Ruby on Rails, Django
- MVC, convention based
- Alternative JVM languages
- Scala, Groovy, Grails, ...
- Today we have node.js
- Node takes the best parts of previous technologies


comparing web tech popularity

Why is node so popular
- For better or worse, javascript is the most popular programming language on the planet
-
Built-in HTTP server
- Excellent package management (NPM)
- Speed of development
- Github fork, pull, merge
- Github has 20 mil monthly uniques, 180th site on the webs
- Handles high concurrency without any hard thinking
how can node benefit harmony
- Big talent pool, simple language, low development time
- So says LinkedIn, Ebay, Walmart
- Enables smaller more agile teams
- The pattern is to build isolated testable, mockable, components
-
Build an internal library of small reusable components
- Using the popular Github model
- Really about the tools
- Leverage the momentum of the node community
- tons of on-line resources, community meetups, etc.
NPM ( Node package manager )
dpad's private github
Currently has 35 modules
GUI Modules
- emc-ui
- emc-angular-login
- emc-angular-utils
- emc-hypervflr-gui
- ...
Node Middleware
- emc-base-server
- emc-rest-login
- emc-harmony-auth
- emc-rest-hypervflr
- ...
package.json
{
"name": "emc-rest-hypervflr",
"private": true,
"description": "REST for hypervflr",
"version": "0.0.1",
"dependencies": {
"emc-base-server": "ucas-gitlab.lss.emc.com/raven/emc-base-server.git",
"emc-rest-login": "ucas-gitlab.lss.emc.com/raven/emc-rest-login.git",
"emc-harmony-auth": "ucas-gitlab.lss.emc.com/raven/emc-harmony-auth.git",
"underscore": "~1.6.0",
...
},
"devDependencies": {
....
install dependencies
npm install
The problem statement(S) - revisited
How can multiple teams
all work together
on a huge product
under a tight deadline?
What tools / processes are other
companies using to solve
these problems?
secret sauce (revised)
Harmony
By Dehru Cromer
Harmony
- 1,184