Saturday, January 22, 2011
App pools on a saturday night
I needed to learn more about IIS 7.0 application pools since we're facing a problem about around 20 ASP.Net web applications residing in a single application pool and when we analyzed the IIS logs, it seems that one app is trying to be the smart ass by taking most of the resources. So, here is what I learned:
In IIS 7.0, you have the chance to group your apps into separate pools. By default, an application pool gets 1 worker process (w3wp.exe), but it's configurable. So, the default setting of one 1 worker process in an app pool means that all Applications/AppDomains in the pool share the same worker process.
So, then comes the question: Should I put all of my applications in one app pool, or should I separate them to different app pools? What would be the pros and cons?
Here are the facts that you should consider while making your decision:
- App pools can be configured to use different identities. So, you can restrict one app of yours one way and your other app the other way. With app pools, you can also restrict an application access to resources in another pool.
- If you separate your applications to different app pools, then you can restart one app pool without affecting the other applications running in the other pools.
- And this one is the that concerns me the most: If you have an app that is resource intensive, has memory leaks or misbehaving then you can place it in a separate app pool to ensure that it does not affect the other apps' performance. Before IIS 7.0, if an app that is hosted under IIS crashed, it would also make its host process crash, too. So now with the app pools, you can at least keep your other good behaving apps safe and sound.
About the cons of dedicated app pools, since each app pool has its own bank of memory and its own process, it can use more system resources and there's a large memory overhead in running several w3wp.exe processes. But for me, it should be measured to see whether 20 apps in one pool use more memory then 20 apps in 20 pools, or not and then come to a conclusion.
But anyways, maybe there should be nothing to rack your brain over on a saturday night. So, that should be all. Check these links if more is needed: [1] [2] [3]
Monday, January 3, 2011
iPon
What I learned today about iPhone apps is:
The software architecture of an iPhone is something like this from top to bottom:
- Your sweet application
- Cocoa Touch Framework: (Contains UIKit and Foundation framework) Handles UI elements, events, things about application lifecycle. Also contains wrappers around certain data types (like mutable/immutable arrays, sets, dictionaries), basic utilities and conventions for some core concepts like memory management, data management, etc..
- Media: handles graphics, animation, sound and video
- Core services: Data types, things like location awareness and networking, database access with SQLite, etc...
- Core OS layer: OS services like I/O, threads, sockets, power management, etc...
Misc tips:
Method calls actually represent messages to the objects in memory. These messages are dispatched by the runtime. So this means that if you're calling a method on a null object, you don't get a null reference exception because for the runtime this is seen as a message is being sent to a nonexisting object, so the runtime does nothing when this case happens and no exceptions get thrown.
If you want to get the third character of your myString instance, then your method call looks like this: myChar = [myString characterAtIndex: 3] . Here the parameter is supplied with parametername: value construct, which is named as a "keyword".
It's really hard to be both alienating and mysterious :D
Sunday, January 2, 2011
Mercurial with Kiln
Last month I wanted to give a try to Mercurial as a distributed version control system. While searching for an appropriate hosting option to work with Mercurial, I came across Kiln. Kiln is a product of Fog Creek Software and as a fan of Joel Spolsky, I wanted to use it with no doubts. And what's more is that if you're a student or if you have a team of two people or less, it's completely free for you, yay!
After you sign up with Kiln, you choose your repository's url and then you can use the web management interface of Kiln + FogBugz.
FogBugz web UI is for projects, cases, assignments, milestones and that kind of software management crap. Kiln web UI is for managing your repositories. FogBugz also has a wiki tool which can produce sleek looking wikis that you can publish publicly or privately.
Besides these, you can download Kiln Client as your Mercurial client. Kiln Client extends Tortoise Hg and if you download it using your Kiln account, it will come pre-configured for you, so that you wouldn't have to bother with configuring your repository and so. To download Kiln Client, you can use the Resources link at the right top of your kilnhg page.
And if you want to integrate your IDE with Mercurial, go ahead with the following links if you use VS or Eclipse. If you don't, go ahead and use VS or Eclipse, eheie :]
Visual Studio
Eclipse
After you sign up with Kiln, you choose your repository's url and then you can use the web management interface of Kiln + FogBugz.
FogBugz web UI is for projects, cases, assignments, milestones and that kind of software management crap. Kiln web UI is for managing your repositories. FogBugz also has a wiki tool which can produce sleek looking wikis that you can publish publicly or privately.
Besides these, you can download Kiln Client as your Mercurial client. Kiln Client extends Tortoise Hg and if you download it using your Kiln account, it will come pre-configured for you, so that you wouldn't have to bother with configuring your repository and so. To download Kiln Client, you can use the Resources link at the right top of your kilnhg page.
And if you want to integrate your IDE with Mercurial, go ahead with the following links if you use VS or Eclipse. If you don't, go ahead and use VS or Eclipse, eheie :]
Visual Studio
Eclipse
Subscribe to:
Posts (Atom)