Hello again,
Ok so im working on a chat server and i just need to ask a few things about server architecture and by that i mean what is the best way to get things done?
So if theres anyone out there that knows servers then please post.... realy anyone that can help me pleas post.
I have got most of my info from C# code so if C# ppl know any more please feel free to post coz i can work with the code..... mostly.
If any of my code is needed the ill post it just let me know what you need!
1) When a msg is sent to global(main room) should the MSG be sent back to the sender to be displayed or just shown local(not sent back to the sender but update the UI with the msg to save network traffic)
2) Should i use events eg: client gets a msg and raisevent haveMSG(xx xxxx)
that just passes the msg off to the update UI method or have the client just go strait to the updateUI method and bypass the need for events or is there a need for events?
3) Right now i have the server\client broken down into parts is this how i should do things
eg: SocketObject(server\client object)
ServerCls\ClientCls(Server\Client Frontend)
LogicUnits(all work on msg's is done here)
Object Pools(Msg objects, SAEA objects, Buffer objects and logic units\workers)
Server\Client UI
4) Is SocketAsyncEventArgs the best way to go for a chat server or should i be useing the older beginXXX async methods, i have been playing with the async CTP so could i go down that path? Right now the server has 2 modes SAEA or my Async CTP way of reading\writing
5) I do alot of boject pooling..... in my mind having the server start with 90% of the memory it will need sounds good but is this a but thing?
6) I have done much reading but there isnt much out there other than the few tuts that i have done and the helped..... i think i have tryed most of the server\client code out there for VB and C# so if anyone has any books or post i should read then pleas let me know.
7) What would the best way to do encryiption be?
most of my info came from :
http://www.dreamincode.net/forums/topic/150960-advanced-p2p-networking-chatrooms-part-1/[
^]
C# SocketAsyncEventArgs High Performance Socket Code[
^]
A Chat Application Using Asynchronous TCP Sockets[
^]