Passion of IT

JMS and JNDI

The most largely used architecture for web applications is “Client server” and the communication between both participants is the following: Client sends a request to the server which will process this data and sends the response

Typical Example is google: when you search a word, the server answers to your question and sends the relative page.

There are a lot of a ways to perform client-server communication for example using web services or by calling a RMI in each cases the communication maybe synchronous (the client waits until the server sends the response, this is the most used) or asynchronous (otherwise, like a sms in the cellular network: the client sends the request and keeps on doing his operations. After receiving the response from the server the client shows it)

The asynchronous communication needs that the client sends the message in a server queue. The server scans the queue and processes that data only when it’s ready

The architecture that bases the communication on messages is called “MOA: Message Oriented Architecture” and the software that performs the queue is called MOM (Message Oriented Middleware)

The queue can be placed for example in data base or into file system of the server or there are special structures of the data that are provided by programming languages and servers. The libraries uses by java for the making this queue are Java Message Service (JMS).

jms-programmingModel

JMS allows to use a queue stored on server (it is necessary to use JNDI 


to have an access of this queue) and to create a producer and a consumer of this queue and both the member of the communication can exchanges as text messages as objects.

 

Messaging is a form of loosely coupled distributed communication, where in this context the term ‘communication’ can be understood as an exchange of messages between software components. Message-oriented technologies attempt to relax tightly coupled communication (such as TCP network sockets or RMI) by the introduction of an intermediary component. This approach allows software components to communicate ‘indirectly’ with each other. Benefits of this include message senders not needing to have precise knowledge of their receivers.

The advantages of messaging include the ability to integrate heterogeneous platforms, reduce system bottlenecks, increase scalability, and respond more quickly to change.

No Comments Yet

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite="
"> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Recent Comments

Michele Rizzithe website doesn't exist. Ara you a robot? In any case it's difficult that an automatic system writes a comment here since there are two captchas...
Hello there! This is kind of off topic but I need some guidance from an established blog. Is it very hard to set up your own blog? I'm not very t...
We are a group of volunteers and opening a new scheme in our community. Your web site offered us with valuable information to work on. You've done a...
November 2024
M T W T F S S
« Dec    
 123
45678910
11121314151617
18192021222324
252627282930  

Login