...but on the other hand, though, pretty much standard. I am reworking our O/R mapping layer (yes, the infamous EntityBroker) preparing the new stuff we have here for a distributed and serviced component based architecture. This time I try to go for as much performance as possible.
My main problem is with "on demand activation". See, I have two objects that work together: (a) the ObjectBroker, and (b) the DataBroker. The ObjectBroker is stateful (and mostly located on the client), while the DataBroker is supposed (!) to be stateless.It will basically create SQL orders, and return the results to the ObjectBroker. My main problem with the DataBroker, though, is that in order to be efficient, it should NOT be stateless. In an ideal workls, the DataBroker could be stateless, basically giving up it's existence after each call - as the database connection stays open anyway. Sadly, this would be inefficient. The DataBroker is responsible for generating the SQL strings, and caching them is a possible performance gain. Though DataBroker's can possibly be cached, they exist for different databases - so the standard caching mechanism it not efficient. I am currently handlin this by basically recreating a new DataBroker after every commit / rollback - an action requiring a round trip (which I would like to avoid). It looks to me like what I would actually want to have is some sort of resource dispenser mechanism. Something where I could basically have different pools of configured DataBrokers that are asked for by a class entrusted with executing a request, which then takes one of the classes out of the resource pool and forwards the request to it. This way it could ask for the resource, and I would spare the round trip. It would take the correct database from some kind of either parameter or embedded data. Anyone ever tried something like this in C#? I mean, there is a mechanism for CRM (Compensating Resource Manager) in the framework, but real resource pools? Regards Thomas Tomiczek THONA Consulting Ltd. (Microsoft MVP C#/.NET) You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.