Infosys Microsoft Alliance and Solutions blog

« April 2009 | Main | June 2009 »

May 28, 2009

“Oslo” May 2009 CTP Released!

Yesterday Microsoft released the May 2009 CTP for “Oslo”. This was a surprise release for me as I was not expecting another release till August this yearSmile. But as promised they are coming out with frequent releases to keep the community interested and engaged, which I think is good. To know more about what’s new in this release and what has changed, I would suggest you go through the blog post by Kraig, Kent, and Chris (editors on the "Oslo" Developer Center) and the release notes. You can download the CTP from here.

The biggest news is that Microsoft finally decided to release Quadrant (GUI tool to interact with domain models stored in the repository and to create Visual DSLs) this time around and what they say is that this is a much improved version from what we saw in the VPC that was given out in the last PDC. From what I hear they have also worked a lot on improving the performance of Intellipad. I just hope it stops crashing frequently and opens up fasterSmile! The M language specification as expected has undergone changes and additions and it would be interesting to see how much easier have creating domain models and DSLs using the language become.

The team has also updated the documentation for the “Oslo” platform on MSDN. I think the lack of sufficient documentation has been one of the key challenges that people faced in their effort to understand the platform and I hope Microsoft comes out with better documentation for things like customizing Intellipad, adding new modes, error handling within Intellipad, System.Dataflow APIs etc.

May 27, 2009

Windows 7

Few weeks back I upgraded my Windows vista enterprise to Windows 7 Ultimate RC build 7100. So i have retained all my earlier programs. It works great, there are lot of cool features that have been extolled by many in the blogosphere, so wont touch upon it.

Listing few problems I came across with this windows version. I searched on technet and msdn forums and didnt find any solutions.

1. Once in a while Windows 7 desktop UI flickers. When it flickers it flickers violently. Entire Task bar and all the icons go blank. I am yet to figure out the reasons/conditions under which it behaves like this.

2. Wrong system icon tray notifications. Though I have internet connection, the net work notiifcation displays incorrect meesage that "no internet access" as shown in the below image. This is true for both LAN connection and Wireless Lan connection.

Internet Access.png

3. After Upgrade from Windows Vista, my VPN CheckPoint SecureClient was not starting. Went to Services MMC and found that "Check Point VPN-1 Securemote service" is dependent on VPN-1 module that has been deleted or marked for deletion. Tried many things but finally reinstallation of the Secure Client Software did the trick. After reinstalling i found that "Check Point SSL Network Extender" has been added to services list. In the Log On options, "Allow Service to interact with Desktop" has been checked.

4. e Trust Anti Virus 8.1 version from Computer Associates. This is not compatible with Windows 7. It is installed properly and works. Just that it does not download the latest signature files. Add to this, Action Center shows me that this Antivirus software is not compatible and suggests me other compaines anti virus programs. Being on the corporate network cannot use anti virus software not recommended by our network group. Currently working with our network team to sort it out. This may force me to take my laptop off the network or force me to down grade my o/s to Vista.

5. Not exactly related to Windows 7. IE 8 that comes as a default browser is not compatible with Outlook Web Access. This requires Exchange Server to be upgraded with a patch to allow DHTML controls on browser. Any patch management on servers is a huge task for network folks so would take take. Some of our internal IS apps are not compatible with IE 8. So I am planning to install a VPC image on my laptop with IE 6 as browser. Are there any better ways to work around it??

If you are aware of any solutions to the above problems, please point me to them.

May 19, 2009

Custom Classification Types and Formats for your Textual DSL

Classification types and their formats are defined to perform text formatting in Intellipad for your textual DSL. For example, you would want to define text formatting for your language tokens like keywords, comments, values etc. so as to make it more readable while viewing/editing inside the Intellipad. The out of the box classification types as well as their formats are defined in ClassificationTypes.xcml and ClassificationFormats.xcml respectively under the folder: C:\Program Files\Microsoft Oslo SDK 1.0\Bin\Intellipad\Settings folder.

The out of the box classification types are fine and do cover most of the tokens that you will usually find in any textual DSL, but what if we want to have our DSL specific classification types and formats? To my knowledge there are couple of ways in which you could do this today.

  • Add a new classification type to the ClassificationTypes.xcml file in the Settings folder, as shown below:

<act:Export Type='mvstc:ClassificationTypeDefinition'>
      <ls:ClassificationType Name='CustomKeyword' DerivesFrom='text' />
</act:Export>

To define the format for the classifiaction type that we just added, we need to define the format in the ClassificationFormats.xcml file in the Settings folder, as shown below:

<act:Export Name='{}{Microsoft.Intellipad}ClassificationFormat'>
      <ls:ClassificationFormat Name='CustomKeyword'
                             FontFamily='Consolas'
                             FontWeight='Bold'
                             Foreground='#FF2B91AF' />
</act:Export>

Make sure that “Name” attribute while defining the format should be same as the Name of the classification type that we had defined in the previous step.

In your DSL MGrammar code you can use the classification type created above in the following manner:

@{Classification["CustomKeyword"]}
token MyToken = “SampleToken”;

Now if you save the .xcml files, close (if already open) and open up Intellipad, you will be able to see the new classification type in action.

  • Now the second option is to have a separate .xcml file for our DSL, where we could specify the classification types specific to our DSL and can be deployed when we install our own mode into Intellipad. In order to define the same classification type specified above in a separate .xcml file, you need to first create a file with the extension .xcml (Name doesn’t matter, but something related to your DSL would be better), and then specify the type and the format as shown below:

<act:Exports xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
             xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
             xmlns:act='clr-namespace:System.ComponentModel.Activation;assembly=Activation'
             xmlns:mvstc='clr-namespace:Microsoft.VisualStudio.Text.Classification;assembly=Microsoft.VisualStudio.Platform.Editor'
             xmlns:ls='clr-namespace:Microsoft.Intellipad.LanguageServices;assembly=Microsoft.Intellipad.Core'>
 

   <act:Export Type='mvstc:ClassificationTypeDefinition'>
      <ls:ClassificationType Name='CustomKeyword' DerivesFrom='text' />
   </act:Export>
   <act:Export Name='{}{Microsoft.Intellipad}ClassificationFormat'>
      <ls:ClassificationFormat Name='CustomKeyword'
                             FontFamily='Consolas'
                             FontWeight='Bold'
                             Foreground='#FF2B91AF' />
   </act:Export>
</act:Exports>

Once you have saved the file, you can either put this file under the Settings folder or you can create a new directory for your DSL under the C:\Program Files\Microsoft Oslo SDK 1.0\Bin\Intellipad\Components folder, and put it in that directory to enable Intellipad to pick up the types and their formats.

As per my understanding, Intellipad by default picks up the classification types by scanning the files with .xcml extension both in the Settings as well as the sub folders under the Components folder and picking up all the Export elements with the type as ClassificationTypeDefinition. Considering this fact, to me the second option would be a better one to go for, when it comes to ease of deployment and maintenance. But when it comes to performance, I feel having all the types in one file would be a better option. Hence if you have a lot of custom classification types that you would be creating for your DSL then I would suggest you go for the second option, but if the number of classification types you are going to create are less in number, then it would be better to define those in the ClassificationTypes.xcml and ClassificationFormats.xcml files under the Settings folder.

 

May 07, 2009

Caching Controversy!!!

While defining .net architecture several times we come across scenarios where multiple server side caching options needs to be evaluated and dealt with, with .Net 4.0 it is to be seen whether these decision get simplified or further complicated.

Microsoft Project code name “Velocity”, part of .net 4.0 is Microsoft’s highly scalable in memory cache framework for all kinds of data in distributed applications. Usually caching is employed in application to improve the performance and scalability. Good candidates for caching data is static or master data e.g. product list. Recommended practice is to cache master or reference or lookup data as it hardly changes over time but at times scenarios exists where transactional or session specific data needs to be cached for valid reasons.

Velocity provides a framework where by the identified data can be cached in middle tier server memory and database round trip for the same can be avoided. Objects can be added in cache using simple Get or Put calls.

Velocity can be hosted either within the application (embedded) or as an independent service. If hosted within the application, the distributed cache shares the memory with the application. If hosted as service, client access the cache using client APIs.

To ensure every time the request to cache is fulfilled and the cache returns the correct results in quick time, distributed cache can be partitioned, clustered and or replicated. Nodes can be added or removed dynamically to and from clusters to increase the throughput or decrease the response time. Velocity will do implicit load balancing and new data will be cached in new node and existing data will also be migrated to new node.

Clients can either directly query the Cache host which in turn returns the correct cached object or client can locally host the routing table which keeps track of where the distributed cached objects are and can query cached objects directly.

To ensure cache consistency, Velocity supports Notification services, optimistic and pessimistic concurrency. Expiration of cache is time based and cache object eviction can kick in based on least recently used object algorithm or high water mark of the application.

Velocity provides SessionStoreProvider class that plugs into Asp.net session storage provider model and stores session state. Using Velocity ensures non sticky session routing and ensures session data is available across clusters.

For application specific data the cache can be hosted or embedded within the application. For data required enterprise wide or cuts across multiple applications should be exposed using Cache Service. In the enterprise architecture, Velocity can very well sit on top of Master Data management applications and negotiate the frequent Database hits from client applications.

Caching options

APIs from System.Web.Caching namespace can be used only in Web applications, the problem with directly using these APIs in the application is every developer uses his creativity in dealing uniquely with cache and hence it is recommended to use Enterprise Library Caching application block to standardize the coding/usage pattern. With 4.0 the new namespace System.Caching will take over for specifically inproc caching. System.Web.Caching will remain to support backward compatibility.

In process cache is the fastest of all the caching techniques. Enterprise library Caching application block using in-process cache has limitations on the scalability, reliability and availability front, when the asp.net worker process gets recycled the data in the in memory cache is lost. In Web garden, where multiple worker processes exists, the data integrity issues surface from the limitation due to synchronization of multiple copies of cache. In Web farm scenario, where multiple servers exist, a standalone cache is unaware of other servers and their respective state which again leads to data integrity issues. In process cache cannot usually grow beyond what the application process can handle where as distributed cache can grow in size through distribution.

Outproc technique using Asp.net State Server/service on 32bit machine can grow up to 2GB of memory space, up to maximum 3 GB if you use the /3GB switch. As 32bit servers are becoming legacy and 64bit becomes main stream, this limitation of memory space will not hold long. If run with single state server, the state service technique has single point of failure. If State server is clustered, it has the limitations of data synchronization across cluster. If the state service or the machine on which it is running goes down, clustered state service will still not be able to recover the state of the data e.g. Ready to check out shopping basket. Though you can still continue to be in the application and may or may not have to re login into the application, selecting and adding items in to the basket will have to be started all over again, ultimately hampering the user experience.

Outproc techniques using SQL Server to some extent resolve above mentioned data integrity and scalability issues, but the idea behind caching is to save the database roundtrip, and here the data is being cached in another SQL Server database instance defeats part of the objective. In customer scenarios where SQL Server cannot be used as caching database, custom provider for Oracle or for that matter any database can be used to extend it to respective database but the database roundtrip limitation holds.

Till date if the architecture needs to deal with distributed caching problem, it has to live with the limitations of out of the box outproc techniques or rely on 3rd party components like NCache,
ScaleoutState Server, StateMirror, etc. Having out of the box support for distributed cache from .net 4.0 Velocity framework would help deal with such scenarios without additional investments.

In physics, Velocity is ratio of change of distance to change in time in specific direction. The Microsoft framework Velocity certainly attempts to fulfill this definition by making the data available to end user in quick time J

May 04, 2009

Plan, Deliver, Operate, Manage – Microsoft Operations Framework (MOF)

During the beginning of this decade as Visual Studio and .NET created  waves in the industry for its robust infrastructure and rapid application development and interoperability, Microsoft came up with its “Solutions Framework” (MSF) to catalyze its adoption. Microsoft Solutions Framework addresses the concerns of Developers, Agility and Processes.

Now, it’s time to think big. Microsoft Operations framework (MOF) addresses the entire gamut of challenges cutting  across CIOs, managers, admins and developers.

Microsoft  Operations Framework (MOF) consists of integrated best practices, principles, and activities that provide comprehensive guidelines for achieving reliability for IT solutions and services. As Always, it’s a simple interface beneath a robust infrastructure. MOF provides question-based guidance that allows you to determine what is needed for your organization now, as well as activities that will keep the IT organization running efficiently and effectively in the future.

The guidance in the Microsoft Operations Framework encompasses all of the activities and processes involved in managing an IT service: its conception, development, operation, maintenance, and—ultimately—its retirement. MOF organizes these activities and processes into Service Management Functions (SMFs), which are grouped together in phases that mirror the IT service lifecycle. Each SMF is anchored within a lifecycle phase and contains a unique set of goals and outcomes supporting the objectives of that phase. 

MOF guidance is available at http://www.microsoft.com/technet/solutionaccelerators/cits/mo/mof/default.mspx.

May 01, 2009

Microsoft Surface Technology: Some Field Observations

Yesterday, I hosted a major transport agency in Atlanta at the Atlanta MTC to demo and showcase Microsoft Surface Technology.  Multi-touch based interactivity is already main stream - thanks largely to iPhone and similar handhelds, but it is still amazing to watch the way people respond to the way Surface based applications.

The multi-touch part is cool and all but what really make people truly marvel at this new technology platform is the multi-user and object recognition capabilities of Surface technology. Being able to manipulate portions of user interface while someone else is also using the same application is a new experience for most people. Like I have mentioned in my previous posts, this multi-user capability draws people into genuinely collaborative actions.

While multi-user nature of Surface technology allows for unusual user experiences, the object recognition capability gets people thinking about true power of intelligent ambient systems and how it could solve every day problems around us.  With Bluetooth capabilities that allow communication between Surface and devices like mobile phones, the Surface technology gives you a very powerful platform to build business solutions that leverage natural user interface (NUI) and connect them seamlessly to the power of mobile computing.

As a designer, building Surface applications has been a real education though. Mental reflexes trained in building interactions that are triggered by instantaneous events - like click of a button or mouse click – need to be forcibly unlearned as gestural interactions are more dragged out and spread over time. Thanks largely to the very well written document that accompanies the Surface SDK, the process of learning to design for Surface can be more focused and productive. The document lists some core principals - like Seamlessness, Social Orientation, Spatial Orientation, Contextual Environments and Super Realism that are well explained and come handy to bring out the uniqueness of Surface based interactions.

For anyone wanting to learn about Multi-touch devices and how to design for multi-touch devices, one very comprehensive resource is the site put together by Bill Buxton - Multi-Touch Systems that I Have Known and Loved. I have used it extensively in my learning process of designing for Surface Platform.

Subscribe to this blog's feed

Infosys on Twitter