i have to build a concept to communicate between two computers using shared memory or tcp socket programming concepts..how do i go about it?is it possible to implement shared memory in a client server architecture?how do i go about it?
You can't communicate between two computers using shared memory, because they don't share memory.
You should use TCP sockets.
I think rather than shared memory, what you are looking for is more properly called something like "reflective memory".
With Reflective Memory blocks each computer on the network owns a block of memory. Every block is punted around a bus between all the computers at a high rate of speed. Each computer gets a copy of the memory from all other computers for reading, but typically can only write to its own memory.
Thus each computer can "see" the state of the memory in every other computer. Typically you see this sort of architecture in industrial control systems that distribute the control over physically separate machines and want to see the overall state in near real-time.
As for building a system, well you could start with UDP packets that just blast out the state of the local computer and have all the other computers read that data.
The snarky answer "you can't do it because computers don't share memory" is just plain wrong. Processors within a single computer do not share memory, the hardware and software implement shared memory protocols to provide an illusion of shared memory.
Shared memory protocols across processors are very similar to shared memory protocols across computers, its the same problem.
Search for "distributed cache" "tuple space" and "distributed shared memory" it might provide some food for thought. memcached is a very popular open source product you can take a look at.
EDIT: Regarding the comment about "cache coherent architecture". Each processor has its own local cache of memory (L1 cache for example). There is a whole bunch of "stuff" that happens to make this "cache coherent" so that it appears each processor is reading and writing to a shared memory space. The processors are absolutely, positively not writing directly to a single shared memory space. The problem is conceptually the same for shared memory across computers.
You may want to look into something like memcached, a distributed memory object caching system.
Granted, this is still done via TCP.
You CAN communicate with a remote system with shared memory. Remote DMA is a feature of newer high performance network interface controller cards (NIC).
Here's a paper which evaluated 10 Gb ethernet RDMA performance. I know infinaband can also RDMA, others likely. Won't it be nice when 802.11 XXX comes out? Wireless RDMA? :)