I'm building a signalR dictionary that used to add symbols data and clients connected to a specific symbol with a specific resolution.
My classes structure looks like that
public class Symbol
{
public ConcurrentDictionary<string, PriceHistory> Resolutions { get; set; }
public ConcurrentDictionary<string, string[]> connectionIdsTracker { get; set; }
}
public class PriceHistory
{
public List<double> t { get; set; }
public List<double> c { get; set; }
public List<double> o { get; set; }
public List<double> h { get; set; }
public List<double> v { get; set; }
public List<double> l { get; set; }
public List<long> recSerial { get; set; }
public string s { get; set; }
public bool intraDay { get; set; }
}
My call to the symbol class looks like:
private static readonly ConcurrentDictionary<string, Symbol> Symbols
= new ConcurrentDictionary<string, Symbol>(StringComparer.InvariantCultureIgnoreCase);
Is it going to make a difference to reside a concurrentdictionary inside a concurrentdictionary which is by default manage multiple reading and writing?
Also connectionIdsTracker is a dictionary of key equal to the connectionId, and value of an array that only going to have two strings symbolName and resoultion, is that a good structure or there is a better choice I can use?