Month: August 2009

Virtualizing SQL Server, some tips.

I just got these considerations about virtualizing SQL Server on VMWare from my Boss and I would like to share them with you.

General comments on problems encountered and why people not virtualizing SQL

  1. Storage ( most people just do not have enough spindles to start with and then when people consolidate they use less spindles not more, error in design and understanding of basic i/o principles )
  2. Queue lengths are a problem so add as many paths to storage as possible.
    Using vmware makes sequential reads look more like random reads due to interleaving of traffic across vm’s
  3. Ensure all dbs ( data, temp, log etc ) are on separate vmdks or preferably rdms, improves i/o queue throughput
  4. Memory ( ensure you set min, max reservations per vm to avoid swapping )
  5. 1 database instance per vmhost ( to allowing you to tweak memory / priorities as required )
  6. Use the latest intel chips, as provide biggest reduction in latencies for vm tasks

Following a thru 6 results in linear performance until the cpu saturates around 90%.

Basically they said VMware is never the bottleneck …

Assuming the rules above are followed you should then consider tweaking the following:

  1. Tweak the o/s first to allow large pages and ensure alignment with storage ( gives +6% improvement )
  2. Turn on sql priority boost in SQL and ensure correct O/S drivers installed in host ( gives +14% when used with 1. )
  3. Turn on static transmit coalescing in ESX networking ( gives +1%, so they advise don’t bother )

They are interesting considerations. Honestly, I know there are some “how to” and some “best practices” when you prepare a SQL environment. Using separate HD for separate files (mdf, ldf), keep system database separate from user database in different disks, split big tables in different location, maintain the indexes and so on … Unfortunately when you reflect this to a Virtual Environment, everything changes.

I didn’t find yet a good documentation about virtualizing SQL but I just tried to build a Clustered environment with Windows 2008 R2 x64 and SQL 08 x64 SP1 and the Quad Core I used for my experiments was not enough …

Smile

Tags:

BizTalk 2009, cannot create project.

In the last days we have received an update for Visual Studio 2008 SP1. The update is 365 MB and it’s called the “Security Update for Microsoft Visual Studio 2008 Service Pack 1 (KB971092)”.

After you install this update, when you try to create a new project on BizTalk 2009, you receive in the bottom bar, a notification that says “Unable to create the Project”.

The first solution is:

  1. Open BizTalk 2009 DVD > Select Install BizTalk
  2. Choose the option Repair
  3. Reboot the server

If you are lucky now you are able to work again with BizTalk 09. If you are not lucky (like me … Smile) there is an additional step:

  1. REBOOT!!

Tags:

BizTalk 2009 tutorials available.

I am starting to work on a really interesting project where BizTalk and WCF will be the keys.

I have used in the past WCF and I am not worried about it, I like it and it’s better than the old Web Services.

Unfortunately I know BizTalk but I still do not master it. Over the network I didn’t find anything really useful but Microsoft has tons of tutorials and how to.

  1. Overview of BizTalk 2009 http://www.microsoft.com/biztalk/en/us/roadmap.aspx
  2. Getting Started http://msdn.microsoft.com/en-us/library/aa560946%28BTS.10%29.aspx
  3. Step-by-step with some databases (Oracle, Siebel …) http://msdn.microsoft.com/en-us/library/aa560946%28BTS.10%29.aspx
  4. Common Tasks http://msdn.microsoft.com/en-us/library/aa548054%28BTS.10%29.aspx
  5. Complete guide to BizTalk 2009 http://msdn.microsoft.com/en-us/library/aa548004%28BTS.10%29.aspx

Also, if you need to start with WCF and the NET Framework 3.5, here is what I have found over the network:

  1. Overview http://msdn.microsoft.com/en-us/netframework/aa663324.aspx
  2. Beginner http://msdn.microsoft.com/en-us/netframework/dd939784.aspx

Probably in the next days I will start to evaluate some books about BizTalk 2009 and WCF. If anyone of you want to ask me to evaluate a book about WCF or BizTalk, I would really appreciate. Wink

Stay tuned!

WPF and MVVM tutorial 08, messaging.

Before continue our tutorial I want to take a break and talk about the messaging options. Also because the MVVM is a new interpretation of an old pattern, some of my friends are using the Mediator Pattern and today we must talk about that before building the Details view.

As it was requested by many people, here is the location of the source code on CodePlex: www.codeplex.com/MVVM. Please refer there to any issue.

Communication through the views.

Before starting we need to spend 5 minutes over the communication. The first solution we used was the Navigator Pattern. Actually what I do not like of the Navigation Pattern is that we are going to involve one object for the entire application’s cycle. A different solution would be the Mediator Pattern.

Over the network there are some pretty cool frameworks like Prism Project, Caliburn Framework and more. For our purpose (understand and implement the MVVM pattern) we need something lighter but better than the simple navigator pattern.

I have found this beta framework that manage the communication between the views in a very nice and clean way: MVVM Light Toolkit.

image Using a framework, everything will be easier then. For example, we can implement in our List View a simple command that will pass a selected entity to a Details View in this way:

MVVM Light Toolkit, implementation with WPF.

This toolkit was created in order to facilitate the implementation of the MVVM pattern inside WPF and Silverlight applications. Actually it has a fancy setup that works great also with Visual Studio 2008. It installs inside VS:

  • MVVM Application Template for Silverlight and WPF
  • ViewModel, View and ViewModelLocator class templates
  • Some cool code snippets

If you want to have a look in depth on how it works, please refer to this page: MVVM light toolkit for WPF and Silverlight.

So, coming back to our project, we just need to locate the .dll and add a reference to our ViewModel layer in this way:

image

Then we will be able to write some simple code like this one, directly in our existing ViewModels:

image

Building a Sample Project with Galactic Toolkit.

After the installation you will have these 2 new templates inside Visual Studio:

imageincluding some examples.

image

The difference from what we did until now is in the communication that is handle by messaging. On our solution we were going to use the Navigator in order to send messages and to manipulate objects between the views.

This is done in a different way by Galactic.

First of all the communication with the user.

We still have a static class but it is used in a real different way. You have to create a relay command inside the view model:

Then we need to assign the command, trough the binding process, to our view:

And finally we can create a Relay Command instance and assign it to our ButtonCommand. Then we use a Message function to talk with the client, in this way:

Pretty cool right?

If instead of talking with the client, you need to open a new window and pass an entity to it you can do it also through the toolkit.

You can view a simple here on Corrado Cavalli blog.

Now we are able in the next tutorial to write the C.R.U.D. view of our application.

Stay tuned!!

Tags:

Real guide, configure Exchange 2003 SP2 and iPhone 3.0 OS.

Hi guys, as I told you in the previous post, I bought a new iPhone 3GS with the new OS 3.1. The phone is pretty cool, it works great and it has tons of software, utilities and services that I didn’t find in any smart phone, including the BlackBerry.

The only big problem was to configure my business exchange email. Simply, it was not working until today. So in this small guide I am going to explain step by step what you have to do in order to have a full functional and working iPhone!

Configure ActiveSync on Exchange Server 2003.

Before starting you must successful enable ActiveSync and OMA (Outlook mobile access) into your Exchange Server. If this step will not be successful, do not go ahead!!

In order to use ActiveSync on your exchange 2003 you must have:

  1. Windows Server (standard or enterprise) with the latest updates and the Service Pack 2 working.
  2. Exchange 2003 with latest updates and Service Pack 2 installed and working.
  3. Outlook Web Access working and accessible from outside your Network.
  4. Firewall ports (443, 80) opened for OWA.

If you cannot satisfy one of these prerequisites, please Google and search for a solution. I am not going to explain here how to enable a port into your firewall or how to install OWA in Exchange Server 2003, as in my opinion, out of topic.

After you have successfully installed ActiveSync, you will have this additional option inside your server, you have to right click on global settings>mobile services and choose properties :

image

You have to enable everything in order to have full access to the OMA service.
After that, you should now download and install the Microsoft Exchange Server ActiveSync Web Administration Tool, and handful tool that allows web administration of your smart phones.

After you will install the tool, you will have this web application in Exchange local host:

image

The address is https://localhost/mobileadmin and for default is SSL enabled.

Troubleshoot OMA installation.

This step is fundamental. If you cannot access the OMA web site, you will not be able to use your iPhone or any other smart phone.

Give it a try, inside Exchange, by typing the address https://localhost/OMA and insert your Exchange credentials. If you will see a text page with your mail folders, you are fine, otherwise you need to troubleshoot the problem … If it’s working go directly to the iPhone Configuration step.

First of all open exchange active directory inside exchange and click exchange tasks over your user account. You have to enable all the futures, like this screenshot:

image

If it’s not working yet … like in my situation, you have to configure a new virtual directory for OMA. In order to configure the virtual directory, follow, step by step this Microsoft TechNet article or the HTTP error codes. It solved my problem.

Remember: until you get the OMA web site working, do not try to configure the iPhone!

Configure your iPhone.

I have an iPhone 3GS with OS 3.1, so probably if you have an older version, the screenshot below, will not be the same as mine.

Open the iPhone menu, click over Settings and then the menu Mail, Contacts and Calendars.

Insert a new account, choose an Exchange account.

image

Server: I typed my web mail address, like webmail.mydomain.com, without https. Then I choose the SSL enabled communication. You if you have a public URL for OMA then you have to type that address.
Do not type something like mymachinename.domain.whatever of course it will not work because your iPhone is not in your Office Network.

Username: it’s my Windows username I use in the office.

Domain: it’s my Active directory domain.

After that, you will be prompted for which objects you want to keep sync. I choose all of them like this screenshot:

image

After this step, after 5 minutes, you will be able to open your email and work with push technology, this means that you will be able to work directly inside your mail box from your iPhone. For example, if you add an event in the iPhone calendar, this will be added also into your mailbox in the office, and so on …

This will be the final result, pretty cool!!

image

Enjoy and please beware about the iPhones screenshots, for each version of the OS (2, 2.1, 3, 3.1) they change a little bit, but the information are always the same.

Personal Considerations from BlackBerry to iPhone.

  • Advantages
    • IPhone is more useful, the usability is better than BlackBerry and the screen more clear.
    • The contacts search, merge and copy options are awesome. BB is not so awesome …
    • The emails can be zoomed just with a finger, with the BB you cannot.
    • You can read Office, Acrobat, Images and Video in the mails, BB cannot.
  • Disadvantages
    • The most important is the battery life. My iPhone in a production environment doesn’t live more then 10 hours. The BB has a battery life of 3/4 days, always on.

Finally, Microsoft Exchange is the best as an Email server and the activesync service is very good, but the best match for me is Exchange server with IPhone, very impressive!!

Additional Resources:

http://support.apple.com

http://www.petri.co.il/configure_oma.htm

http://www.msexchange.org/tutorials/Managing-Mobile-Access-Exchange-Server-2003.html

Tags:

Microsoft Office 2010 preview.

Today I have received an email from Microsoft Connect. Office 2010 suite is available for download. Of course is not a RC or RTM but just a beta preview of the final product. Available for download there are:

  • Office Professional x32 and x64
  • Visio, SharePoint Designer, InfoPath and the new SharePoint Workspace x32 and x64

The first thing you will notice is that now we have a real x64 office installation, so you can use a real x64 office system on your Windows 7 x64 (today is the official release of the RTM of Win 7 on MSDN).

Now, let’s have a fast overview of this new office.

As you can see the setup page is not changed from the 2007 version. It’s the same and also the options are the same.

image

Also the icons and the file extensions are not changed at all.
The splash screen is changed as you can see for Microsoft Word:

image

And it seems to be faster in the load process.
The interface has now a new design for the ribbons. The logic is pretty the same but the layout respects more the Windows 7 layout.

image

Outlook 2010 is changed a little bit. As always, in order to use your hotmail account Outlook will prompt you to install the Outlook 2010 connector. Nothing is changed for exchange.

You can now view the history of a mail message and follow up answers inside a tree-view:

image

Finally the additional change is in the start menu of each application. For example if you press the start button into outlook you will be prompted with this new ribbon menu, very intuitive:

image

Finally I had a first look at Microsoft Access 2010, that seems to be more flexible and reliable as a office small business database. There are now 2 different type of database: normal and web database as you can see here:

image
but the Office online template is still not working. I suppose because this is still a beta preview so the web site for office 2010 is still not ready. Also I have noticed that the title bar says “Office Access 2007 database” after I have created a new one.

I have also found this new option:
image
This option helps you a lot in creating a new master-details form, just in few steps. But I am still receiving some bugs notify …

This is the option page available for access:

image

Final consideration

In my opinion Microsoft is doing a great job. They provide for free a complete software like Office and trough our feedbacks, they will then release the final RTM version.

Like they did with Windows 7, the beta of Office is already stable and fast and I am really curious to have in my hand a final system with:

Windows 7 x64, Office 2010 x64 and Visual Studio 2010 x64. A real stable, fast and productive environment.

Mobile development, my 2 cents!

I am going mad for the iPhone. I just ordered the new iPhone 3gs and like any developers, I want to give my 2 cents. I want to talk with you about the development program and what you can really do with the Cocoa Mobile Framework and compare it with Windows CE development.

Mobile framework with Microsoft NET.

This is the most used, cool and easy framework to use in order to develop mobile application for windows CE or windows mobile, pocket PC and more. In order to do that, you need to download Visual Studio 2008. That’s it.

Then you can create a new mobile application project and choose from the various options:

image

You can choose the framework (Compact Framework 2 or 3.5), the device O.S. (pockect PC, Windows CE …)

The IDE is simply amazing because it’s visual studio! You can do everything you usually do with the normal Windows Client development. Drag controls, using the final phone interface.

image

You do not need any additional window, it’s like any other development project in C#. The GUI designer, pretty cool, the code editor with the amazing VS intellisense and all the other nice futures of VS.

If you want to enjoy a cool italian community, this user group is managed by some of my friends, and they talk only about mobile development: http://www.ugimobile.org/

Mobile Development for BlackBerry with Visual Studio.

One of the most nasty development environment is the one offered in past for systems like Symbian (Nokia) or BlackBerry.

I have just found at this address: http://na.blackberry.com/eng/developers/rapidappdev/vsplugin.jsp a development toolkit for Visual Studio. With this toolkit we can easily develop application for BB in our Visual Studio environment. Pretty cool!

Of course this is under an enrollment agreement that you can find here: https://www.blackberry.com/CorpDevZone/ but it’s free!

Have a look here:

image

Same as before. You have a nice GUI designer, you can choose the model of the virtual device (BB) and also you can test your application over different model in order to be sure that your application will be feasible for all the blackberry’s users.

Mobile Development for iPhone with XCode and Cocoa.

Ok, first of all you need to know 3 important thing about iPhone development:

  1. You can develop iPhone software only with XCode 3.0 on MAC OSX 10.5.7
  2. You need to install the latest version of the iPhone SDK
  3. You must enroll the Development program, and if you want to sell your applications, you must pay a fee on apple …

Now if you are able to do all these steps, you can open XCode 3.0 on your MAC OSX and try to develop for iPhone. These are some screenshots from my MAC:

image

This is the main screen where you can manage the files. Then, there is the GUI designer, called Interface Builder

image

Finally there is the code: Objective-C. The worst code I have ever used, trust me. This is just a small sample used to build a normal class with a couple of properties:

image

Some final considerations.

Here are my 2 cents about mobile development for Smartphone. Please tell me what you think about and if you are agree with me or not.

  Windows Mobile BlackBerry iPhone
Visual Studio yes yes no
Multi platform no yes no
multi IDE no yes no (yes with mono)
OOP yes C# yes C# yes/no obj.-C
easy SDK yes yes no
enroll program no yes free yes pay

So, as you can see, if you want to join the fun boy iPhone development and make some money, you need to pay something (at least the enroll program and a junky MAC).

If you want to do the same for Windows Mobile and BB it’s completely free.

Also if you do not want big head hake, with the Win or BB development, you can work with the power of C# but the iPhone is running only with objective-C that in my opinion has a very strange and old syntax …

Tags: