I hope it doesn’t crash as much!!! 😉
DLR – Dynamic Language Runtime
I have been an avid follower of the CLR and all things MSIL; but I have to say the DLR is something that has gotten my attention. Just trying to grapple with the mechanics of it, sounds an almost impossibility, but indeed it is here and being worked on as we speak.
So what is the DLR?
According to my mind, the DLR is a Virtual Machine that allows the interoperation of languages with the CLR, from an operations and data type point of view.
So what does this give me?
Well it allows for C# to interop and use objects from alternate languages like Python etc.
So you could write a class in Python and call it from C#. Not only this; it allows for the use of a host of other DYNAMICALLY TYPED languages (eg.SQueak) to be used within C# itself, so you could harness the power of both worlds.
There isn’t much other there in terms of information; and as far as I know there is no Whitepapers as well. But here is a list of resources that I found highly interesting and most exciting:
a) Best Information you can find and probably the best video I have ever watched
Hope that helps….
What does it take to become a GrandMaster Developer
Here is a great article.
Click Here Squire
Configuration Files, oh how I hate thee!
So if you been trying to use a Custom Configuration file (like that of app.config), without using the existing app.Config; here’s how:
AppDomain.CurrentDomain.SetData(“APP_CONFIG_FILE”, System.Environment.CurrentDirectory.ToString() + “\MiniLogger.config”)
Yip, its that simple. This will now be accessible right through for your entire Project.
If you struggle to figure out where to put it, the Constructor sounds like a good place to me 😉
How to Turn on Compression for IIS 6.0
a) First determine if it is necessary for you to have compression turned.
Determining Whether HTTP Compression Will Improve Performance
If your server generates a large volume of dynamic content, consider whether the additional processing cost of HTTP compression is one that you can reasonably afford. If the % Processor Time counter is already 80 percent or higher, enabling HTTP compression is not recommended.
To evaluate how much of your processor is typically being used, follow these steps:
1. Establish a baseline for your processor usage by using System Monitor to log the following counters over several days. If you use Performance Logs and Alerts, you can log the data to a database and then query the data, examining the results in detail.
• Processor% Processor Time. This counter has a total instance and a separate instance for each processor in the system. If your server has more than one processor, you need to watch the individual processors as well as the total to discover any imbalance in the workload.
• Network InterfaceBytes Sent/sec. Counters for the Network Interface performance object display the rate at which bytes are transmitted over a TCP/IP connection by monitoring the counters on the network adapter. For information about additional counters to monitor for this object, see Table 6.8.
2. Enable compression, and continue to log the values for these counters for an extended period — preferably for several days — so you have a good basis for comparison.
Collect a broad sample to determine how compression affects various aspects of performance. Conduct the following tests:
•Enable static compression only, dynamic compressions only, and both.
• Change the list of files that you use for compression testing for both static and dynamic content.
• Vary the compression level. Try this on all content types.
3. Compare the data from monitoring with and without compression, and with different types of compression, different compression levels, and different files
b) If yes, go ahead and download MetaEdit from Microsoft Website
c) Next is to turn on Compression within your IIS, and don’t forget to monitor your CPU.
Here are the tabs for compression found in the IIS Snap-In.
Make sure you tick, “Compress application files” and “Compress Static Files”, as well as setting the temporary directory with proper permissions (for IIS user etc).
d) Once To enable global HTTP compression by using Adsutil.vbs
1. Open a command prompt.
2. To enable dynamic compression, type the following at the command prompt
cscript adsutil.vbs set w3svc/filters/compression/parameters/HcDoDynamicCompression true
3. To enable static compression, type the following at the command prompt
cscript adsutil.vbs set w3svc/filters/compression/parameters/HcDoStaticCompression true
e) Once done you need to restart IIS to allow the changes to take effect.
f) Next we need to create a Web Service Extension (WSE)
Create a new one WSE and call it “Http compression” for example. Then point it at
g) Upon completion open up MetaEdit (assuming that it is installed)
[NB. Always apply to both “deflate” and “gzip” ]
Now find the location for the Compression options of both “deflate” and “gzip”.
In here edit the HcScriptFileExtensions, and add in any that might be relevant to you.
In my case I added in, aspx and asmx.
–snip snip —
HcDynamicCompressionLevel has a default value of 0. Basically this means at if you did everything else right, the compression for dynamic contact is at the lowest level. The valid range for this is from 0 to 10. I had the opportunity of receiving an internal testing summary from Chris Adams from Microsoft regarding the compression level -vs- CPU usage which showed that the CPU needed for levels 0 – 9 is fairly low but for level 10 it hits the roof. Yet the compression for level 9 is nearly as good as level 10. I write all this to say that I recommend level 9 so make sure to change HcDynamicCompressionLevel to 9. Do this for both deflate and gzip.
–end snip snip — http://weblogs.asp.net/owscott/archive/2004/01/12/57916.aspx
h) Last STEP, reboot IIS.
Oh look, the VS2008 ORM doesn’t work, cause it doesn’t support .NET MySQL Provider.
Oh look, I can’t use LINQ for MySQL queries…..*cries*
This completely sucks, how difficult is it to code around Microsoft? Man I love you guys, but this is just ridiculous. I will plead a lack of knowledge in the architecture and its implementation, but it doesn’t sound that difficult. I mean, there is someone currently who has implemented a Mock up, but its not particularly standard Microsoft tool.
All in all, it seems lack any half-open source house will have to put a hold on the use of LINQ.
I’m not brave enough to use DBLinq in production.
Anyways, my whole point is that Microsoft has been *naughty* here, and its more irritating!
So I suppose I won’t be able to use some portions of PLINQ or TPL.