When I tried using Maven’s embedded version in Eclipse Kepler, it gave an error.
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
A little googling showed this as a genuine issue with embedded version of Maven in Eclipse. The workaround is to download external maven and link to eclipse.
- Download Maven zip from http://maven.apache.org/download.cgi
- Unzip the file to some location say “D:\Maven”
- In Eclipse go to Windows->Preferences->Maven->Installation; Click add and provide the path in step 2 (D:\Maven)
In last post I talked about what is middleware, I will focus on message implementation of same today. Message oriented middleware or MOM mostly uses message queues to send and receive data between two systems.
In simple terms, a message is anything that is being sent from one system to another. Mostly MOM uses XML formats, sometimes SOAP based requests or plain texts. An example MOM system will send message to a message queue or MQ, from where the receiver will pick up the message.
Advantages of Message Oriented Middleware
- Persistence: In normal client-server architecture, we will need to make sure both the systems to be available to have a successful communication. Whereas if we are using MQs, one system can still send messages even if the second is down.
- Support for Synchronous and Asynchronous communication: by default the communication is asynchronous but we can implement a synchronous system where a request message sender will wait for the response from other party.
- Messages can be consumed at will: If one system is busy when messages are received (which do not need immediate response), it can consume the messages when load is less. For example, a lot of systems are designed to consume the messages at non business hours.
- Reliability: As messages are persistent, threat of losing information is low even if one or more systems are not available. Additional security mechanism can be implemented in MQ layer.
- Decoupling of systems: Both client and server work independently, and often do not have knowledge for other end. System A creates a message and adds to message queue, without concerning who will pick it up as long as it gets the response message (if required). So one system can be written in Java and other can be in Dot Net.
- Scalability: As both machines involved in interaction are independent of each other, it is easier to add resources at either end without impacting the whole system.
- Group communication: Sender can send message to multiple queues or same queue can have multiple listeners. In addition Publisher- Subscriber approach can help broadcast a message.
Types of Messaging:
Point to Point: This is a simple messaging architecture where a sender will directly send a message to receiver through message queue.
Publisher-Subscriber (Pub-Sub): This type of communication is required when sender wants to send messages to multiple receivers. Topics are defined to which subscriber can subscribe and receive requests based on same. For example, say a core banking system can trigger messages on various events like new account open, a withdrawal is made, interest rate changed etc. For an event, multiple other systems might want that information to take an action, so say for all withdrawal events, systems like fraud detection, mobile messaging system, daily reporting system, account maintenance system subscribe. Whenever, publisher publishes the message to “Withdrawal” topic, all of these systems will receive the message and take appropriate action.
It happen to me a couple of times. Basically in Tortoise svn, you just need to add the password once and save it, it will keep working for months or years. In case I need to checkout another repository and it would ask the password again, it would be a nightmare.
But this simple tool helped- http://www.leapbeyond.com/ric/TSvnPD/
Download the exe file and execute it, it will pull out all the passwords saved for SVN.
The simple difference between using Union and Union All is that Union selects only distinct records from both the resultsets, whereas Union All will return everything.
But today I figured out one more use of union All today. In a ms sql query, I was using union to add up resultset of multiple queries, and got this error
“The text data type cannot be selected as DISTINCT because it is not comparable.”
As I knew none of my queries will return duplicate records, I did not need distinct clause. Replacing Union with “Union All” did the trick in this case.
If you want to dump the result of your select query into a table, this query will help in Oracle or MySql.
Create table newTable select * from oldTable where condition=true;
In case of MsSql this will work
Select * into newTable from oldTable where condition=true;
We use terms application server and web server interchangeably these days. Historically a web server was supposed to serve static html pages over http protocol. Then web servers started serving scripting languages like ASP, JSP, PHP etc. For complex application which needed services connection pooling, object pooling, messaging, transaction management were supposed to use application server.
I said historically because with time the distinguishing line has narrowed down. Most of the web servers have started providing features of application servers with plugins and add-ons. Some exmples of web servers- Apache HTTP (PHP), Tomcat (Servlet container, newer versions have EJB container) etc. Application server examples are JBoss, Websphere etc.
Interesting read to understand why at times the size of file is actually smaller then what it occupies on the hard disk. Explained here.
A cluster in simple terms is group of similar things, in this case computers or servers. A more refined explanation would be that a cluster is group of computers, working together in such a way that for end user it is one single machine. This is close to what I discussed about implementation of virtualization, so yes clustering is a form of virtualization.
But when we are strictly talking about software architecture, we are actually talking about using cluster for load balancing or handling failover. For a simple web application, this would mean creating 2 or more similar server machines, which are maintained in a cluster. There is a single point of entry which dictates which server from cluster should fulfill incoming request. This is load balancing. The server at the entry point can use any algorithm like round robin or check the actual load on a server to assign a request to one of the servers in the cluster. At the same time if one of the machine goes down in cluster for some reason, other servers can share the load and end user will never know about the problem occurred at backend.
What is a Grid? In definition it is nothing but some horizontal and vertical lines cutting each other. Something like
How is that related to grid computing? Not actually. But if you think that there is a computer node available at each intersection of horizontal and vertical line, we will get close.
What exactly is grid computing? Think of the fact there are many average computers connected to each other and can share their processing power, how fast it can deliver solution. It is form of implementation of distributed computing and parallel computing. It can help using many average sized computer and giving impression on a super computer processing power.
Service Oriented Architecture or SOA is a way to design a software application, in which we divide each logical unit/ component of the system as self sufficient service. The idea is not very new and has its roots in distributed computing. But the concept of SOA has gained more popularity recently due to the fact that IT is going very fast changes now as compared to past. Technology that is hot today might become obsolete in an year. SOA guarantees insurance against such a change. How? Let’s start with a very small example, a one page form submission for online registration to say a college
The above example might not explain the exact usage of SOA but it gives some picture. We can extend the above example, by thing of a complex system say a banking system, which has multiple components like retail banking, corporate banking, account management, loan management, customer relation management etc. If all these are created in tightly coupled fashion, it will be very difficult to manage and maintain a system, forget about upgrade. Whereas if the system is implemented in SOA manner, with small manageable services components, it is much more easier to maintain and upgrade.