I ran across an interesting blog about “Creating, Configuring, and Consuming a WCF Service in IIS”. 60 steps later and you had something to play with…. http://blogs.msdn.com/zainnab/archive/2008/04/30/creating-configuring-and-consuming-a-wcf-service-in-iis-7.aspx

 

As much as we love .NET development, we can hardly call this productive. What I am going to show you is how Aware Server can take your developers to the next level, and increase their productivity by 67%. Not only do you get an huge boost in development productivity, you also save an enormous amount of time and gain tremendous number of features for Operations (deployment, provisioning, and monitoring of your services).

 

It’s a no brainier, be more productive, deploy and provision your services to any number of machines. Aware Server gives you everything, and picks up where VS.NET drops off. So let’s get started.  Also this entry is quite long because I included every screenshot as I did things. 

  

Create and Debug an Aware Service (4 steps – 5th step is if you do not trust me)

1. Run VS.NET as Admin.

clip_image002

 

2. Start a new project – As you can see, we are going to use an Aware Template. One of the many templates is the “Aware Distributed Service”. This is what we will use today for our comparison.

clip_image004

 

3. Enter your Aware Service information.

clip_image006

 

4. Debug your new service. Hit F5 – Now the Aware Service Invoker starts up (no more test harness app's needed) and allows you to test your service immediately. Go ahead and click the “SomeOperation” function on the left tree, then click the “Invoke” button. You will see the Results, Request, and Response messages. By default the Aware Distributed Service template creates the “SomeOperation” method for you so that is what you will test. Now all you need to do is code your own operations.

clip_image008

 

5. Just for kicks, I’ll add in a step to let you verify your service was up and running fine. Just open up the Aware Enterprise Manager and while you are debugging you will see that your service is running. By default on net.TCP.

clip_image010

 

 

Deploy an Aware Service (3 steps – 4th step is if you do not trust me)

1. Now since we do not need a testharness any more we actually eliminate about 11 steps. That said, we will walk through the overall process that leads you to create a client application. This will let you see how easy it is to consume and use Aware Services from ANYWHERE.

Before we call this service, we will deploy and provision the service. Aware Server is based on Environments. You deploy to environments, and then provision your services to run within those environments. Now you may say that this is actually more work than using the VS.NET “WCF Service” template which automatically deployed and provisioned it to your local IIS. What we are actually doing is eliminating about 20 of the other steps that happen later on to configure and use different endpoints, and in our case, we automagically do this for any machine that our service is provisioned for.

So let’s get started, and deploy this service. In the Solution Explorer, open the Deployments directory, and double click the ServiceDeployment_Debug.aware file.

clip_image012

 

2. This will open the Aware Deployment File Viewer for you which you should then see the following viewer (Deployment Settings). Now to deploy your service, click the “publish now” button. Notice that there is an “Auto Publish” option here if you wish to automatically publish this service on each build.

clip_image014

 

3. After you click the “Publish Now” button you will see the “Deploy to Environment”. By default your current environment is selected, but you may choose any environment that you have security access too. For or example just click deploy and your service will be deployed to your default environment.

clip_image016

 

4. Lets validate that it was deployed. Return to the Aware Enterprise Manager and then navigate to the “Deployment” tab at the very top. You will see all of the services deployed in your environment, one of which is the service you just deployed (Easy Aware Services).

clip_image018

 

Provision an Aware Service (3 steps – 4th for info, 5th step is if you do not trust me)

1. Now that we deployed our service, let’s provision it to run in our environment. Return to the Aware Enterprise Manager again, and now click on the “Service Provisioning Polices” tab at the top. You will see all of the policies in your environment.

clip_image020

 

2. Let’s go ahead and create one for our new service, so click the “Create New” in the tool bar. You will see the Service Provisioning Policy Editor pop up. Give your policy a name, application name, and description, and then click on the “Included Service Manifests” tab.

clip_image022

 

3. Once you are on the “Included Service Manifests” tab, click the “Add Service Manifest button and you will get a list of all services deployed in that environment. Select your “Easy Aware Service” and click “OK”. At this point you could click “Save” on the policy and be done (defaults will be used).

clip_image024

 

4. At this point we could click the “Save” and our services would start running, but we will review some additional options you have for our policy. Now remember how we talked about the default protocol used is net.TCP, you can easily change that here, or just add as many wish to use (from TCP to REST). No code changes, no configuration night mare. Click Cancel here and we will continue with the default setup.

clip_image026

 

Not let’s set the “Conditions / Exclusions” that will be used to determine what machines the service will run on. By default conditions are set to Any/Any. Click the “Add Condition” button and you will see you can specify any type of condition (from machine names, to only machines running with 2 processors, or machines that only have 4gig of Ram). For this example well just use the defaults.

clip_image028

 

Another option that you have is to set time windows of when your service should run. This allows you the flexibility that if you have some services that are heavily used in the early mornings you can schedule them to run on more machines to handle the heavy peak loads, but then during the day stop those services so that they do not interfere with daily operations.

clip_image030

 

Click “Save” and you should see your newly created policy enabled and running. Note that by mousing over the policy it will tell you the details.

clip_image032

 

5. We created the policy; now let’s verify that our policy is doing what we asked it to do. Return to the Aware Enterprise Manager and select the “Services” tab again. Just as we saw before during F5 development, we see our service running, but now it is running due to the policy being applied.

clip_image034

 

Call an Aware Service (4 steps – 5th step is if you do not trust me)

1. Now that we have developed, deployed, and provisioned our service to run. Let’s put together a little client application to call our service. Create a new project. Just like before you get the project selection window. This time we will use the “Aware Console Application”, give it a name of “MyFirstAwareClient” and then click OK.

clip_image036

 

2. Now proceed to add Aware Server References by right clicking on the project and “Manage Aware Server References…”

clip_image038

 

3. You will see the “Aware Service and Business Process References” pop up screen. All you need to do is select your service, then click “Add”. Now click “Apply” and you are ready to call your service. No URL is needed.

clip_image040

 

4. Aware Server automatically adds all of the proper references (downloading shared contracts) and generates the client proxy to make your calls. What it boils down to is TWO lines of code; create the client, make the call.

   1:  using(EasyAwareServicesClient client = new EasyAwareServicesClient() 
   2:  { 
   3:      Console.WriteLine("What is 2 + 3? {0}", client.AddNumbers(2,3)); 
   4:  } 
  

5. Hit F5 and you should see.

clip_image042

 

Zero configuration, no URL’s to know. So how does Aware know where my service is? That is the magic and simplicity of Aware Server and its Service Virtualization capability based on the Service Location Protocol. Our goal was to make using services as easy and simple as possible.

 

Summary of Aware Server development vs. VS.NET 2008

Aware Server

 

VS.NET 2008

 

Result

 

Built in F5 debugging of services and workflow's.

 

Create your service, then configure your environment, and then create and code your testharness.

 

·         Aware Server 54% faster to develop WCF services.

 

·         Aware Server – now prior WCF knowledge required.

 

·         Aware Server treats workflow development (WF) the same as service (WCF) development.

 

One click deployment – Any environment.

 

Deploy to your machine running IIS.

 

·         Aware Server is “One Click” deployment of services.

 

·         Aware Server allows you to quickly test your services locally, and then deploy them to be shared with all developers.

 

Versioning services and running them side by side.

 

No built in versioning capabilities

 

·         Aware Server will let you easily version and run those versions.

 

Provisioned endpoints.

 

Developer must create the endpoints.

 

·         Aware abstracts protocol from the developer and puts it into the hands of operations.

 

Automatic service call load balancing

 

You need to setup and configure your own load balancing solution.

 

·         Aware automatically scales your services by load balancing your service calls across all machines running your services.

 

Provisioning Conditions.

 

You need to setup your service on every machine you want it to run on.

 

·         Setting up Aware Services to run on one server, or 1,000 servers.  One policy will take care of all deployment and configuration for ALL of your servers.

 

Re-deployment will automatically run your new code.

 

Re-deployment is only local on your own machine.

 

·         If an Aware Server policy is setup to run your service on 5 machines, when you redeploy that service Aware Server will automatically re-deploy the new code to all 5 machines.

 

Provisioning time schedules.

 

You would have to code/manage a schedule yourself.

 

·         Aware Server automatically will run services when you want them to run, where you want them to run.

 

Zero configuration.

 

You need to know the URL of the machine of the services you wish to call

 

·         Aware Server was designed from the ground up with Services Virtualization in mind to eliminate service location configuration.

 

IIS is not required, Although you can use IIS as well.

 

IIS is required to host your services.

 

·         Aware Server offers you the flexibility of using whatever you hosting model you want.

 

   

To find out more please visit www.gridgistics.net and go to the learn section.

 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Related posts



Comments

May 5. 2008 22:32

Michael Smith

Love the comparison chart!

Michael Smith us

Comments are closed