Remote Shared Object

Hello I am new to ActionScript. I have a couple of questions in regards to SharedObjects in as3. Okey, what is the difference between a persistent SharedObject and a nonPersistent SharedObject? I am trying to build a small chat application. I want to use the SharedObjects to send messages back and forth. Would i be required to use code for both the client side and server-side to achieve this?
Thanks