In this blog, we are going to talk about caching in Hibernate.
Hibernate is an ORM Framework for Java. It is a framework for mapping Object-Oriented Model to Relational Model. Hibernate is concerned with data persistence as it applies to relational databases (via JDBC). It performs powerful object-relational mapping and query databases using HQL and SQL. It can cut down a lot of complexity and thus defects as well from your application, which may otherwise find a way to exist. We can also say it is a boon for developers with limited knowledge of SQL.
Why String is Immutable?
This is one of the most popular interview questions. In this blog, we are going to talk about it and find the answer. String is one of the most used Class in any Application. For storing the username, password, address, IP address etc, we need to create String objects. So it is necessary to understand why our most famous and used Class is Immutable.
In our last three blogs, we have talked about the HDFS,Zookeeper &HBase Cluster, which is needed for deploying OpenTSDB in clustered mode. Continuing to the series, In this blog, we will finally deploy the OpenTSDB.
OpenTSDB is a distributed, scalable, time series database built on top of Hadoop and HBase.
OpenTSDB can collect, store & serve billions of the data points without any loss of precision. Which makes it a perfect solution for the monitoring system.
In our last two blogs, we talked about the HDFS Cluster & Zookeeper Cluster. Which is needed for deploying OpenTSDB in clustered mode. Continuing to the series, In this blog, we are going to talk about HBase which will be used by OpenTSDB in the cluster to store data.
HBase is a column-oriented NoSQL database management system that runs on top of Hadoop Distributed File System (HDFS).
Redis stands for Remote Dictionary Server. It is opensource, in-memory key value data strucure store, which is extremely fast. In other words, it can also called as caching no sql database.
So, Redis is no sql database which can be used as a cache or message broker. The data structure supported by it are lists, hashes, strings, sets, sorted sorts with range queries, bitmaps, hyperloglogs and geo spatial indexes with radius queries. It has built in replication, Lua scripting, LRU eviction, transcations and different levels of one-disk persistence. It also provides high availiblity via Redis Sentinel and automatic partitioning with Redis cluster.
In our last blog, we talked about the HDFS cluster. Which is needed for deploying OpenTSDB in clustered mode. Continuing to the series, In this blog, we are going to talk about ZOOKEEPER which will be used by HBase & OpenTSDB in the cluster.
Before talking about ZooKeeper lets understand what is Distributed system and the need of ZooKeeper in Distributed System.
When a software system composed of independent computing entities linked together by a computer network and its components communicate and coordinate with each other to achieve a common goal is known and Distributed System. ex: Multiplayer online games like Clash of Clan
We are going to start a series of blog on HDFS, Zookeeper, HBase & OpenTSDB and will see How to setup an OpenTSDB cluster using these services. In this blog, we will study about HDFS.
The Hadoop Distributed File System (HDFS) is a Java-based distributed file system that is fault-tolerant, scalable and extremelyeasy to expand. It is designed to run on commodity hardware and can be deployed on low-cost hardware. HDFS is the primary distributed storage for Hadoop applications. It provides interfaces for applications to move closer to data.
Sometimes we have to run a long-running task in a separate thread and return the result once execution is complete. Using Java Runnable interface we can run a task, but the disadvantage is it does not return result once execution is complete.
Then how can we achieve this?
There are two interfaces available in java.util.concurrent package using them we can solve this problem.