Making Cluster in JBoss AS 7 1

Making Cluster in JBoss AS 7
Lets try to make cluster in JBoss AS 7. First of all What is Clustering? If there are 3-4 nodes that can communicate with each other with the help of some application or by some other mean, we can say these are in a cluster. Or Some load balancing scenario or failOver scenarios in which ...

CyclicBarrier And CountDownLatch in JAVA

According to java doc Cyclic Barrier is: A synchronization aid that allows a set of threads to all wait for each other to reach a common barrier point. CyclicBarriers are useful in programs involving a fixed sized party of threads that must occasionally wait for each other. Now why this barrier is called cyclic: The ...

Implementing Own Thread Pool in Java

Lets Implement own Thread Pool in Java. Lets first make a class which will be having two methods enqueue and dequeue. This class will act as a blocking queue on the dequeue method i.e. a blocking call so that we will only return when the queue has something on it, otherwise wait until something is ...

Implementing Producer-Consumer by making own implementation of blocking queue.

Lets implement Producer, Consumer by making own implementation of blocking queue. Lets make own interface which will be having two methods: 1. enqueue // for put 2. dequeue // for take Here is our interface: Now lets make one implementation of above interface. Above implementation behaves as blocking queue, i.e. according to javadoc: ” A ...

Making WebSocket with NodeJS and HTML5

Making WebSocket with NodeJS and HTML5
In this blog we will try to create websocket with the help of HTML5 and NodeJS. First something about NodeJS or simply Node:- Node provides a purely event-driven, non-blocking infrastructure for building highly concurrent software. It internally uses the Google’s V8 JavaScript engine, an event loop, and a low-level I/O API. Now First lets check ...