March 2006 Archives

M. David Peterson

AddThis Social Bookmark Button

Oh wait, yes I did

Is Apple getting ready to run Windows? - Engadget

Notable curmudgeon John Dvorak raised hackles last month when he suggested that an Intel-powered Apple would dump OS X and switch to Windows. Turns out he may have been right — sort of. Word is out now that Apple has joined BAPco, an industry group that does one thing and one thing only: create benchmarks for testing the performance of Windows-based PCs. The move comes on top of rumors that Apple will include VMWare-style virtualization capabilities in the next version of OS X, which could enable the Mac OS to run Windows apps without requiring a third-party emulator or a reboot. While those rumors have yet to be confirmed, it does seem possible that Apple is indeed working on a way for OS X users to run Windows apps, and wants to use BAPco’s tools to benchmark the Windows-on-OS X performance (though the tools are said not to work all that well in virtual environments). Either that or they just want to confirm the rumors that the MacBookPro is the fastest Windows laptop out there.

I DESPISE the tech rumor-mill circuit as for all intents and purposes its the /dev/null of the tech news industry in regards to quality of information you can gain back in return for the time you just put in… you might be able to recover a couple of bits here and there, but for the most part what goes in is NEVER to be seen again in any result format that even closely resembles the original.

That said,

M. David Peterson

AddThis Social Bookmark Button

I recently received an email regarding the official public release of Monad, the new Microsoft Shell (MSH) that I believe deserves a HUGE amount of attention for two reasons:

- For a company who has built their entire foundation on a GUI-focused OS, to then respond to market demands by creating what every UNIX weenie on the planet will begin to salivate for is pretty remarkable in my opinion.

- Directly related to this… just as community-based software development is supposed to work, MS took the lead of the UNIX command line, started from scratch, and made it better. As such, both my hope AND my guess is that the UNIX community will borrow the result right back :)

Possibly as part of the Mono-Project? I don’t know, but it would certainly seem to make the most sense. That said, maybe they have? Not sure… Anybody out there know?

In the mean time here are a few highlights from the email recently sent to beta participants by Leonard Chung, Program Manager - Windows “Monad” Shell:

Preston Gralla

AddThis Social Bookmark Button

The New York Times points out that in the five years since the last revision of Windows, Apple has released four new versions of its OS, beating Microsoft with many features such as widgets and desktop search. The question, naturally, is why? And the answer may be that Microsoft has simply gotten too fat.

Devin Ganger

AddThis Social Bookmark Button

Sooner or later as an Exchange admin, you want to disable a mailbox-enabled user account in Active Directory while keeping the associated mailbox intact. Up until now, this caused problems, because as soon as the account was disabled, any mail sent to that alias (or any DL containing that alias) would generate an NDR and a 9548 event ID.

Fatal? No. Pain in the butt? Definitely. In some cases it could cause performance issues, the NDRs were annoying and confusing for non-technical users, and the constant nagging in the event log irritated admins left and right.

In fact, it was a widespread enough problem that Alex Seigler of Microsoft wrote the NoMAS tool, which is available from Microsoft PSS. This tool automatically populates the msExchMasterAccountSid attribute on disabled user accounts.

With this new hotfix, Exchange’s internal logic has been changed to automatically act as if the msExchMasterAccountSid attribute on a disabled account contains the SELF well-known SID if account doesn’t have the attribute already defined.

Note: this hotfix is currently available only for Exchange 2003 SP1; you can’t apply this to systems that are already running SP2. A SP2 version is expected soon.

Alex has written a blog article on the MS Exchange team blog about this if you want more detail. Note that the original article doesn’t state that this hotfix is for SP1 only; you have to read down in the comments to see that. I also don’t see any indication that this hotfix will be available for Exchange 2000…and I’m not holding my breath. Still, this is a welcome hotfix, and it’s a simple no-charge call in to PSS to get it.

Preston Gralla

AddThis Social Bookmark Button

Microsoft’s announcement today that the consumer version of Vista won’t be ready until January 2007 is one of the more shocking pieces of news to come out of Redmond in recent years.

Vista has been delayed year after year — and now it’s missing the holiday season by one month. Needless to say, PC makers will not be amused; it means that many people will hold off buying a new PC this holiday season, because they won’t want to be stuck with an old OS.

It’ll also mean less revenue for Microsoft, because a new operating system spurs people to buy new PCs, which means more copies of Windows sold.

This one has me scratching my head. The business version will be ready in November, and it’s not supposed to be much different than the consumer version. So why the delay?

Frankly, I don’t get it. So if you have thoughts, post them here. Maybe together we can figure it out.

Preston Gralla

AddThis Social Bookmark Button

The latest beta of Vista includes gadgets, and while there’s not much there yet, it’s a look into the future of Windows. Here’s a screenshot of the gadgets on my PC:

gadgets.gif

The top gadget is a kind of launch pad where you can launch programs with one click. Interesting, but not overly useful. The one beneath it is the good one — it’s a live feed of your RSS subscriptions. The others are pretty obvious — the Recycle Bin and a clock.

At this point, there’s not much to choose from, and you can’t customize the gadgets much. I’m hoping the next revision will do more with them.

M. David Peterson

AddThis Social Bookmark Button

In a recent Amazon Developers Forum post, there was a question regarding the availability of an S3 VB.NET Sample. There is an extremely easy way to go from C# (a C# REST and SOAP sample was provided by the Amazon folks) to VB.NET and/or Boo and back. This information could be useful to a lot of folks, so I’m republishing my response post here.

Mike Richardson

AddThis Social Bookmark Button

For years Windows developers have struggled to exceed the 2GB per-process memory limit, especially when attempting to architect large-scale caching systems. The .NET CLR and Java’s VM also suffer from this limitation when running on 32-bit systems. Common solutions, such as implementing popular COTS solutions like TimesTen or NCache, do not solve the problem either. In 32-bit systems, it is simply impossible to store a very large amount of data in a process. However, there are a number of options available, including a nice addition to the .NET 2.0 Remoting API, which could make designing such a system more feasible. First, I will illustrate the background of the problem followed by various solutions. The goal of this post is to present an architectural pattern to combat the 2GB limit in Windows and other runtime environments.

Typically, a Windows process running in the 2003 operating system environment can access up to 2GB of address space. This memory is split between actual physical memory and virtual memory. Basically, the more processes that are running on the system, the more memory will be committed to reach the full 2GB address space.

When memory consumption approaches the 2GB limit, the paging process increases and performance begins to degrade. In order to improve performance and memory utilization, Windows memory managers use a concept known as PAE (Physical Addressing Extension) on Intel chips, which basically reduces the need to swap the memory of the paging file. The client program is not aware of the actual memory size. Rather, all the management and allocation of the memory addressed by PAE is handled independently of the program accessing the memory. In order to enable extended memory support and utilize PAE, the /3GB switch must be enabled in the boot.ini file, which is illustrated below:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS=”Windows Server 2003, Enterprise” /fastdetect /PAE

Even though PAE is enabled, the operating system is still based on 32-bit linear addressing. However, multiple processes can benefit from the increased memory because they are less likely to encounter physical memory restrictions and begin paging. Additionally, Windows applications can be modified to use the AWE API in order to allocate memory outside of the applications process space, essentially bypassing the 2GB constraint.

AWE is a set of application programming interfaces (APIs) to the memory manager functions that enables programs to address more memory than the 4GB that is available through standard 32-bit addressing. AWE enables programs to reserve physical memory as non-paged memory and then to dynamically map portions of the non-paged memory to the program’s working set of memory. This process enables memory-intensive programs, such as large database systems, to reserve large amounts of physical memory for data without having to be paged in and out of a paging file for usage. Instead, the data is swapped in and out of the working set and reserved memory is in excess of the 4GB range. Additionally, the range of memory in excess of 4GB is exposed to the memory manager and the AWE functions by PAE. Without PAE, AWE cannot reserve memory in excess of 4GB.

Now let’s state the problem in terms of developing a large, highly scalable caching solution…

The purpose of caching in a Windows application is two make infrequently changing data readily available to an application. The actual cached data is usually co-located on the application server in order to increase performance. In addition, by enabling the application tier components to access data directly without having to make a database connection increases reliability and eliminates a single point of failure. Enabling caching on the application tier essentially creates a two-tier distributed application. Once data is retrieved from the database or other source, it can be cached so that excessive calls can be avoided. Most popular caching API’s (including .NET) also support sliding expiration of data items, callback functions to respond to underlying changes in the data store, and provide cache “controllers” for implementing common LRU and MRU algorithms.

If your application must cache data in a process larger than 2GB, it can be accessed in .NET by using unmanaged code and the AWE API. However, one major issue still exists and must be dealt with – performance. For example, if you use PAE and AWE to cache a table that is approximately 6GB in size, then accessing that data in any caching system will obviously degrade performance. The paging of memory will no doubt reduce performance and the disk seek times to locate the necessary data can also be quite long. Note that when I say you must cache more than 2GB of data, I am assuming that the data itself is already optimized. For example, I am assuming that you are using efficient lookup structures in your cache like StringDictionary and not just a bunch of ArrayList objects, or that you have already performed string interning to decrease the overall memory footprint.

The next step to effectively reduce the size of the data is to mimic the functionality of popular caching systems like NCache. For example, you can then split the data up into logical buckets, provided that you create some form of controller which “understands” where to locate the appropriate data. The trickery comes in when the need arises to access data between buckets. In .NET, the only method available to aggregate data between processes is to use .NET Remoting. If you are using the .NET 1.1 API, you may be out of luck if you are seeking the ultimate in performance; even with the binary formatter the fastest access method would be TCP/IP, which is not quite fast enough. The sheer number of CPU cycles needed to cross process boundaries would grind the caching system to a halt. Fortunately, the .NET 2.0 Remoting API introduced a new Remoting channel for IPC known as a named pipe.

By implementing IPC using a named pipe in addition to a “smart” cache controller and some LRU and MRU algorithms, it is possible to achieve high performance in systems which need to access more than 2GB of memory.

Of course there is one last point that I forgot to mention. If your project has a liberal budget, you can solve all your caching problems simply by buying a nice, high-end 64-bit machine.

Mike Richardson

AddThis Social Bookmark Button

Since this seems to be a hot topic right now, I want to clear up a common misconception regarding message queuing and persistence. Because I cannot cover every vendor implementation, I will discuss this post in the context of .NET (MSMQ) and briefly WebSphere MQ. Also, this only assumes a synchronous messaging model. Although it varies by vendor, there is some “trickery” associated with some of the async methods with regards to persistence and transactions.

Most developers are familiar with the concept of store-and-forward messaging. Basically, if a client sends a message to a server using MSMQ as the communication mechanism and the server experiences a sudden outage, then a basic failover mechanism “kicks in”. Most of the time, in a disconnected state, the client will not attempt to send messages to remote queues. Rather, it will “buffer” them and then eventually write them to disk. This mechanism allows architects to design systems with increased fault tolerance.

Depending on your SLA’s, you may have to support any number of “9’s”. If you need to support 5-9’s and the utmost in availability, you essentially cannot afford to lose ANY messages. The common misconception (and a source of much lost data) is that MSMQ and other queuing vendors support this type of functionality “out of the box”. This is simply not true.

In the case of MSMQ, the “buffer” that I briefly mentioned above is implemented as a MemoryMappedFile structure. This “file” is then flushed to disk at certain intervals (which are configurable). Therefore, if there is an outage after messages are mapped to memory but before they are flushed to disk then you may lose data. So you might be thinking that if you decrease the time to flush the mapped file to disk to its minimum value then you will avoid losing data – also not the case. Depending on the type of disk you use (even if it is a fast 15,000 RPM drive), the head of the disk may not be able to write to the partition fast enough to flush the file (assuming the disk does not cache the data).

The best way to implement persistence using MSMQ is to mark the queue as transactional. This can be configured manually or programmatically by passing a value of true to the queue creation method. By invoking a transaction boundary, MSMQ treats the unit of work much like SQL Server. However, be aware that this significantly degrades performance. Also, the meaning of a transaction failure is commonly misunderstood in the MSMQ world – when a message that is encompassed in a transaction fails to complete, the message is placed back on the sending queue. It is like nothing ever happened.

Implementing persistence in WebSphere MQ is just as simple, and there are two methods at your disposal. First, you can implement a durable channel for queue-to-queue message transmission. In addition, after you configure durability at the channel level you can mark individual messages as durable (or not). One of the great strengths of WebSphere MQ is its implementation of persistent messaging. Similar to DB2, WebSphere MQ uses a transaction log implementation for persistence. Aggregating these logs with monitoring software is simple using something like MOM (Microsoft Operations Manager). The second, and less common option, is to implement the unit of work pattern.

Hopefully this post clears up the fact that most queuing vendors do not support saving every single message. A little bit of extra work and good design is still needed to avoid any loss of critical business data. And remember, increased persistence means increased price. If you need to store lots of data, you will need to be concerned with the size of your data (which increases 20% if you serialize as XML), the size and type (page or non-paged) of the journaling file, and of course disk redundancy. Even if you write the messages to disk immediately or use transactions, the disk itself could always go bad. Who knows, you may end up needing a full-blown SAN network in order to insure never losing a message. As you can see, fixing this misconception is not cheap.

Christian Wenz

AddThis Social Bookmark Button

Related link: http://aspadvice.com/blogs/garbin/archive/2006/03/05/15591.aspx

When it comes to Atlas, every bit of information that can serve as a documentation is highly sought-after. So I just wanted to let you know that Garbin (no last name given ;) ) has put up a great FAQ on the DataTable control of the Atlas framework, explaining how to work with it (adding rows, accessing columns, and so on).

Preston Gralla

AddThis Social Bookmark Button

How’s this for a deal: Learn the latest new techniques in ASP.NET 2.0, get advice from top O’Reilly and Dr. Dobbs Journal experts and authors, and get lots of free stuff — more than $400 worth — in the bargain?

That’s what you’ll find at the ASP.NET 2.0 Training Center, a new web site launched by O’Reilly in concert with CMP’s Dr. Dobbs Journal and Microsoft. The site offers a comprehensive set of development tools, how-to’s, and training to help programmers master ASP.NET 2.0. And if you sign up for the site’s webcast series you also get more than $400 in tools and information, including Visual Studio® 2005 Standard Edition.

The site is not only for ASP.NET 2.0 developers. It’s particularly useful for programmers working with PHP, JSP and ColdFusion to add to their skillsets by mastering ASP.NET 2.0. If you’re a PHP, JSP, or ColdFusion developer, you’ll find articles explaining the basic concepts of ASP.NET 2.0, tutorials on writing applications, and advice on cross-platform portability. You’ll also get plenty of advice for writing better PHP, JSP and ColdFusion applications as well.

The site has dozens of articles from top O’Reilly authors and experts such as Jesse Liberty and Wei-Meng Lee, and from Dr. Dobbs Journal experts as well. There are tutorials covering data binding, themes and skins, multiplatform environments, Web parts, localization, XML DataSource controls, and plenty of others.

In the coming weeks, I’ll be telling you more about the site, and I’ll highlight some of the more intriguing articles and webcasts. But for now, head over, take a look around — and register for the webcasts to get more than $400 in goodies.

What do you think of the ASP.NET 2.0 Training Center?