Monday, November 23, 2015

CloudFoundry – Getting started


This article helps you getting started on cloudfoundry. This does not explain on the cloudfoundry concepts.

Step 1: Create an account in pivotal cloudfoundry. 
                You can create a 2 months free subscription account from pivotal cloudfoundry services web site https://run.pivotal.io. An organization as the name specifies – can be your company name, project group or so.
The space is nothing but the environment you wish to create, you may want to have a development, qa and production spaces. In short applications are hosted in spaces (environemnts) and spaces belongs to an organization.



Step 2: Create a simple spring application, you can also create in Grails, Ruby etc., You can use maven, gradle as the build tool.
                You can use spring boot to create a simple application. Please refer http://ndeiveehan.blogspot.com/2015/11/spring-boot-getting-started.html to create a new spring application.

You can also create in other languages as Cloudfoundry offers other buildpacks.
Once created, you can generate the war or jar using the maven command.

Step 3: Login to cloudfoundry and create required organization and spaces.
From you PC, login to cloudfoundry using the CLI tools.
cf login -a https://api.run.pivotal.io

Enter your credentials to login.



Step 4: Deploy your application.
You can push the apps in the following ways:
- Use the Cloudfoundry CLI tool.
- Use cloufdoundry eclipse plugin.
- Use a build plugin to integrate deployment as part of your build tool.
 but this article shows you how to push application using the CLI tool.

Now issue the following cf command.
cf push springbootfirst -p target/springbootfirst-0.0.1-SNAPSHOT.jar
               
 This command uploads the spring jar file to the cloudfoundry site and starts the server. 

Step 5: You can now access the web application in the following web url:




Now there is a lot more you can do using CF tool such as:
-          Configuring your own domain instead of cfapps.io.
  • Scale up an application.
  • Deleting an app, renaming it, start or stop an application.
  • View logs for an application
  • Enable ssh for an application.
  • View services from the market place.
  •  Create, update organizations, spaces, buildpacks etc.,
  •  Perform user administration on organizations / projects.



See you in the next article on cloudfoundry. 

Spring boot - Getting started

Spring boot - Getting started


This article explains how to get started on Spring boot. Assuming you already have JDK, maven and eclipse installed in your PC, lets get started. 


Step 1: Create a simple maven project in eclipse.
Step 2: Create the following parent definition in pom
       <parent>
              <groupId>org.springframework.boot</groupId>
              <artifactId>spring-boot-starter-parent</artifactId>
              <version>1.3.0.RELEASE</version>
       </parent>

Add the following dependencies
              <dependency>
                     <groupId>org.springframework.boot</groupId>
                     <artifactId>spring-boot-starter-web</artifactId>
              </dependency>
Spring boot starter web dependency takes care of loading required jars for the web such as spring web etc., No more hassles on the need to remember the spring jars and version names.

Step 3: Create a simple web controller
@RestController
@EnableAutoConfiguration
public class SampleController {

       @RequestMapping("/")
       String home() {
              return "Hi Buddy";
       }
      
       public static void main(String args[]) {
              SpringApplication.run(SampleController.class, args);
       }
}
The EnableAutoConfiguration annotation informs boot to automatically configure required annotations based on the jars that you have added in your application. Cool isn’t it.
Run the Above Sample Controller as a java application
What just happened. When did I start the web server ??
Actually Spring boot takes care of that. When you actually run SpringApplication.run, it internally runs a web server and then loads the controller into that server.




Step 4: Invoke the controller in the web browser: 


Simple and easy to develop without having to worry about dependencies or the server. 

Now if you don’t want to add the parent pom for whatever reasons like you want to add your own project parent pom or so, you can add the following dependencies.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>1.3.0.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>

You may also want to add the following to package your project as an executable jar.
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>






Monday, August 10, 2015

Amazon Web Services - Products overview

Following are the list of products Amazon web services offers. 


Compute
  • EC2: A service which allows user to rent servers with different configurations. You can choose the instance based on memory, diskspace, speed and other attributes and you pay on a per hour basis. You can shut down the instance at any time, and you pay for what you use. There are preconfigured machine images available that you can choose from different OS available ranging from Ubuntu, Windows and other OSs. 
  • ECS: EC2 container services make developer/network person life easy by making it easy to deploy, manage and scale Docker containers. 
  • Lamda: A compute service that executes developer’s code in response to events. The developer don’t need to have a developer environment, he can directly code in the AWS browser console or upload code. The events to respond can be “whenever an artifact has been uploaded into S3”. The main advantage is you donate have to worry about the infrastructure at all. You pay pay for the time taken for the code to get executed. Its a new approach to event driven computing. 
Storage
  • S3: S3 is storage solution, you pay for the storage and the bandwidth. S3 is very reliable and 99.99% available. With S3, you might want to store static content of a web site or data generated out of a project in a storage service so that it is available globally. S3 is often used with other AWS products such as EC2. Its very easy to use. Following are different ways by which you can store and retrieve data. 
      • Using Command line interface. 
      • using AWS console. 
      • Using AWS SDK. 
  • Elastic File system: is a new sharable file storage service that provides multiple EC2 instances to access a fully managed file system using NFSv4 protocol. You will be able to access using the CLI, console and AWS SDK. 
  • Glacier:  a low cost data archival storage for storing less frequently used data but for a much lower cost than S3. This service is effective for archiving. You have to use if you don’t want to access daily. The retrieval time is slow but cheaper. 
  • Cloudfront: is a content delivery service. You can use Cloudfront console / API to easily distribute content to end users with low latency, high data transfer speeds. You can use HTTP/HTTPS or RTMP to stream the content stored in cloud front. 

Network: 
  • VPC: This service lets you configure your instance in a virtual network that you define. You have complete control over your networking environment. You can control which port to open to which group and can leverage multiple layers of security. 
  • Direct Connect: This service helps you in establishing a dedicated connection from your office infrastructure to AWS environment. This can reduce the network cost and increase the bandwidth throughput. 
  • Route 54: This is a domain naming service from Amazon which helps you in mapping your domain name to the instance you have. 

Database
  • RDS: A service which helps in setting up and managing an RDBMS, scaling them in a easy and cost efficient way. 
  • DynamoDB: A no-sql database solution from Amazon which developers can use to store the content in a faster manner. Its a fully managed service which stores in document and key-value pair format. 
  • ElasticCache: An in memory caching engine that makes it easy to deploy, operate and scale an in memory cache in the cloud. It supports memcached and redis. 

Analytics
  • Redshift: a data warehouse solution from AWS to analyse all your data using existing BI tools. 
  • EMR: This is a managed hadoop environment which can be used out of the box to run hadoop jobs. With this service you don’t have to worry about the environment. You just have to upload the job file, input and output folders in S3. You can define the no. of instances you need - EMR will run the job - output the job content in the S3 file you define. EMR can also terminate the instances once the job is complete. 
  • Kinesis: Kinesis is a managed cloud service from Amazon to process real time data over large distributed data streams. The data can be captured from variety of stores such as web site click streams, social feeds, financial data transactions, sensor data, IT logs and location tracking events. 
  • Data pipeline: AWS Data Pipeline is a cloud-based data workflow service that helps you process and move data between different AWS services and on-premise data sources.
  • Amazon Machine learning: using this service, developers of any skill level can use the ML apis. It provides visualization tools and wizards that guides you through the process of creating ML models. This is highly scalable and is capable of predicting billions of predictions daily. 

Enterprise applications
  • Amazon Workspaces: a managed desktop computing service in the cloud. Using this the network engineers can easily provision cloud based desktops that the users can use their iPads, desktops, laptops to access the content. 
  • WorkMail: an email and calendering service from AWS for existing desktop and mobile email clients. 
  • Workdocs: A fully managed solution to store electronic documents with more features such as security, access provision, share and edit features. 

Application
  • SQS: A simple managed message queuing service that is fast reliable and scalable. It makes it simple and cost effective solution to send and receive messages to SQS. 
  • SWF: a workflow services which can be used to co-ordinate between application components. 
  • SES: a cost effective email sending service. The service can be used via AWS SDK that comes in different languages. 
  • SNS: with SNS you can send notifications to mobile phones - Apple APNS, GCIM for google, windows and other major mobile platforms. 
  • CloudSearch: With this service, you can quickly build a cost-effective solution to setup, manage and scale a search solution for your web site. 
  • AppStream: With this service, you can stream your existing application from the cloud, reaching more users without code modifications. 
Deployment & management
  • Elastic Beanstalk: A PAAS solution from AWS to help users deploy their application from their desktop in a easier way. There are Eclipse plugins available which you can use to move the artifact/scale up in AWS with a click of a button in the eclipse. 
  • OpsWorks: An application management service that helps you in deploy and operate applications of all shapes and sizes. With this you can automate server scaling, software configuration, database setups. This also provides operation to automatic instance scaling, instance monitoring etc., With this you create your entire application as stacks on top of layers. These layers are blueprints that helps you in deploying in a easy way. 
  • Cloud Formation: provides network engineers templates so that they can easily create and manage a collection of related AWS resources. 
  • Code Deploy: a service that automates code deploy to any instance. helps you rapidly release new resources. 
  • Code Pipeline:  a continuous delivery service for faster and reliable application updates. 
  • Code commit: a service that makes it easy for companies to host private GIT repositories. It eliminates the need to manage your own code versioning system. 

Security & Administration
  • CloudWatch: A monitoring tool for AWS products. 
  • Config: lets you have the full visibility of all AWS resources. 
  • CloudTrail: service that records AWS API calls you have made and provides the log files for analysis. It stores information such as IP address of the caller, request parameters etc., 
  • IAM: fine grained granular control of AWS services
  • Directory: A managed directory service. 
  • KMS: encryiption and key management service for the cloud. 


Sunday, August 9, 2015

AngularJS Basics

AngularJS is a Javascript framework which makes it incredibly easy to build web applications

Features of AngularJS: There are many features in AngularJS, primarily 2-way data binding, OO way of JS development, easy mapping between dom and JS model, Create custom tags, Dirty check on objects, implementing Routers.

Components:
  • RouteProvider
  • AngularJS templates (or) partials. 
  • Module
  • Controller

MVC: 
  • View holds the html fragments
  • Controller - holds the action to be performed
  • Model: holds data by getting from the REST services. 

Some attributes: 
  • ng-app: tell that this html page contains angularJS app
  • ng-model: bind the model to the div
  • ng-bind: used to bind the input tag to the model
  • ng-repeat: used to iterate through a list of model and display content. 
  • ng-controller: defines the controller that will be used for this div or section. 
  • ng-show | ng-hide: hide or show a div or section
  • ng-include: include another file in the html


AngularJS Directives: 
You can use directives in different ways:
  • As an attribute to a tag. 
  • As an element
  • As a class
  • As a comment
ng-init: used to initialise angularJS variables

You can also create custom directives: 

You have to use .directive method in the module to define a directive
myAppModule.directive('colorList', function () {
    return {
        restrict: 'AE',
        template:
              "<button ng-click='showHideColors()' type='button'>"
            + "{{isHidden ? 'Show Available Colors' : 'Hide Available Colors'}}"
            + "</button><div ng-hide='isHidden' id='colorContainer'>"
            + "</div>"

        }
});

AngularJS validation: 
  • $dirty
  • $valid
  • $invalid
  • $pristine

AngularJS Expressions: 
<p>My first expression: {{ 5 + 5 }}</p>
(or) 
<p>My first expression: {{ emp.getValue }}</p>
where emp is a angularJS model. 

AngularJS Filters: used to filter a list of values and display 
<div ng-app="myApp" ng-controller="personCtrl">
<p>The name is {{ lastName | uppercase }}</p>
</div>

You can also create custom filters in AngularJS:


Events:
  • ng-click
  • ng-double-click

Angular Services:
$http: 
app.controller('customersCtrl', function($scope, $http) {
    $http.get("http://www.w3schools.com/angular/customers.php")
    .success(function(response) {$scope.names = response.records;});
});

var promise = $http({method: 'POST', url: 'memberservices/register', data: theData});

$window: represents browser window object. 
$location: gets information about the url and gives it to your application
$document: jqlite reference

You can also create custom services: 



—————————— Code Snippets ————————
Simplest AngularJS program
Enter your name : <input type="text" ng-model="ename">
Hello {{ ename }}
<script type="text/javascript" src="../js/lib/angular.min.js"></script>

Sample app code: 
<div ng-app="myApp" ng-controller="myCtrl">

First Name: <input type="text" ng-model="firstName"><br>
Last Name: <input type="text" ng-model="lastName"><br>
<br>
Full Name: {{firstName + " " + lastName}}

</div>

<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
    $scope.firstName= "John";
    $scope.lastName= "Doe";
});
</script>

RouteProvider: used to define which AngularJS controller to call when you hit a URL
helloWorldApp.config(['$routeProvider', '$locationProvider', 
function($routeProvider, $locationProvider){ 
 $routeProvider
   when('/', { 
     templateUrl: 'partials/main.html', 
     controller: 'MainCtrl' }).
   when('/show', { 
     templateUrl: 'partials/show.html', 
     controller: 'ShowCtrl' 
}); 

AngularJS Templates: 
  • ng-view

AngularJS Controllers: 
  • Define methods which would inturn get the data from the server
      • use $http
var addonsControllers = 
  angular.module('addonsControllers', []);

addonsControllers.controller('AddonsCtrl', 
  ['$scope', 'checkCreds', '$location', 'AddonsList', '$http', 'getToken',
    function AddonsCtrl($scope, checkCreds, $location, AddonsList, 
      $http, getToken) {
        if (checkCreds() !== true) {
            $location.path('/loginForm');
        }

        $http.defaults.headers.common['Authorization'] = 
          'Basic ' + getToken();
        AddonsList.getList({},
           function success(response) { 
              console.log("Success:" + 
                     JSON.stringify(response));
                    $scope.addonsList = response;
           },
           function error(errorResponse) {
              console.log("Error:" + 
                     JSON.stringify(errorResponse));                   
           }
        );
        $scope.addonsActiveClass = "active";
}]);

ng-repeat
<li ng-repeat="phone in phones | filter:query">
          {{phone.name}}
          <p>{{phone.snippet}}</p>
        </li>


External controllers: 
<div ng-app="myApp" ng-controller="personCtrl">

First Name: <input type="text" ng-model="firstName"><br>
Last Name: <input type="text" ng-model="lastName"><br>
<br>
Full Name: {{firstName + " " + lastName}}

</div>


<script src="personController.js"></script>

Spring security - different options

Spring provides options to perform authentication and authorisation. 

Authenticating using Spring: 
Spring provides the following features as part of authentication: 
  • Basic Authentication: process authentication based on user credentials present int he urls. 
  • Form based login: This is a default form which is provided as popup box to enter user credentials. 
  • Custom form: You can also create your own forms, but need to follow some rules so that Spring knows which is the form, its userid and password fields. 
  • Logout service: The user can logout using the logout url, the user object maintained in the session is removed. 
  • Remember me support. 

The data for authentication can reside in different places. Spring authentication provider provides support for user details to be 
  • hardcoded in memory files 
  <authentication-provider>
    <user-service>
        <user name="admin" password="secret" authorities="ROLE_ADMIN,ROLE_USER" />
        <user name="user1" password="1111" authorities="ROLE_USER" />
        <user name="user2" password="2222" disabled="true" authorities="ROLE_USER" />
    </user-service>
  </authentication-provider>
  • in the user SQL database. 
    @Override
    protected void configure(AuthenticationManagerBuilder auth) throws Exception {
        auth.jdbcAuthentication()
                .dataSource(dataSource)
                .usersByUsernameQuery(
                        "SELECT username, password, 'true' as enabled FROM member WHERE username = ?")
                .authoritiesByUsernameQuery(
                        "SELECT member.username, member_role.role as authorities " +
                        "FROM member, member_role " +
                        "WHERE  member.username = ? AND member.id = member_role.member_id");
    }
  • Custom store - may be file or NOSQL storage. 
Create your own user details object and validate from wherever you want - DB, ftp etc., 
  • Identity store, you can retrieve using LDAP.
    <authentication-manager>
      <authentication-provider>
        <password-encoder hash="{sha}" />
        <ldap-user-service server-ref="ldapServer"
          user-search-filter="uid={0}" user-search-base="ou=people"
          group-search-filter="member={0}" group-search-base="ou=groups" />
      </authentication-provider>
    </authentication-manager>

    <ldap-server id="ldapServer"
        url="ldap://localhost:1389/dc=springrecipes,dc=com"
        manager-dn="cn=Directory Manager" manager-password="ldap" />

The configuration will also need to take care of what is the form page, what is the default successful url once logged in, the logout url, url signatures that need to be authenticated, userid and password field, action url of spring security. 

Securing URL Access

You can secure methods using different ways: 

@Configuration
@EnableGlobalMethodSecurity(securedEnabled = true)
public class ApplicationConfig { ... }

In the controller, 
  @Secured({"ROLE_USER", "ROLE_GUEST"})
    public List<Message> listMessages() {
        ...

    }

Implementing Data access layer using Spring - different options

This scrap note explains different ways by which you can implement Data access layer using Spring. Spring provides different ways for faster development of Data access layers. 

Using Direct JDBC: 
  • Creating the Datasource
In this you can configure the Datasource by providing the JDBC url, connection factory, user credentials string and create the DAO manually 
  • Creating DAO and accessing them
You can manually create the DAO and manually define methods for inserting, deleting, retrieving and modifying the entities. 

Using JDBC Template: 
In this you can use JDBCTemplate which simplifies the work for you, you have to create the JDBCTemplate on top of the data source you have defined. JDBCTemplate can be used to query and provide simple implementations to map to objects. 

Using Spring Data Modules: 
Spring data modules are the easiest way to implement DAO. 
In this you using data modules defined for each database type such as MongoDB, Cassandra or JPA etc., 

In Spring data modules you
  • Directly define the entities. 
  • The default CRUD implementation is provided for you. 
  • In case of custom implementation for DAO, you just provide the interface definition, the implementation is provided by the container. 

Its a very fast way of developing the Repository layer. 

There are lot of Spring data modules available such as
  • Spring data MongoDB
  • Spring data Cassandra
  • Spring data JPA 
  • Spring data REDIS

You can find more information about Spring data projects in http://projects.spring.io/spring-data/

When to use what: 
You can use Spring data modules for faster development, however it is not very flexible, but supports most of the day to day activities you perform with the DB, in case you want more control - you can go for JDBC Template. If you want full control, you can go for direct JDBC implementations, but you have to spend a lot of time in the mapping etc., 

Spring and Transaction management
There are 2 ways by which you can handle transactions
  • Programmatic way
  • Declarative way

Programmatic:
In the programmatic way, you have to manage your transaction which means you have to commit or rollback using the transaction manager API. 

Declarative: 
Declarative is the preferred way by most developers. 
  • Using AOP
  • Using @Transactional annotation. 

The @Transactional attribute supports the following attributes
  • REQUIRED
  • REQUIRES_NEW
  • SUPPORTS
  • NOT_SUPPORTED
  • MANDATORY
  • NEVER
  • NESTED

Isolation attributes
  • Dirty read
  • Non repeatable read
  • Phantom read
  • Lost updates. 

Isolation levels by Spring
  • DEFAULT
  • READ_UNCOMMITTED
  • READ_COMMITTED
  • REPEATABLE_READ
  • SERIALIZABLE


Spring MVC - Refreshing basics

Spring MVC is a way provided by Spring to handle and operate on web requests. 

The following steps are performed for any web requests. 
  • The request is sent to the Dispatcher servlet
  • The Dispatcher servlet passes the request to the handler mapping component. 
  • The handler mapping component returns the respective controller. 
  • The Controller receives the request along with the request attributes, performs the business logic and returns back the Model and view. 
  • The dispatcher servlet resolves the view name using the View resolver component.
  • The dispatcher servlet now knows which view to forward to, hence returns the respective view to the page. 

What should you do to get started using Spring mvc
  • Include required maven artifacts such as spring-webmvc and spring-web in your pom.xml
  • Add the component scanning class, just to tell container which classes to look out for. 
  • @EnableWebMvc to enable spring mvc in your application configuration file. 
  • Create Spring controllers: 
    • Tell the class that this is a controller class using @Controller
    • Define @RequestMapping annotation at the class level 
    • Define @RequestMapping annotation at the method level 
  • Create JSP views and provide view resolver mapping. 
  • Provide implementation in the controller method by accepting the input parameters, processing it and returning response. 

Signature of the controller method: 

The signature of the method of the controller is open ended, hence it can accept a variety of input parameters. Following are the possible parameters. 
  • The servlet request or servlet response
  • Request parameters annotated by @RequestParam annotation
  • Model attributes annotated by @ModelAttribute annotation
  • Cookie value in the incoming request using @CookieValue annotation
  • Map or model map for the user to had his own attributes. 
  • Errors or BindingResult for the user to add errors / validation result. 
and more options such as SessionStatus. 

@RequestMapping options: 
@RequestMapping("/member/add”)
@RequestMapping(value={"/member/remove","/member/delete"}, method=RequestMethod.GET)
@RequestMapping(value= "processUser", method =  RequestMethod.POST)

Note
  • You can use handler interceptor to provide implementation for pre / post processing of web requests. 
  • You can use resource bundle & message properties to implement internationalization. 
  • You can handle all the exceptions in one place using HandlerExceptionResolvers. 
  • You can publish data as rest services using @Requestmapping and @PathVariable. The return type can be XML or JSON depending upon the configuration 
  • You can produce JSON responses using Jackson mapping and @ResponseBody annotation. 
  • You can also access REST services using RESTTemplate class, there are multiple methods available to perform REST operation such as getForObject, put, delete, postForEntity etc., 
  • You can publish RSS feds using jdom. 


Spring basics

Spring - Basics (refreshing the basics)

This scrap note includes: 
  • Configuring beans using @Configuration
  • Creating beans and referencing them
  • Bean scopes

Configuring beans using @Configuration
You can configure actions such as configuring all the beans, reading resources from the property files, establishing connection to database in the @Configuration class.

@Configuration
@ComponentScan(basePackages = "com.deiveehan")
@PropertySource(value = "classpath:application.properties")
public class ApplicationConfig {

  @Inject
  Environment environment;

  @Bean
  public InternalResourceViewResolver configureInternalResourceViewResolver() {
    InternalResourceViewResolver resolver = new InternalResourceViewResolver();
    resolver.setPrefix("/WEB-INF/views/");
    resolver.setSuffix(".jsp");
    return resolver;
  }
}

Note: 
  • @Configuration is used to tell that this is a Bean configuration file. 
  • @ComponentScan is used to tell the container where to look for the class files. 
  • @PropertySource is used to define the properties file. 
  • environment.getProperty("host”) is used to get the property value. 
  • @Bean is used to define the beans. 

Creating beans and referencing them

You can create beans in 2 ways - using xml or using bean configuration files. 

Using annotation: 
@Bean is used to define a bean and 

Referencing beans: 
@Autowired is used to reference a bean
You can autowire a bean at the class level and at the method level. 

Example: 
@Configuration
@EnableMongoRepositories(basePackages = {
"com.deivee.framework.mongorepository",
“com.deivee.app.mongorepository" })
public class MongoDBConfig {

@Autowired
Environment environment;

@Bean
public Mongo mongo() throws Exception {
  return new Mongo(environment.getProperty("host"));
}
@Bean
public MongoTemplate mongoTemplate() throws Exception {
  return new MongoTemplate(mongo(),
  environment.getProperty("mongoDBName"));
}
}

and the MongoTemplate can be accessed in any bean class as below

@Autowired MongoTemplate. 

Bean scopes

There are 5 different types of bean scopes in Spring
  • singleton (single bean instance per container)
  • prototype (new bean each time when referred)
  • request (new bean for each request) 
  • session (available for the entire session)
  • globalsession (for a global http session, valid for portal application). 

For example you can create the scope for the bean when you create it. 
@Component
@Scope("prototype")
public class LoginAction {
Misc: 

  • You can use @PostConstruct to perform action after it is constructed and use @PreDestroy to perform action before it is destroyed. 
  • You can use @Profile to create profiles for different environment. 
  • You can detect the type of device that is sending the request using this String userAgent = request.getHeader("User-Agent”); the value of userAgent will be android, iPad, kindle etc., 
  • You can also use spring with other web frameworks such as JSF. 

Friday, July 24, 2015

Vuzix glass - Basics

What is Vuzix: 

Vuzix is an android based wearable device with recording features & connectivity options such as Wifi/BLE capabilities, mainly designed for professional users


How to run: 
  • Mode: 
    • local: apps can be load into onboarded memory. 
    • paring Android device and using Vuzix as a heads up display. 
    • Both: local and pairing to communicate and collaborate with android device. 
  • OS 2.0 
    • provided by Vuzix which is built on top of Android 4.0.4. 
    • Support for Android, iOS (in development). 

Features: 
  • Captures 5MP camera and 1080p HD videos, memory - 4gb expandable to 32 GB. 
  • provides 3 buttons - to control vuzix and the android apps (i.e., select options in android app, back and android menu options can be controlled in Vuzix). 
  • Voice navigation: Recognition performed locally, so no internet connection required, can also navigate completely using voice, (eg., move right, left, show menu, go home etc
  • M100 can act as a heads up display for legacy android apps while the partner device itself can act as a touch pad / keyboard controls. 
  • Gesturing. 
  • Built in native apps in M100 which helps the user in performing basic features such as 
    • calling msging where the head unit can be used to scroll contacts and initiate call, the partner device will be used for calling while M100 will be used as a headset. 
    • view calendar apps and move to next appointment by using voice commands and more. 
  • Smart glass manager Android app which can be used to control the M100 device. 

General spec: 
Vuzix: 5MP, 1080p, WQVGA display, left / right eye usable, 1 GB RAM, Android 4.0.4, 4GB flash expandable to 32 GB via external miscrosd slot. supports BLE / wifi. 
Glass: 5MP, 720p, 16gb flash (not expandable), supports Bluetooth / wifi. 

How to get started in Vuzix. 
  • Sign up and purchase Vuzix SDK - cost $199, pay an annual registration fee if you want to stay updated. 
  • Vuzix promises to have a M100 specific app store in the future. As of now, we need to upload programs using ADB drivers. 

Differences from google glass: 
  • While Glass app need to be compiled with GDK (i.e., Android native apps cannot be viewed in Glass, the app need to be compiled in GDK to be viewed), Vuzix can act as a head display for Android apps. The apps being viewed in M100 can be controlled via the buttons, voice commands or even the android device (acting as a touch pad and keyboard). 
  • Glass supports latest version (Kit kat) while Vuzix supports ICS -4.0.4). 
  • Glass has companion app for Android and IOS while Vuzix supports Android today, IOS in development. 
  • Glass 1500$ while Vuzix costs 1000$ and SDK costs 199$, GDK is free. 
  • Vuzix has 1GB RAM and 4gb built in flash (expandable to 32 GB), while glass does not provide an external SD card slot. 
  • Glass gets heated within 10-15 mins of using continuously and gets heated even faster if you are using AR app, not sure about Vuzix. 
Hope you got some information about vuzix. 
Visit this site for more information about Vuzix products