views:

36

answers:

2

I am new to Ajax programming and I have been told that there are alternatives to using a database in Ajax if optimal speed is required. If there are going to be like a hundred requests per second then using a database does not make much sense. So what are those alternatives?

I need only "native" AJAX solutions. No libraries, please.

Later added: I am sorry if me question was ambiguous..

Let me be very specific here now.. I am trying to making an application using ajax where I am getting say a 100 requests per second from different clients.. and these requests are for some data currently in the database on the server ..

The whole thing is very slow right now .. The reason is obviously the database.. do I have any alternatives ??

+2  A: 

Ajax has nothing to do with databases. Ajax is Asynchronous Javascript and Xml. It is merely a technique for using XHRs (XmlHttpRequests) to communicate with the server. One of the things you can do when you communicate with the server is insert data into a db. Applications that use databases can be fast. Look at stack overflow for example.

A new HTML5 feature is the Local Datastore

http://www.webreference.com/authoring/languages/html/HTML5-Client-Side/

basically it allows you to store info on the client.

Most complicated apps will use both a server db and the local datastore to cache data....

hvgotcodes
+1  A: 

Ajax is a couple layers above your actual question. Try looking up ORM if you stick with a SQL DB. For SQL alternatives google "noSQL db".

jms