Thursday, 31 October 2013

What is new in Java 8 - Part 3


Lambda expressions are coming to Java in version 8. Lambda expressions are designed to allow code to be streamlined. When a Lambda expression is written, it is translated into a functional interface at compile time. Here is an example of using Lambda expressions to replace an anonymous inner class with much cleaner and more readable code.
  
Old way without Lambda:

button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
System.out.println(“Action Detected”);
}
}
);
New way with Lambda:
button.addActionListener(e -> {
System.out.println(“Action Detected”);
}
);

New Feature In Oracle 12 C - Pluggable Databases

In Oracle 12c, in a plug-gable database environment, we can create a single database container, and plug multiple databases into this container. All these databases then share the exact same oracle server/background processes and memory, unlike the previous versions where each database has its own background processes and shared memory. This helps in database consolidation and reduces the overhead of managing multiple desperate databases.

Container Database (CDB): Are the core data dictionary objects that come after an Oracle database installation.
Pluggable Database (PDB): Data dictionary objects and data related to the application. We can have many PDB plugged into a single CDB.
A new admin role "CDB Administrator" has been introduced in Oracle 12.1 release databases.
Multiple databases can then share a master LGWR process, but have their own dedicated LGWR process within the container.
All Oracle database options/features are available on the PDB level.
RMAN backup at CDB level.

We can unplug a PDB from a CDB to another CDB.

PDB's can be cloned inside the CDB.

Management of PDB (clone/creation/plug/unplug/drop) are implemented as SQLs.

Extremely fast PDB-provisioning (clone inside the CDB), because each CDB comes with a “PDB Seed”.
Database patch/upgrade management very quick as CDB is a single point of installation.

Each PDB has its own data dictionary.

Data Guard configuration on CDB as whole

RMAN point-in-time recovery at PDB level (while other PDB's remains open)

Resource Manager is extended for creating, unplugging, plugging in, and cloning, dropping or even setting up for the open mode of the PDB.   

Flashback of a PDB should be available for Oracle12c Release 2.
Entire containers can be backed up in single run, regardless of how many databases they contain.
Upgrade one container database and all pluggable databases are upgraded.

New Commands

create pluggable database
alter pluggable database
drop pluggable database


Sunday, 27 October 2013

What is new in Java 8 - Part 2



Stream handling in Java8:

The better way of usage of main components of collections called streams. This is not replacement of collections but we can say this is an enhancement over collections.

In Stream it is one-time-use object, once it is traversed it cannot be re-traversed. Stream traverse is of two modes

  •    Sequential
  •   Parallel

In sequential Traversing:

As the name indicates as Sequential each item in the stream is read processed, then the next item is read till it reaches end of stream.
Ex:
            List <Library> book = list.getStream.collect(Collectors.toList()); 

Parallel Traverse:
On parallel traverse, the array is split into multiple segments, each of which is processed individually on a different thread. The results are then put back together for the output.

Ex: 

List <Library> book = list.getStream.parallel().collect(Collectors.toList());
Parallel Traverse by Split model:

Parallel stream flow:  

    List originalList = someData;
            split1 = originalList(0, mid);
            split2 = originalList(mid,end);
            new Runnable(split1.process());
            new Runnable(split2.process());
            List revisedList = split1 + split2;

New feature in Oracle 12C - Data Guard

       Data Guard -


Oracle Database 12c introduces a new redo transportation method which omits the acknowledgement (to primary) of the transaction on the standby. This feature is called "Fast Sync" redo transport.
Creating a new type of redo destination called "Far Sync Standby". 

A "Far Sync Standby" is composed only of the standby control files, the standby redo logs and some disk space for archive logs which shall be sent to the Standby database. Failover & Switchover operations are totally transparent as the "Far Sync Standby" cannot be used as the target.

Data Guard Broker commands have been extended. The "validate database" command to checks whether the database is ready for role transition or not.

Data guard Broker now supports cascaded standby.

      Global Temporary Tables can now be used on an Active Guard standby database.

Tuesday, 22 October 2013

New Feature In Oracle 12 C - Patching:


The new feature in Oracle 12 C is-

·         Centralized patching-
  • We can test patches on database copies, rolling patches out centrally once testing is completed
Compression:
Automated compression with heat map.

Optimization can be run on live databases without any disruption. Data optimization will monitor the data usage and with policy archive old data and hot data will be compressed for faster access. Inactive data can be more aggressively compressed or archived, greatly reducing storage costs.

Advanced Row compression (for Hot Data).
Columnar Query compression (for Warm Data).
Columnar Archive compression (for Archive Data).