If it's ADO.NET and SQL2005 or higher, you can define a "cache dependency" that automatically refreshes cached stuff when it changes in the database. I suspect it relies on the fact that SQL2005 can host the CLR to have a way to swap the ordinary roles (ordinarily we use database servers as... SERVERS, but here the *server* needs to notify a *client*, which simply isn't possible given the definitions of what a client and a server is).
If it's ADO.NET and an older SQL server version I believe there's a cache dependency that *might* help. It depends. This thing uses a polling model, which means there's a delay involved. Dirty cache reads are still possible. If dirty reads causes serious problems, you can't use this. If seeing the old data is OK for a short time after it has really changed, you probably can use it.
Otherwise, you probably have to write the code yourself to keep the cache in sync. If the data is only modified by a single instance of your own application this isn't really difficult to accomplish. If there are multiple instances it gets more complicated, unless the instances are operating on isolated subsets of the data, since you will now need to establish some mechanism to ensure caches are kept in sync. It will also mean a performance hit and will require distributed transactions.
Cache invalidation is one of the hardest problems in all of common practical programming. In many cases, there are better practical approaches. Rather than trying to solve the cache invalidation problem, it may be easier and good enough to combine imperfect caching with optimistic concurrency. Concurrency is an often-ignored aspect of multi-user systems that you should probably address anyway (most apps should, but few do). Depending on how you handle concurrency violations (e.g. you could let the user resolve conflicts) having this in place often makes it acceptable to live with some dirty cache data.
You can use a timeout policy to prevent old data from sticking around for too long. Volatile data should perhaps not be cached at all. The ideal cache item is one that is expensive to get but changes infrequently. And never cache stuff that is inexpensive to get for a very long time. Saving a millisecond makes sense in something that happens often, but whether you save a millisecond every minute or every hour is not going to make any difference to the performance of your system. So in such cases, use a short timeout.
Also don't forget that there are frequently opportunities to influence how expensive stuff actually is to get. Look for opportunities to fetch (or compute) more than one thing at a time. Think about what information the application needs to get to show a much-accessed screen. Or better yet, run some profiling sessions and find out exactly what information the application gets, how often it gets *the same* information, and so on.
Lets see if this helps. I am reading back data from a device into a rich text box this is all working fine I can save out as a file fine, the data may contain multiple units so I need to check the first 8 bits to see if they are the same I can split them up fine it is how to store them. I don't really want to use separate text boxes so I was thinking of strings would this be a dumb idea as I don't want to cripple performance? Plus I don't really know how many separate readings are likely....
I want to develop a model on pipe irrigation system optimization using genetic algorithm,my boss want me to use the MAT LAB software but i am new on this software i am asking if there is any one who have idea on how to use MAT LAB for model development here is my email if you have document you can mail to
Before I ask a question, I should explain why I'm asking it and what for, to avoid flame, as question is highly flamable.
I'm in software development for 20+ years. I used to work with numerous (over 18) languages, many OSes, frameworks, platforms, etc. Over time I grew tired of learning some "new exciting tool/language/platform/you name it" just to have it disappear year or two later, or got superceeded with something else. I have only one life and don't want to waste it on learning "fashion" things that come and go before you even notice them. Besides, over time I grew to appreciate only two things - performance and "code beauty" (such as readability and maintainability). So, my by far preferred choice is C++. Yes, it is over 40 years old, but I bet it'll stay here for at least same amount of time. STL earned it's way into same league of "yes, we are here forever" (although I'm not big fan of it, but yes, it is well worth learning and sometimes even using it). And, or course, SQL. The new guy on a block is OpenCL, which was fighting with CUDA for quite some time now, and finally started to get into the same status as C++, STL and SQL.
I want to make myself clear - this is my personal choice, and I'm not advocating anybody else to agree with me, I just want to explain the starting point for my question.
I'm undertaking a new project right now with two goals in mind. First one is obvious - if I succeed, I wouldn't need to work for somebody else ever again . Second goal is - if I'll fail, then at least I will learn something new to make me more marketable, as in "able to find a decent and fun job with high pay" . And this is second goal that gives me headache right now.
Major part of the project is "number crunching", so I'm fine with what I already know and have. But minor part of the project involves GUI, and that is where I was hoping to learn something new AND have value of that skill to be retainable for quite some time. I used to work with Delphi/VCL (which I deem as a very, very good attempt at being perfect framework), Powerbuilder (well, this was not quite a framework, but it was, well, not too bad, and for displaying large amounts of data it was the fastest thing I ever saw), and last few years I worked extensively with MFC/ATL (which I deem as ugliest thing ever invented), and some other libs/frameworks that are not even worth mentioning.
So, I set myself on a search for a new GUI framework that "is here to stay". I code 99.99% of time for Windows, so I didn't care for other platforms. And, yes, I use MSVS - sorry, I like it the most. Call it personal preference, but I'd like to stick with it.
First, I checked Borland's (now Embarcadero) C++ Builder. Took them off the list - can't use VCL in MSVS, and they don't even have 64-bit compiler (which is an absolute must these days).
Then, I checked Qt. Oh, I wanted to try it for some time by now, and believe me, I spent a week reading, reading and reading about Qt 5, trying to convince myself to go this route - after all, they've been around long enough and very successful. But sorry, looks like I have to take this framework off the list also. And the reason is - they made a move that indicates beginning of the end of the Qt. You probably heard it: QML. Jeeze, I seen a zillion attempts of big corporations to introduce language/tool/methodology to "simplify" programming or design, so they can hire low-paid people off the street with no skills, and have them produce programs using this new thing. All of those attempts failed, and failed miserably. And the reason is well versed in this quote: "make a tool that even a fool can use, and only a fool would use it". Well, whatever the reason is under the choice Qt devs made, it takes Qt off the future desktop development. Yes, they will stay in for probaly another 5-10 years, but starting this summer (with inroduction of QtQuick 2) this is a dying framework (from C++ point of view).
Then I saw Ultimate++. Looks excellent, nice, neat and fast code, been here for 11 years, stable enough. Two problems: first, I can't use MSVS with them. Second: well, with all due respect, just how many U++ jobs are out there? Yes, zero.
So, am I stuck with MFC/ATL/WTL? Or can someone recommend a framework/library that "is here to stay" and have a "hire-able" value? I really want to find something, as MFC causes a PITA every time I have to use it.
P.S. Yes, I'm aware of WPF and WinForms, but no, with managed C++ they are not worth it.
Last Visit: 31-Dec-99 19:00 Last Update: 4-Dec-16 14:30