Hi V S Suresh,
I'm not sure I fully understand your needs, but I think that the
sendMessage function of JavaScript Client API library can help in your case.
Take a look at the
Portfolio Demo and
Chat Demo that via the sendMessage send information to the adapter and then returns back to the clients.
Please note that the use of the sendMessage function involves implementing the
notifyUserMessage method of the MetadataProvider interface.
Anyway, the implementation of a Data Adapter is open so you can arrange various other solutions if they are easier in your environment.
Hope that helps.