A hash table cannot be serialized but you can move the keys and values over to an array and use the XmlSerializer to get a byte[] array and then base64 encode the bytes to send it across the network as string.
This should get you started:
object[] keys = new object[table.Count];
object[] values = new object[table.Count];
table.Keys.CopyTo(keys, 0);
table.Values.CopyTo(values, 0);
sknake
Industrious Poster
4,954 posts since Feb 2009
Reputation Points: 1,764
Solved Threads: 735
Well if you're storing data why don't you use an SQL Server to communicate the data instead of writing all of the logic yourself? And for transmitting only modified data you have a few flavors -- a person could modify the data on computer A and send it to the server but when he refreshes next that would not be a modified row since he modified it, and has the modified copy. However person B would need to receive an updated row.
Then you get in to maintaining data "versions" for the server and client apps which add overhead and in some cases the overhead of sending modified data may exceed usefulness of just sending all data.
there are a lot of factors to consider though -- What type of data is this? How is it stored? How much data is there? How many clients? Will this operate over a LAN or WAN?
I think you need to elaborate a little more
sknake
Industrious Poster
4,954 posts since Feb 2009
Reputation Points: 1,764
Solved Threads: 735
serkan sendur
Postaholic
2,062 posts since Jan 2008
Reputation Points: 854
Solved Threads: 127
Yes .. SQL is capable of handling concurrency but I do not think every half second is a good idea. What data could you possibly have that is so valuable to be refresh that fast? It probably takes about 1/2 a second to fire off a request for data, get it, update control values, and repaint the screen. You're going to pound whatever systems use this.
sknake
Industrious Poster
4,954 posts since Feb 2009
Reputation Points: 1,764
Solved Threads: 735
Regardless of the client -- you have to establish a network command, or send data over an existing connection. Why don't you explain your entire project with the sites, why you have 4 clients, etc? I'm still having a hard time thinking this could be a good idea
sknake
Industrious Poster
4,954 posts since Feb 2009
Reputation Points: 1,764
Solved Threads: 735
Sort of. I would use an SQL Server and have everything using the same table that way you don't run the risk of your database getting desynched from the "server" app, and clients could also be desynched. I think you should just use a database here.
sknake
Industrious Poster
4,954 posts since Feb 2009
Reputation Points: 1,764
Solved Threads: 735