Object-Oriented Programming Concepts


The Object-Oriented (OO) approach focuses on modeling and defining systems by organizing them into objects which express well-defined missions and responsibilities.

Java – Download Free EBooks and Whitepapers

Object-Oriented =Objects + Classes + Inheritance + Communication with messages

Java™ Application Development on Linux® – Free 599 Page eBook

Enterprise Java Virtualization:

Understanding the TCO Implications

InfoWorld’s Java IDE Comparison Strategy Guide:

Java Essential Training

Apache Jakarta Commons: Reusable Java™ Components

Enabling Rapid ROI: With Java™ – Based Business Intelligence Applications:

Classes

A class is a named collection of fields that hold data values and methods that operate on those values.

A class is a template or type that describes the field and methods that are grouped together to represent something.

A class is a non-primitive (user-defined) data type.

Instance variables + methods = members

class Point

{

private double x, y;

public Point(double first, double second)

{

x = first;

y = second;

}

public double distanceFromOrigin()

{

return Math.sqrt(x * x + y * y);

}

}

public class MyClass

{

public static void main(String[] args)

{

Point p = new Point(10, 10);

System.out.println(p.distanceFromOrigin());

}

}

Class fields

Also called per-class field

E.g.

private static int count;

public static final double PI=3.14159;

public static int SIMPLE=0,ONE_SPRING=1,TWO_SPRING=2;

Only a single copy of a static field exists. This field is associated with class itself and not with instances of a class.

Class methods  

Belongs to class a whole rather than an instance i.e. they are associated with class rather than object.

class Employee

{

static int total_employees;

static void clear()

{

total_employees = 0;

}

static int getTotalEmployees()

{

return total_employees;

}

}

In call: Employee.clear();

Instance fields 

Every object has own copy of instance fields.

Access

Inside class:          name

Outside class:       objectname.fieldname

Example

class Circle{

double r;

}

Circle c = new Circle();

c.r=2.0;

Circle d = new Circle();

d.r=c.r*2;

Instance Methods

Operates on an instance of a class

Example

Circle c = new Circle();

c.r=2.0;

double a=c.area();

Can access class fields/methods

Object 

Object is a real or abstract thing that has state, behaviour and identity.

a)      State: The information (data) an object maintains.

  • Data encapsulated by the object
  • Data stored as attributes
  • Customer address: changes even though customer does not
  • Some are immutable: customer id number

b)      Behaviour: the operations an object can perform

  • Object acts on messages (function calls)
  • Outside world interacts through messages: code generally doesn’t change the state directly
  • Have well-defined interface

c)      Identity: is the property of an object that distinguishes it from all other objects.

  • In programming, object normally referred to by a name, but the only really consistency identity is the address at which it is stored.

An object is an instance of a class.

public class Circle

{

private static int count;// data

private static final double PI = 3.1459;// data

// class method

public static double radToDeg(double rads)

{

return rads * 180 / PI;

}

private double r;// data

// constructor

public Circle(double radius)

{

r = radius;

}

// instance method

public double area()

{

return PI * r * r;

}

// instance method

public double circum()

{

return 2 * PI * r;

}

// class method

public static double area(double r)

{

return PI * r * r;

}

public static void main(String[] args)

{

double radius = 10;

Circle c = new Circle(radius);// instance created

System.out.println(c.area());

System.out.println(Circle.area(radius));

}

}

Constructor

A constructor is method defining declarations and instantiation of class of objects.

Example

Circle c = new Circle();

Every class in Java has at least one constructor whose name is same as the class name and whose purpose is to perform any necessary initialization for new object.

Default constructor: constructor with no arguments. No special initialization. If not defined any constructor, compiler generates a default constructor.

Defining a constructor

public class Circle{

public double r;

//default costructor

public Circle()

{

// TODO Auto-generated constructor stub

}

public static void main(String[] args)

{

Circle c= new Circle();

}

}

Refer to Constructors for detail information.

Encalsulation  

The wrapping up of data & methods into single unit is known as encapsulation.

The data is not accessible outside the methods wrapped in the class. Data is private & public methods become interface between object’s data & program.

Providing access to an object only through its messages, while keeping the details private is called information hiding.

There are degrees of information hiding, ranging from partially restricted visibility to total invisibility.

E.g.

class A {

int x;

public:       void set_x(int i) {x = i;}

int get_x() {return x;}

}

Data Abstraction  

Abstraction refers to the act of representing essential features without including the background details.

Suppose that we are doing graphics of some sort, and are concerned with X,Y points on a screen. Now, at a low enough level, a point might be described via a couple of floating-point numbers X and Y. But with data abstraction, we define a type “Point” that will refer to a point, and we hide from the users of the type just how such a point is implemented. Instead of directly using X,Y values, we present Point as a distinct data type, along with some operations on it.

Inheritance  

The sharing of features among classes related by generalization.

It refers to the sharing of attributes and operations among classes based on a hierarchical relationship. A class can be refined into subclasses and each subclass inherits all the properties of its subclass and adds its own unique properties.

Inheritance is the process by which one object can acquire the properties of one or more objects. More specifically, an object can inherit a general set of properties to which it can add those features that are specific only to it.

Example

class Person

{

private String name;

public void setName(String n)

{

name = n;

}

public String getName()

{

return name;

}

}

class Student extends Person

{

private String stuNum;

public void setStuNum(String sn)

{

stuNum = sn;

}

public String getStuNum()

{

return stuNum;

}

}

Shadowing superclass fields

public class A

{

int x;

}

public class B extends A

{

int x;

}

public class C extends B

{

int x;

}

          In methods of class C            Class referenced

x                                              C

this.x                                        C

super.x                                     B

((B)this).x                                B

((A)this).x                                A

super.super.x                           Not allowed

Method overriding

When a class defines an instance method using the same name, return type, and parameters as a method in its superclass that method overrides the method of the superclass.

  • Overriding is only for instance methods.
  • Class methods can be shadowed by a subclass but not overridden i.e. static methods do not participate in overriding. Overriding is not shadowing
  • Class methods cannot hide/shadow instance methods

static void g(){                       void g(){

}                                              }

  • Methods cannot be overridden to be more private; only to be more public.
  • Any exceptions declared in overriding method must be of the same type as those thrown by the super class, or a subclass of that type.
  • Final methods and private methods cannot be overridden.
Overloading Overriding
 Same name but different arguments. Same return type, name, arguments
Return type does not count Return type counts
Access modifiers also remain same. Access modifiers cannot be more restrictive.
No requirement relating to exceptions. It cannot throw more checked exceptions.
No inheritance, same class Inheritance
Compile-time Run-time (Dynamic binding)

Example 

class A{                                                      class B extends A{

int i=1;                                                       int i=2;

int f(){                                                        int f(){

return i;                                                     return -i;

}                                                                 }

static char g(){                                          static char g(){

return ‘A’;                                                   return ‘B’;

}                                                                 }

}                                                                 }

public class Test

{

public static void main(String[] args)

{

B b = new B();

System.out.println(b.i); // 2

System.out.println(b.f()); // -2

System.out.println(b.g()); // B

System.out.println(B.g()); // B

A a = (A) b;

System.out.println(a.i); // 1

System.out.println(a.f()); // -2

System.out.println(a.g()); // A

System.out.println(A.g()); // A

}

}

Abstract classes  

Superclass that declares the structure of a given abstraction without providing a complete implementation of every method is called an abstract class

  • Any class that contains one or more abstract methods must also be declared abstract.
  • Any subclass of an abstract class must either implement all of the abstract methods in the superclass or be itself abstract i.e subclass should override each of the abstract methods of its superclass and provide an implementation for all of them.
  • There can be no object of abstract class i.e. abstract class cannot be instantiated.
  • Cannot declare abstract constructors. Static, private, final methods cannot be abstract.

Example

abstract class A

{

abstract void call(); // abstract void call(){};

void call2()

{ // is CTE

System.out.println(“In call2”);

}

}

class B extends A

{

void call()

{

System.out.println(“In B”);

}

}

public class AbstractDemo

{

public static void main(String[] args)

{

B b = new B();

b.call();

}

}

Java source file (general form)

  • A single package statement                        (optional)
  • Any number of import statements                 (optional)
  • A single public class declaration                   (required)
  • Any number of package private classes         (optional)

Each file can contain at most one class that is declared public. A public class is one that is designed for use by other classes and packages.

The restriction on public classes only applies to top-level classes; a class can contain any number of nested or inner classes that are declared public.

Access protection/control

  • Modifiers specify the access rules for field/methods
  • Many levels of protection to allow fine-grained control over how visible variables and methods are.
  • Classes and packages are two means of encapsulating and containing the name space and scope of variables and methods.
private default protected public

Same class(defining class)

Yes Yes Yes Yes
Same package subclass No Yes Yes Yes
Same package non subclass No Yes Yes Yes
Different package subclass No No Yes Yes
Different package non subclass No No No Yes

         Rows indicate place from which want to gain access.

         public: Member is accessible anywhere the containing class is accessible. Least restrictive.

Use: For methods or constants that form part of the public API.

         protected: It is accessible to all classes within the package and also accessible within the body of any subclass of a class regardless of the package in which that subclass is defined.

Use: For subclass as a part of different package and cannot be changed without potentially breaking code that relies on them.

         default: It is accessible to code within all classes that are defined in the same package, but inaccessible outside the package. Also called package access.

Use: used by cooperating classes in same package

         private: Member is never accessible except within class. Hidden.

Keyword Effect Example
private Members are not accessible outside class. Making a constructor private prevents class being instantiated. Making a method private means that it can only be called from within the class. classFruit{private intgrams;private intcals_per_gram;privateFruit(){grams=55;cals_per_gram=0;}
None (package access) Members are accessible in classes in same package. A class can be given package access. classEmployee{String name;longsalary;static int total_emp;static voidclear(){total_emp=0;}}
protected Members are accessible in the package and in subclasses of this class. classEmp{protectedString name;protected longsalary;protected void give_raise(intamt){salary+=amt;}} 
public Members are accessible anywhere the class is accessible. public classEmp{public static voidmain(String[]args){}}

Interfaces  

Interface is a collection of constants and abstract methods. It is a specification without implementation.

public, static, final              by default public and abstract by default

         Contains instance methods not class methods

         All methods of an interface are implicitly public

         Cannot define instance fields

         Cannot be instantiated, does not define constructor

Rules

  • A class can implement any number of interfaces and any number of classes can implement interfaces.
  • If a class implements more than one interface, it must implement every method of each interface it implements. If not, class itself is abstract.
  • Each class is free to determine the details of its own implementation.
  • If interface is declared public then all methods implicitly become public.
  • If class implements two interfaces that declare the same method, then clients of either interface will use same method.

interface demoIF

{

void print(int param);

}

public class Client implements demoIF

{

public void print(int p)

{

System.out.println(p);

}

void non_if_method()

{

System.out.println(“non_if_method()”);

}

public static void main(String[] args)

{

Client c = new Client();

c.print(100);

}

}

Extending interfaces

One interface can inherit another by use of extends. This syntax is same as for inheriting classes.

A sub-interface inherits all abstract methods and constants of its super interface and can define new abstract methods and constants.

When a class implements an interface that inherits another interface, it must provide implementations for all methods defined within the interface inheritance chain.

Example

interface A

{

void m1();

void m2();

}

interface B extends A

{

void m3();

}

class MyClass implements B

{

public void m1()

{

System.out.println(“m1()”);

}

public void m2()

{

System.out.println(“m2()”);

}

public void m3()

{

System.out.println(“m3()”);

}

}

class IFextend

{

public static void main(String[] args)

{

MyClass obj = new MyClass();

obj.m1();

obj.m2();

obj.m3();

}

}

Other interesting Java related Posts you may like 🙂 :

What is Java? (clean-clouds.com)

Object-Oriented Programming Concepts (clean-clouds.com)

Java Language Fundamentals (clean-clouds.com)

Operators, Expressions and Control Structures in Java (clean-clouds.com)

Creating, Compiling and Running a Simple program in Java (clean-clouds.com)

Generics and Collections in Java (clean-clouds.com)

Applet and Swing in Java (clean-clouds.com)

JDBC in Java (clean-clouds.com)

Basic I/O in Java (clean-clouds.com)

Threads in Java (clean-clouds.com)

Packages in Java (clean-clouds.com)

Exceptions in Java (clean-clouds.com)

Using JavaDoc to document your Java Program (clean-clouds.com)

Java Coding Standards (clean-clouds.com)

Open Source ILS: Installation Guide for Koha on Ubuntu 11.10 or Ubuntu 11.04 or Ubuntu 10.10 or Ubuntu 10.04 LTS with MySQL 5 (clean-clouds.com)

REST and OO REST (clean-clouds.com)

Java Application in One JAR (clean-clouds.com)

Obfuscation in Java (clean-clouds.com)

Encryption~Hybrid Approach (clean-clouds.com)

Single Sign-On for Java and Web Applications

Bulletproof Java Code: A Practical Strategy for Developing Functional, Reliable, and Secure Java Code

Transforming a Generic Java IDE to Your Application Specific IDE:

The Java Virtual Appliance—No OS Required

BEA WebLogic® Operations Control: Application Virtualization for Enterprise Java

Enabling Rapid ROI: With Java™ – Based Business Intelligence Applications:

Advertisements

List of Good Cloud Computing Books


List of Good Cloud Computing Books

Cloud Computing – Download Free EBooks and Whitepapers
Mastering Cloud Computing: Foundations and Applications Programming
Mastering Cloud Computing: Foundations and Applications Programming

 

 Mastering Cloud Computing is designed for undergraduate students learning to develop cloud computing applications. Tomorrow’s applications won’t live on a single computer but will be deployed from and reside on a virtual server, accessible anywhere, any time. Tomorrow’s application developers need to understand the requirements of building apps for these virtual systems, including concurrent programming, high-performance computing, and data-intensive systems.

Cloud Computing: Principles and Paradigms
Cloud Computing: Principles and Paradigms
 The primary purpose of this book is to capture the state-of-the-art in Cloud Computing technologies and applications. The book will also aim to identify potential research directions and technologies that will facilitate creation a global market-place of cloud computing services supporting scientific, industrial, business, and consumer applications. We expect the book to serve as a reference for larger audience such as systems architects, practitioners, developers, new researchers and graduate level students.

VMware vCloud Director Cookbook
VMware vCloud Director Cookbook
  • Learn how to work with the vCloud API
  • Covers the recently launched VMware vCloud Suite 5.5
  • Step-by-step instructions to simplify infrastructure provisioning
  • Real-life implementation of tested recipes, packed with illustrations and programming examples

OpenStack Cloud Computing Cookbook - Second Edition
OpenStack Cloud Computing Cookbook – Second Edition
  • Updated for OpenStack Grizzly
  • Learn how to install, configure, and manage all of the OpenStack core projects including new topics like block storage and software defined networking
  • Learn how to build your Private Cloud utilizing DevOps and Continuous Integration tools and techniques

Cloud Security and Privacy: An Enterprise Perspective on Risks and Compliance (Theory in Practice)
Cloud Security and Privacy: An Enterprise Perspective on Risks and Compliance (Theory in Practice)
Ideal for IT staffers, information security and privacy practitioners, business managers, service providers, and investors alike, this book offers you sound advice from three well-known authorities in the tech security world. You’ll learn detailed information on cloud computing security that-until now-has been sorely lacking.

  • Review the current state of data security and storage in the cloud, including confidentiality, integrity, and availability
  • Learn about the identity and access management (IAM) practice for authentication, authorization, and auditing of the users accessing cloud services
  • Discover which security management frameworks and standards are relevant for the cloud
  • Understand the privacy aspects you need to consider in the cloud, including how they compare with traditional computing models
  • Learn the importance of audit and compliance functions within the cloud, and the various standards and frameworks to consider
  • Examine security delivered as a service-a different facet of cloud security

Enterprise Cloud Computing: A Strategy Guide for Business and Technology Leaders
Enterprise Cloud Computing: A Strategy Guide for Business and Technology Leaders
 We are witnessing the third seismic shift in information technology over the past fifty years. In the beginning it was centralized computing where mainframe computers gave companies economies of scale in handling their data processing. Then it was client-server computing driven by networks and PCs that gave companies new sources of efficiency. Now we are witnessing the emergence of a third computing model and it will have a huge impact on business, — especially in today’s economy full of unexpected change. As with the first two computing models as they emerged, we may not be totally sure what it is or how it will change the rules of business and create new winners and losers in the marketplace. It s called Cloud Computing and the economic and innovation implications are game changing. No one needs to know more about the business implications of Cloud Computing than C-level executives responsible for the future of their organizations, for the wow isn t just about technology, it s about the promise of on-demand business innovation. But even more than understanding this new wave, they need to act, and act now. Written by industry veterans with a combined leadership experience of over 100 years at the intersection of business and technology, Enterprise Cloud Computing provides strategic insights, describes the breakout business models and offers the planning and implementation guidance business and technology leaders need to chart their course ahead. This is the companion book to “Dot.Cloud: The 21st Century Business Platform.”

Install WildFly on Ubuntu 12.04 LTS and Ubuntu 12.10


WildFly = JBoss

Install JBoss 7.0.2 Application Server on on Ubuntu 12.04 LTS and Ubuntu 12.10 Ubuntu 11.10 or Ubuntu 11.04 or Ubuntu 10.10 or Ubuntu 10.04 LTS

Java – Download Free EBooks and Whitepapers

Application Server vs. Web Server
Application Server vs. Web Server
Application Servers in Java, .net and PHP
Application Servers in Java, .net and PHP

Application Server is a framework that provides execution environment for application written in specific Programming Language.

JBoss is an Open Source Java EE based Application server developed by Redhat which operates on Cross Platform. It supports Servlet Specification 3.3 and JSP specification of 2.2.

JBoss Application Server (Source: JBoss)
JBoss Application Server (Source: JBoss)

Before you install JBoss you’ll want to make sure that you’ve installed Java.

Use Synaptic Package Manager to install Java.

Use Synaptic Package Manager to install Java
Use Synaptic Package Manager to install Java
Synaptic Package Manager installing Java
Synaptic Package Manager installing Java
java -version
java -version
java -version
java -version

Licensing

JBoss is distributed under LGPL; LGPL is a free software license published by the Free Software Foundation (FSF). It was designed as a compromise between the strong-copyleft GNU General Public License or GPL and permissive licenses such as the BSD licenses and the MIT License.

Red Hat charges to provide a support service for:

  • ·JMS integration
  • ·Java Naming and Directory Interface (JNDI)
  • ·Java Transaction API (JTA)
  • ·Java Authorization Contract for Containers (JACC) integration
  • ·JavaMail
  • ·JavaServer Faces 1.2 (Mojarra)
  • ·Jport subscription for JBoss Enterprise Middleware.

Features

  • ·Java Server Pages
  • ·Java Servlet
  • ·JBoss Web ServicesS
  • ·JDBC
  • ·Load balancing
  • ·Aspect-oriented programming (AOP) support
  • ·Clustering
  • ·Deployment API
  • ·Distributed caching (using JBoss Cache, a standalone product)
  • ·Distributed deployment (farming)
  • ·Enterprise JavaBeans versions 3 and 2.1
  • ·Failover (including sessions)
  • ·Hibernate integration
  • ·Java Authentication and Authorization Service (JAAS)
  • ·Java EE Connector Architecture (JCA) integration
  • ·Java Management Extensions
  • ·Management API
  • ·OSGi framework
  • ·RMI-IIOP
  • ·SOAP with Attachments API for Java
  • ·Teiid data virtualization system- Teiid is a data virtualization system that allows applications to use data from multiple, heterogeneous data stores.

Requirements

Java SE 6 or later

Download

http://www.jboss.org/jbossas/downloads/

Download JBoss
Download JBoss

Extract the file into usr/share/

Extract files from JBoss Archive
Extract files from JBoss Archive
Extracting files from JBoss Archive
Extracting files from JBoss Archive
Extracted files for JBoss Standalone installation
Extracted files for JBoss Standalone installation

Now, Lets Test it…If we haven’t installed Java then we will get an ERROR.

Java not Found Error in JBoss installation
Java not Found Error in JBoss installation
JBoss Running
JBoss Running

Now lets open Jboss in Web Browser

JBoss Application Server 7
JBoss Application Server 7

Lets Verify the Admin Console

JBoss Application Server 7 Admin Console
JBoss Application Server 7 Admin Console

Start JBoss 7 as a service on Ubuntu

Previous versions of JBoss included a scripts (like jboss_init_redhat.sh) that could be copied to /etc/init.d in order to add it as a service – so it would start on boot up. I can’t seem to find any similar scripts in JBoss 7.

If you have copied from other editor or any web page then you will find some unwanted character in the file which will give you error when you will try to run the script.

Error: Bad Interpreter…

Verify Interpreter by “which sh” command in console

Result will be /bin/sh

Then verify the script openining it in VI editor.

Error: JBoss 7 as a service on Ubuntu
Error: JBoss 7 as a service on Ubuntu

Remove all unwanted Characters

JBoss 7 as a service on Ubuntu
JBoss 7 as a service on Ubuntu

Save it

JBoss 7 as a service on Ubuntu - Save Changes
JBoss 7 as a service on Ubuntu – Save Changes

Restart the Machine and try following

Restart JBoss Service
Restart JBoss Service

Done!!!

References

http://en.wikipedia.org/wiki/JBoss_application_server

http://en.wikipedia.org/wiki/Comparison_of_application_servers

http://en.wikipedia.org/wiki/Application_Server

http://stackoverflow.com/questions/6880902/start-jboss-7-as-a-service-on-linux

Install WildFly on Ubuntu in Amazon EC2 Micro Instance


WildFly == Jboss

Licensing

JBoss is distributed under LGPL; LGPL is a free software license published by the Free Software Foundation (FSF). It was designed as a compromise between the strong-copyleft GNU General Public License or GPL and permissive licenses such as the BSD licenses and the MIT License.

Java – Download Free EBooks and Whitepapers

  1. Create Amazon Machine Instance (AMI) with Ubuntu server 12.04.01 LTS in AWS Free Usage Tier? -> https://clean-clouds.com/2013/01/12/how-to-create-amazon-machine-instance-ami-in-aws-free-usage-tier/
  2. Verify whether Java is installed or not. in AWS instance we created, verify it with command java -version
  3. Download http://www.jboss.org/jbossas/downloads/
  4. Extract the file into usr/share/
  5. Edit standalone.xml file at /usr/share/jboss-as/standalone/configuration and edit the interface definitions to use address 0.0.0.0 instead of the default.
        <inet-address value="0.0.0.0"/>    <inet-address value="0.0.0.0"/>
    </interface>

    JBoss-standalone

  6. Run standalone.sh from bin
[root@domU-12-31-39-04-9C-B2 jboss-as-7.0.2.Final]# cd bin/[root@domU-12-31-39-04-9C-B2 bin]# ./standalone.sh=========================================================================JBoss Bootstrap EnvironmentJBOSS_HOME: /tmp/jboss-as-7.0.2.FinalJAVA: /usr/lib/jvm/jre/bin/javaJAVA_OPTS: -server -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true=========================================================================15:15:21,489 INFO  [org.jboss.modules] JBoss Modules version 1.0.2.GA15:15:21,910 INFO  [org.jboss.msc] JBoss MSC version 1.0.1.GA

15:15:21,975 INFO  [org.jboss.as] JBoss AS 7.0.2.Final “Arc” starting

15:15:23,444 WARN  [org.jboss.as] No security realm defined for native management service, all access will be unrestricted.

15:15:23,464 INFO  [org.jboss.as] creating http management service using network interface (management) port (9990)

15:15:23,467 WARN  [org.jboss.as] No security realm defined for http management service, all access will be unrestricted.

15:15:23,481 INFO  [org.jboss.as.logging] Removing bootstrap log handlers

15:15:23,497 INFO  [org.jboss.as.connector.subsystems.datasources] (Controller Boot Thread) Deploying JDBC-compliant driver class org.h2.Driver (version 1.2)

15:15:23,511 INFO  [org.jboss.as.clustering.infinispan.subsystem] (Controller Boot Thread) Activating Infinispan subsystem.

15:15:23,660 INFO  [org.jboss.as.naming] (Controller Boot Thread) JBAS011800: Activating Naming Subsystem

15:15:23,672 INFO  [org.jboss.as.naming] (MSC service thread 1-1) JBAS011802: Starting Naming Service

15:15:23,681 INFO  [org.jboss.as.osgi] (Controller Boot Thread) JBAS011910: Activating OSGi Subsystem

15:15:23,722 INFO  [org.jboss.as.security] (Controller Boot Thread) Activating Security Subsystem

15:15:23,726 INFO  [org.jboss.remoting] (MSC service thread 1-1) JBoss Remoting version 3.2.0.Beta2

15:15:23,785 INFO  [org.xnio] (MSC service thread 1-1) XNIO Version 3.0.0.Beta3

15:15:23,823 INFO  [org.xnio.nio] (MSC service thread 1-1) XNIO NIO Implementation Version 3.0.0.Beta3

15:15:24,149 INFO  [org.apache.catalina.core.AprLifecycleListener] (MSC service thread 1-1) The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64/server:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/amd64:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib

15:15:24,204 INFO  [org.jboss.as.remoting] (MSC service thread 1-2) Listening on /0.0.0.0:9999

15:15:24,212 INFO  [org.jboss.as.ee] (Controller Boot Thread) Activating EE subsystem

15:15:24,501 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-1) Starting Coyote HTTP/1.1 on http–0.0.0.0-8080

15:15:24,502 INFO  [org.jboss.as.jmx.JMXConnectorService] (MSC service thread 1-1) Starting remote JMX connector

15:15:24,735 INFO  [org.jboss.as.connector] (MSC service thread 1-2) Starting JCA Subsystem (JBoss IronJacamar 1.0.3.Final)

15:15:24,966 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) Bound data source [java:jboss/datasources/ExampleDS]

15:15:25,893 INFO  [org.jboss.as.deployment] (MSC service thread 1-2) Started FileSystemDeploymentService for directory /tmp/jboss-as-7.0.2.Final/standalone/deployments

15:15:25,921 INFO  [org.jboss.as] (Controller Boot Thread) JBoss AS 7.0.2.Final “Arc” started in 4812ms – Started 93 of 148 services (55 services are passive or on-demand)

Jboss

Done!

what is cloud computing Definition – with real world examples


Definition of Cloud Computing with Real World Example

The curious question is: what is Cloud computing Definition with real world example? It is a disruptive and innovative model for enabling convenient, on-demand, and flexible access to a shared pool of computing resources such as networks, servers, storage, applications, and services which are configurable and can be quickly provisioned and de-provisioned with minimal or no management effort or service provider interaction.

Cloud Computing – Download Free EBooks and Whitepapers

This model is composed of three service models, four deployment models, and five essential characteristics as per NIST.

On-demand self-service: Use credit card and use resources  such as compute, storage, database from cloud environment without any interaction with service providers or any delay due to workflows and permissions. It takes less than a MINUTE! And believe me, you are not day dreaming…It is a reality.

Go to http://aws.amazon.com/ and verify yourself

  • Real world example: SMS activation:
  • Prerequisite: Enough balance in the Mobile (Map it with Credit Card in Cloud environment )
  • Request Service by calling on *110# (Airtel) (Map it with http://aws.amazon.com in Cloud environment )
  • And you can easily use the services required

Balance/Usage: with *123*3# you know the available amount of SMS (In case of Cloud, All Cloud Service Provider gives Dashboard/ Management Console/ Cost Control Dashboard which gives you  information regarding your resource usage, cost and many more things.

Cloud Computing Billing (Source: Google)
Cloud Computing Billing (Source: Google)

Broad network access: Computing resources such as compute and storage capacity are available over network / on internet or intranet and they can be accessed via various devices such as smartphones, iPads, mobile phones, tablets, laptops, and workstations.

Real world example: Videos on Mobile Web – Applications, wallpapers and ringtones from Internet are used

Smartphone
Smartphone

The more suitable example can be the way we watch videos over internet; similarly we can use various resources on Cloud as well…

Youtube on Smartphone
Youtube on Smartphone

Resource pooling: A resource pool is a set of resource which is homogeneous with respect to some activity, action or context. Cloud Service provider create a pool of all computing resources to serve multiple consumers in a multi-tenant environment, where different physical and virtual resources are dynamically assigned and re-assigned according to demand.

Resource Pooling (Source - VMware)
Resource Pooling (Source – VMware)

Real world example: In software engineering, a connection pool is considered as a cache of database connections so that the connections can be reused in case of future requests to the database are required.

Purpose: To enhance performance of executing database commands

In case of cloud environment, resources are pooled together and its capacities are used in unified manner to enhance the performance and customer satisfaction.

Rapid elasticity: Application can expand on demand, across all its tiers  such as presentation layer, database layer,application layer – MVC).  It also implies that application components can grow independently from each other. So if you require more storage for database, you should be able to grow that tier without affecting the availabilityof that application, reconfiguration, or changing the other tiers.

Real world example: In physics, elasticity or stretchiness is the physical property of a material that returns to its original shape after the stress e.g. external forces (Consider Peak Hours as external forces in cloud environment)

 

Cloud Computing - Elasticity
Cloud Computing – Elasticity

Measured service: Cloud environment automatically control and optimize resource use by leveraging a metering or chargeback capacity. The basic value proposition of cloud computing is its utility based price model where you pay for what you use. Resource usage in cloud environment can be monitored, controlled, and notified via alerts, dashboards. It is a very basic feature which is essential in Cloud environment

Real world example: Consumers pay for electricity as they have used it

 

Cloud Computing - Measured Service
Cloud Computing – Measured Service

It’s not a Technology…It’s an innovation…Idea….