This is the third part of the blog series of introducing some of the exciting new features of Windows Azure SDK 2.0. In this series I’ll take you on a tour of new Windows Azure SDK 2.0 features and experience them firsthand. You can find the SDK 2.0 announcement here. You can acquire SDK 2.0 through Web PI, or you can download it Windows Azure .NET Developer Center.

Previous parts:

Windows Azure SDK 2.0 Features (1) – A Even Better Server Explorer

Window Azure Web Sites has been one of the most popular services that new Windows Azure users have been enjoying. You can create a new web site in seconds and your web site is up and running in no time on one of the most advanced data centers of the world – for free! You can learn more about Windows Azure Web Sites on www.windowsazure.com. Ever since the beginning the service has been well known for its simplicity, speed, and friendly developer experience. Now, with Windows Azure SDK 2.0 provide you even better experiences by integrating Web Sites into Visual Studio Explorer, and providing live log data streaming right into Visual Studio.

Server Explorer Support

Yes! Now you can manage your Web Sites from Visual Studio Server Explorer as well!

image_thumb19

Right-click on any web site to bring up its contextual menu:

image

From the menu you can perform common operations such as browsing to the web site, open management portal to manage the site, to stop/start the site, etc.

That’s something cool, but I won’t call it amazing. However, here’s something that will knock your socks off – right-click one of your Web Sites and select View Stream Logs in Output Window. Then, launch your Web Site and perform some operations. You can see your application tracing information in the output window – live! And you can also download the log files by clicking on download button (indicated by the arrow in the following screenshot). In my case the tracing information is in Chinese because I’ve been working on a couple of localization scenarios  - but you get the idea!

image_thumb22

More Diagnostics Support & Others

The log streaming feature is very cool indeed, but that’s not all the diagnostics support the team has put into this release. In this part of the article I’ll walk through you a small web site to experience other diagnostic features as well as some other improvements in this version of SDK.

  1. In Visual Studio 2012, create a new ASP.NET MVC4 Web Project  (using Internet Application template).
  2. Before we publish the site, let’s modify the HomeController to trace each of the actions. For instance, add this line to Index() method (you need to resolve namespace for Trace ):
    Trace.TraceInformation("Landed on home page");
  3. In solution explorer, right-click on the web site project and select “Publish…”.
  4. Click “Import…” to import publish profile. Hmm… now there pops a Import Publish Profile dialog,  which allows you either to import a Web Site publish profile as before, or to import the profile from an existing site:
    image
  5. After you’ve imported the profile, follow the wizard to finish publishing.
  6. Now refresh the Server Explorer, you should see your web site listed. Right-click on the site and select View Streaming Logs in Output Window from the popup menu.
  7. Navigate to different pages, and you’ll see your traced information appended to output window. The following shows in session I had with my test site. You can see the log messages, as well as inactivity reports before I stopped the streaming.
    image
  8. Right-click on the site and click View Settings in popup menu.
  9. In the Configuration view, you can configure most of your web site settings here, and you can click on Full Web Site Settings to open Windows Azure Management Portal and directly land on the setting page of the site. You can see you can easily turn on and off web server logging, detailed error messages, as well as failed request tracing here. Our application log is current set to save to local file system with log level set to Information. You can also save your logs into your Windows Azure storage account. We’ll see how to do it next.
    image
  10. Go to Logs tab. Click on Configure Logging link. This brings you to the management portal.
  11. Change APPLICATION LOGGING (STORAGE) to ON (I also changed LOGGING LEVEL to Information in this case). If you see this option disabled, that means you don’t have a storage account linked to this site yet. Go to LINKED RESOURCES tab and link to a storage account of your choice.
    image
  12. Click manage connection button. Click on Synchronize primary key button and storage key is synced over – isn’t that sweet?
    image
  13. Save your changes.
  14. Navigate through pages. And refresh the Logs tab to see latest trace entries:
    image
0

Add a comment

When we learn classic compute algorithms, we don't start with learning how a computer is built. We don't start with how a transistor works or how to build integrated circuits. Instead, we go straight with the abstraction - bits, commands, programs and such. I think we should take the same approach when we learn quantum computing. Instead of trying to understand the bizarre quantum world, we should take some quantum behaviors granted and go straight with higher-level abstracts such as qubits and quantum gates. And once we grasp these basic concepts, we should go even a level higher to use a high-level language like Q# and focus on how quantum algorithms work, and how we can apply quantum algorithms on practical problems.

Bono is an open source quantum algorithm visualizer I'm building in the open. This project is inspired by a few existing systems such as QuirkIBM Q Experience, and the Programming Quantum Computers book. Bono is a Javascript-based visualizer that features:

  • Drag-and-drop quantum circuit editing.
  • Dynamic circuit evaluation.
  • Works offline in a browser. No server is needed.
  •  Generates Q# code.
I've also created a YouTube channel dedicated to quantum algorithms. My goal is to create an easily digestable course for regular software developers to learn about quantum computing without needing to understand any underlying quantum physics. 

Bono is at its infancy. And I'm still a new student in the quantum world. I intentionally develop both Bono and the video series in the open. I hope the early results can inspire collaborations so that we can explore the quantum computing world together.

Last but not least, you can find more Q# related contents at the Q# Advent Calendar 2019.
0

Add a comment

Series
存档
Loading
Dynamic Views theme. Powered by Blogger. Report Abuse.