Archive for January 31st, 2010

Allowing remote desktop to a Hyper-V host or virtual machine – Part 3

Sunday, January 31st, 2010

So now let’s say that you want create firewall entries that port forward RDP requests to specific VMs running on your Hyper-V host. Again, you need to first make sure that each VM has a unique IP address on your local area network, can access the Internet through your firewall, and has RDP enabled as described previously.
So in this example, I have two VMs at 192.168.1.110 and 192.168.1.111. I’m going to pick ports 57110 (a custom port which I’m calling RDP VM1) and 57111 (which I’m calling RDP VM2) to forward to those respective IP addresses.

blog4

Now, if I try to RDP from an external address to router external address:57110 or 57111 my connection will automatically be forwarded to one of the VMs running on my Hyper-V host.

Share

Allowing remote desktop to a Hyper-V host or virtual machine – Part 2

Sunday, January 31st, 2010

In the last update, I talked about what you need to do on the host computer or virtual machines to allow Remote Desktop connections. This time I’ll take a look at setting up your firewall to forward external RDP requests to the appropriate computer or VM. This is known as port forwarding, and will vary from one firewall application and router to another.
On my router, a Verizon FIOS router, this is found under Firewall Settings, Port Forwarding.
Here, I’ve created an entry for TCP port 3389 to forward to 192.168.1.100, my Hyper-V host computer on my internal network.

blog3

Next you need to know what your external IP address is on your router/firewall. This can be done by browsing to http://whatismyipaddress.com/. In order to test that it’s actually working, you can either have a friend try to connect by opening up a Remote Desktop Connection to your external IP address. If you assigned a different port, you will need to specify that here.

Share

Allowing remote desktop to a Hyper-V host or virtual machine – Part 1.

Sunday, January 31st, 2010

I run a lot of computers as virtual machines under Hyper-V. Occasionally, it’s nice to be able to provide someone outside of my local network access to my Hyper-V server or a guest VM on the Hyper-V host. We can do this by enabling RDP, or Remote Desktop Protocol.
In part one I’ll discuss how to set this up internally, assuming your Hyper-V host computer is behind a firewall.
To enable RDP access your Hyper-V host and all VMs on this machine, then you need to do four things:

    1. Make sure that this machine has access to the Internet, preferably via NAT over your firewall/router
    2. Make note of the IP address for the Hyper-V host computer
    3. Enable remote connections in the System Properties dialog box, on the Remote tab. (fig. 1)
    4. Enable RDP to this computer in Windows Firewall with Advanced Security (fig. 2)

Fig. 1:
blog1
Fig. 2:
blog2
To enable RDP to the Hyper-V host, open Windows Firewall with Advanced Security, then in Inbound Rules, make sure that Remote Desktop (TCP-In) is enabled.

To enable RDP to a guest VM, you need to do the same thing: make sure that the computer can access the network (this can usually be accomplished by assigning one of the virtual networks configured for the VM to the External network), make note of the IP address for the VM, and finally enabling the RDP protocol on the firewall for the VM.
At this point, you should be able to connect to the Hyper-V host and any VMs that have a valid IP address for your local area network. Test it to verify.

Share

PowerPivot for SharePoint

Sunday, January 31st, 2010

Now that PowerPivot for SharePoint is properly installed, you are ready to begin sharing an managing PowerPivot workbooks created in PowerPivot for Excel. If something is not working quite right, you might want to go back to my previous blog and verify your installation procedure.

I have already discussed using PowerPivot for Excel to create workbooks and worksheets to analyze data, so we will continue the discussion with sharing and managing those workbooks using PowerPivot for SharePoint.

PowerPivot for SharePoint consists of the PowerPivot System Service and the SQL Server 2008 R2 Analysis Services in VertiPaq Mode. Excel Calculation Services runs on top of these to provide the facility for sharing and reusing the Excel-based PowerPivot workbooks.

A web browser accesses the service using the Excel Web Access web part. Accessing a PowerPivot workbook with a browser enables anyone to load the workbook and interact with it live without the aid of additional software on the browser computer. The web part enables the user to manipulate the data using the slicers and filters configured when the workbook was created. Selecting and deselecting slicers and filters sends a query back to the PowerPivot System Service for processing and the resulting data is returned to the browser window within seconds. The results are based on the last data set saved with the workbook. If the latest data is required, the browser window includes options to refresh the data.

Another option in the browser window is to open the workbook in Excel. Keep in mind that this requires Excel 2010 with PowerPivot installed to work properly. When the workbook is loaded in Excel, all of the functions in PowerPivot for Excel are available to the user. This includes changing of the layout, slicers, filters, and value fields. The workbook also includes the cached data from the latest data refresh. After making changes to the workbook, it must be uploaded to SharePoint to make the changes permanent.

That is a quick tour of the workbook access layers. Now let’s look at some of the server side features that make PowerPivot for SharePoint such a powerful tool for self-service business intelligence.

The PowerPivot System Service is the middle application layer that handles requests for queries, including data refresh queries. The queried data is initially cached in the workbook itself. However, data refresh requests are forwarded to Analysis Services and the result set is passed back to the client or server application. Each new data refresh is cached by the service for faster response times on subsequent queries from the same client, and from other clients accessing the same workbook with the same data set.

Data refresh jobs can be created in PowerPivot for SharePoint to ensure that the data used in a specific workbook is accurate and up to date based on a set schedule. The jobs are assigned a suggested start time. That means that the job is scheduled to begin no earlier than the start time. However, it does not guarantee that the job will start at that time. PowerPivot has a special start time called “after business hours” which you define in the configuration settings. This option is provided as a default to assist in scheduling data refresh jobs for times that will have the least impact on network performance.

The System Service also manages active and cached connections to Analysis Services. These connections are generally added to connection pools based on the in-memory data source they use. If twenty users are accessing the PowerPivot data set for period-end accounting transactions, the data is cached in memory and each connection is pointed to the same data set.

Active PowerPivot data sets in-memory data sets. Basing the data set in memory enables PowerPivot to manipulate and evaluate millions and millions of rows of data without the burden of hardware I/O slowing down the process. These in-memory data caches are monitored for activity and cached to disk if there is no activity within a specified period of time. The default is 30 minutes without activity.

There are two monitoring jobs that the PowerPivot System Service performs to assist in server management. The first is the collection of usage data to assist in monitoring connections, data cache loads and unloads, query reporting and server status. The data is compiled and made available as both an entry in the PowerPivot Management Dashboard, and excel spreadsheets.

The other task is monitoring server health. In a single server farm this is useful for server and performance diagnostics. If the PowerPivot is installed on a multi-server farm, the monitoring assists in load balancing. Load balancing is performed in a round robin format by default. However, for larger farms it may be advisable to set the Service to perform load balancing based on individual server help.

Now we are down to the lowest layer of PowerPivot for SharePoint, SQL Server 2008 R2 Analysis Services. The new version of Analysis Services includes PowerPivot for SharePoint when installed with SharePoint integration. The Analysis Services engine runs in VertiPaq mode. VertiPaq mode provides the mechanism for in-memory caching of the extremely large data sets used by PowerPivot. The data set is stored in memory using highly optimized compression. Without the in-memory cache, it would quickly become impractical to provide the volumes of data the users require to create meaningful business intelligence solutions. Analysis Services manages the data within the cache by restructuring the data based the slicers and filters selected in a PowerPivot workbook. By providing this restructuring and query capability in memory, the users experience extremely fast response times.

I should mention that Analysis Services in VertiPaq mode does not support traditional OLAP options. If you need to perform operations against traditional cube databases on the same server you can install another instance of Analysis Services that is not in VertiPaq mode for this purpose.

This is a very brief overview of some of the most important things to know about PowerPivot for SharePoint and how it works. So far, I have found PowerPivot for SharePoint and PowerPivot for Excel to be amazingly, and deceptively, simple to install and place into production. The functionality provided by PowerPivot promises some very exciting days ahead for all of the users that have had to wait for days, months, or even years for the creation of a custom business intelligence solution to provide answers to pressing issues. These users will soon find themselves creating business intelligence solutions that answer all of their questions and more in as little as a few minutes.

Share

Necessity

Sunday, January 31st, 2010

This is somewhat of a philosophical post, so bear with me here!  I find the application development process itself to be really interesting and so it’s something that I think about at times.  As a person who writes samples, articles, demos, and other content for  products, it’s pretty common for me to actually need to come up with the idea for the software – not just the software itself.  This is backwards from most software development.

Think about it – an enterprise developer creates software that speeds up or reduces errors for the company’s people.  A “dot com” developer creates a site that addresses some need in order to bring in people for advertising, subscriptions, or what have you.  A hobbyist developer creates a solution to a problem that s/he is having – a magazine collector wants a tool to assist with the collection, and a musician might want a tool for keeping track of gigs.  The bottom line is, as the old proverb goes, necessity is the mother of invention.

Not so with people like me!  The necessity in this case is the need to create interest and provide help with a product or technology.  I end up racking my brain for a scenario that is somewhat realistic and demonstrates the necessary attributes of the product.

As an example, let’s say that I need to come up with a sample of the new file drag-and-drop feature in Silverlight 4.  Drag and drop is nothing new, but it’s new to Silverlight.  I could create an almost “Hello World” style of sample that just exposed a panel, and when a file was dropped it would display the filename.  That’s a pretty basic sample, and a pretty common way to demonstrate something – just create something quick and dirty that shows it.  It’s not very compelling though, and in the end it doesn’t create much more benefit that a paragraph or two of SDK documentation would provide.  The key is to demonstrate real benefit.

Part of a sample is showing how the code works, but an arguably bigger part is showing why you would want it to work that way.  A drag-and-drop panel satisfies the former requirement, but not the latter.  A better example would be the classic file uploader applet.  As you drag files, they get added to a queue and then upload in the background.  This is a clear benefit to a form submission method of uploading files.  It makes sense, it’s quickly graspable, and with some tweaking could probably even be adapted for actual use on a web site.

There is a balance though.  A sample shouldn’t have so much going on that the demonstrated technology is lost.  It should be easy to factor out the rest and focus on the feature of interest.  In the file uploader example, the queuing and uploading needs to be in separate classes so the work of accepting a dropped file is obvious, clear, and adaptable for other needs.

A sample, demonstration, or article that includes code that meets these criteria is considered a success by me.  Doing this on a project with multiple samples, and over multiple projects can be quite a challenge.  It’s very rewarding to get it right though!

Share