Oct 06

Difference between JDK, JRE and JVM

Understanding the difference between JDK, JRE and JVM is important in Java. We are having brief overview of JVM here.

If you want to get the detailed knowledge of Java Virtual Machine, move to the next page. Firstly, let’s see the basic differences between the JDK, JRE and JVM.

JVM

JVM (Java Virtual Machine) is an abstract machine. It is a specification that provides runtime environment in which java bytecode can be executed.

JVMs are available for many hardware and software platforms. JVM, JRE and JDK are platform dependent because configuration of each OS differs. But, Java is platform independent.

The JVM performs following main tasks:

  • Loads code
  • Verifies code
  • Executes code
  • Provides runtime environment

JRE

JRE is an acronym for Java Runtime Environment.It is used to provide runtime environment.It is the implementation of JVM. It physically exists. It contains set of libraries + other files that JVM uses at runtime.

Implementation of JVMs are also actively released by other companies besides Sun Micro Systems.

jre

JDK

JDK is an acronym for Java Development Kit.It physically exists.It contains JRE + development tools.

jdk

Sep 13

Multitier architecture | Enterprise application development

In Enterprise application development, multi tier architecture or say n-tier architecture is a client server based design which contains multiple layers to handle request, business logic and database processing. Here these development phases separated as presentation, application processing (business logic) and database communication. The most used multi-tier architecture design is three-tier architecture.

In enterprise application development we have considered some main architecture like

1 tier architecture :- Like a single desktop application which is using database but not the network for processing is the example of one tier architecture development. Basically, a one-tier architecture keeps all of the elements of an application, including the interface, middle-ware and back-end data, in one place. It’s also known as single-tier architecture.

1-tier-architecture-enterprise-app-development

2 tier architecture :- A two-tier enterprise application development architecture is a software architecture in which a presentation layer or interface runs on a client and a data layer gets stored on a another server. Separating these two components into different locations represents a two-tier architecture, as opposed to a single-tier architecture. Other kinds of multi-tier architectures add additional layers in distributed software design.

Image result for 1 tier architecture

3 tier architecture :- 3-Tier Architecture is most commonly used to build web applications. In this model, the browser acts like a client, middle-ware or an application server contains the business logic, and database servers handle data functions. This approach separates business logic from display and data. So the 3 layers commonly known as:Presentation Layer(PL/UI),Business Logic Layer(BLL) & Data Access Layer(DAL).

Image result for 3 tier architecture

N-Tier: In enterprise application development 3 or more tiers architecture is known as N-Tier architecture. Diagram below shows a typical N-Tier architecture. Some layers in 3-Tier can be broken further into more layers. These broken layers may be able to run in more tiers. For example, application layer can be broken into business layer, persistence layer or more. Presentation layer can be broken into client layer and client presenter layer. In diagram 2, in order to claim a complete N-Tier architecture, client presenter layer, business layer and data layer should be able to run in three separate computers (tiers). Practically, all these layers can also be deployed in one compute (tier).

 

Jun 16

Java: What’s the difference between equals() and ==?

.equals() -> evaluates to the comparison of values in the objects

== -> is a reference comparison, i.e. both objects point to the same memory location

The equals() method compares the “value” inside String instances (on the heap) irrespective if the two object references refer to the same String instance or not. If any two object references of type String refer to the same String instance then great! If the two object references refer to two different String instances .. it doesn’t make a difference. Its the “value” (that is: the contents of the character array) inside each String instance that is being compared.

On the other hand, the “==” operator compares the value of two object references to see whether they refer to the same String instance. If the value of both object references “refer to” the same String instance then the result of the boolean expression would be “true”..duh. If, on the other hand, the value of both object references “refer to” different String instances (even though both String instances have identical “values”, that is, the contents of the character arrays of each String instance are the same) the result of the boolean expression would be “false”.

example :-

public final class MyEqualityTest
{
public static void main( String args[] )
{
String s1 = new String( “Test” );
String s2 = new String( “Test” );

System.out.println( “\n1 – PRIMITIVES “);
System.out.println( s1 == s2 ); // false
System.out.println( s1.equals( s2 )); // true

A a1 = new A();
A a2 = new A();

System.out.println( “\n2 – OBJECT TYPES / STATIC VARIABLE” );
System.out.println( a1 == a2 ); // false
System.out.println( a1.s == a2.s ); // true
System.out.println( a1.s.equals( a2.s ) ); // true

B b1 = new B();
B b2 = new B();

System.out.println( “\n3 – OBJECT TYPES / NON-STATIC VARIABLE” );
System.out.println( b1 == b2 ); // false
System.out.println( b1.getS() == b2.getS() ); // false
System.out.println( b1.getS().equals( b2.getS() ) ); // true
}
}

final class A
{
// static
public static String s;
A()
{
this.s = new String( “aTest” );
}
}

final class B
{
private String s;
B()
{
this.s = new String( “aTest” );
}

public String getS()
{
return s;
}

}

Jun 16

Pentaho Business Analytics Suite

Pentaho BA suite is platform made available by Pentaho by which you can access, integrate, visualize and analyze your high volume data in systematic way. No matter data is stored in any file or relational databases or Big data technologies like Hadoop, NoSQL or in Cloud. Pentaho BA Suite provides facility for discovering, analyzing and visualizing data for decision making. The best thing which we can say for this is no need to have big coding knowledge for this. For customizing reports and other functionality workout you must need some development knowledge of SQL and Java.

Pentaho BA suite mainly consist of two important implementation part

  • BA Components: This helps us to create manage reports and dashboards with manages data modes of our design.
Table 1. BA Components Table
Component Type Name Description
Server BA Server and User Console Hosts Pentaho-created and user-created content. The BA Server is bundled with the User Console, which is a web-based interface that allows you to administer the server. The User Console also allows you to create business analytics content, display and schedule reports using a web-based interface, and manage Pentaho security.
Design Tool Aggregation Designer Provides you with a simple interface that allows you to create aggregate tables from levels within the dimensions you specify. Based on these selections, the Aggregation Designer generates the Data Definition Language (DDL) for creating the aggregate tables, the Data Manipulation Language (DML) for populating them, and an updated Mondrian schema which references the new aggregate tables.
Design Tool Metadata Editor Helps you build Pentaho metadata domains and models. A Pentaho Metadata Model maps the physical structure of your database into a logical business model. These mappings are stored in a centralized metadata repository and allow administrators to create business-language definitions for complex or cryptic database tables, set security parameters, localize data, add calculations, and format report data.
Design Tool Report Designer Generates pixel-perfect reports using a standalone client.
Design Tool Schema Workbench Allows you to edit and create multidimensional models. Adds security and complex calculations to the model.
Plugin Analyzer Helps you filter and visualize data to make informed business decisions.
Plugin Dashboard Designer Allows you to create a dashboard from Interactive and Analyzer reports.  You can also include charts, data tables, and URLs to web pages that you want to display.
Plugin Interactive Reports Creates template-based, on-demand reports in an intuitive, drag-and-drop environment.
Plugin Mobile Allows you to run and view content on a mobile platform.
  • DI Components: Connect to any data source perform ETL operations and manage Data.
Table 2. DI Components Table
Component Type Name Description
Server Data Integration Server The DI Server is a core component that executes data integration jobs and transformations using the Pentaho Data Integration Engine. It allows you to manage users and roles (default security) or integrate security to your existing security provider such as LDAP or Active Directory. The DI Server provides the ability to centrally store and manage your data integration jobs and transformations. It also provides the services allowing you to schedule and monitor scheduled activities, which are accessed from Spoon.
Design Tool Spoon Graphical design environment for modeling Jobs and Transformations. Transformations are metadata models describing the flow of data. Jobs are workflow-like models for coordinating resources, execution and dependencies of data integration activities. It also provides a user interface to the DI Server for managing security and schedules.
Design Tool Kitchen Command line tool for executing jobs modeled in Spoon. You can use Kitchen to run jobs at a specific time. For instance, you can use Kitchen to write a cron job that will generate a daily sales report at 3:00 a.m. each morning.
Design Tool Pan Command line tool for executing transformations modeled in Spoon. This is similar to Kitchen, but where Kitchen executes jobs, Pan executes transformations.
Design Tool Carte Carte is a web server that enables remote execution of jobs and transformations.
Plugin Agile BI

Provides a set of tools that allows developers to collaborate on BI project prototyping.  It provides Modeling and Visualization perspectives.

 

Jun 16

What is Pentaho?

When we start thinking for getting business analytics tools we start thinking for Pentaho. Actually we intended to use of All BA products of Pentaho. Yes Pentaho is a company.  What it’s about page says is

Pentaho, a Hitachi Group company, is a leading data integration and business analytics company with an enterprise-class, open source-based platform for diverse big data deployments. Our mission is to help organizations across industries harness the value from all their data, including big data and Internet of Things (IoT), enabling them to find new revenue streams, operate more efficiently, deliver outstanding service and minimize risk.

Pentaho Logo

Pentaho, actually provides product for requirement of

  • Big Data
  • Data Integration
  • Embedded Analytics
  • Business Analytics
  • Cloud Analytics
  • IoT Analytics

It’s Main Solutions towards areas like

  • Finance
  • Healthcare
  • Retail
  • Government
  • Enterprice

Pentaho provides services mainly of

  • Custom Dashboards
  • BA Consulting Services
  • Pentaho BA suite Training
  • Certification Program
  • Enterprise Support
  • Technical Support.