Mix:UK 07: Building next generation web applications using Windows Live Services

Integrate different applications together. End users will go and download the messenger client and interact with the messenger service though that tool. Our idea is to open that service to empower developers. They'll benefit from our scale, user base and services.

There's a break down in the live platform: Rich media expriences. Silverlight well push it and stream it for you. Storing and sharing, we have messenger, all your contacts is a shared infrastructure across all our services. If you have a blog and use spaces, it goes there. We also have photo sharing. Automated agents with AI on messenger. Alert infrastructure, we send million of them at 9am and they'll turn up instantly on messenger and a few minutes later by sms.

Live.com, search, maps is the Find and Locate.

And what we announced last year at mix was to say we'd have one set of use for everyone. As a developer, a company, you read these TOCs let you use everything for free, within a cap.

Dynamics Live, Office Live, XBOX Live exist too but they're not tightly integrated, so they're not handled by us and we don't look at them.

Silverlight streaming. It's on microsoft infrastructure, and it's free. You take your application, your video, the application in its whole, like the Scrum board, and uploaded on our infrastructure where we'll manage the storage, the distribution, the backup of it, you don't need to pick up the bill for streaming it. When we go from alpha to beta, you'll be able to stream a million minutes a month for free, and above that we'll figure out a way to solve that issue.

How to use it? If you 're a developer, you go to http://silverlight.live.com with your windows live ID, it'll give you an account and you get your 4GB bucket for all your code. Once you have the application and signed up, you can upload through the web interface, which is more for a one off. If you do this a lot, user generated content, thousand of files, you can use a REST (some would say HiREST), with PUT/POST/GET/DELETE. It gets distributed to our CDN and you don't have to worry about it. Someone in China will get in a local cache for fast access over there.

How do you fetch information from there? For the Halo3 Service, all the videos come from Silverlight straming. When a user browse to http://halo3.msn.com they get all the html and javascript from that server. But you can either do a javascript or an IFRAME integration. The browser will then call our Silverlight CDN and pull down everything from there. Or you can just decide to pull down the videos, and keep the flexibility to keep your application and use our servers for the video.

Three steps, Creating, Uploading and Consuming.

Demo

Opening Expression Encoder. Was released in final version last week on the web. If youre running Vista there's three default videos, import them in Encoder, decide the encode rate, but what we want is look at the output. We choose a template. There's one small window called Publish thats an add-on to Encoder that we'll see in a bit.

We encode the video, the template gets outputed in the output directory. This encoding will take a short time, 10 seconds microsoft time.

Question: Why Microsoft gives this for free? It's a big bill, but we're saying upload your content, at a later time when you go over your limit we'll exchange more bandwith with ads. We don't know yet. The long part of the tail, the free bits, are paid for by the top of the tale, the ones that pay for it.

I got all my rendering done in my otput directory, and there's a few files i want to delete, silverlight, csproj and htm files that are used to be opening in Blend, delete them as they're not needed on the sliverlight CDN. I'll go to http://dev.live.com which should be your favourite web site. It's got SDK, samples, RSS, etc. One of the tasks is creating apps with the encoder, which gives you a full tutorial for it.

You need to create a manifest file which is an xml file. Its a silverlight 1.0 application, you can also upload 1.1. You decide which js files and which functions are called. You right click it and zip the manifest and add all the other files. Make sure you zip them at the root of the zip file or the content won't get uploaded.

You can go to the silverlight web, and you can manage all your applications from there. You can from there upload the zip file you created, choose a name and upload.

We only allow you to upload 30meg chuncks. The video portion needs to be less than 22MB. If you go over 12 minutes of content, you go over the MPEG limits, break your license.

You can launch the test application page from there and will load the content from agappdom which is the silverlight CDN network. We can do up to a terabyte per second of bandwidth for video streaming.

That was the slow way, let's look at the quick way. I have a web service in a solution within visual studio 2008 and i'm going to debug it to show what is going on. There's a couple of webmethods. One is UploadFiles. You pass the file from the test page, give a title and click Invoke. The code in the demo sets the URL to the address for the account id (http://silverlight.services.live.com/accountid), pass the data as a POST which returns an OK response. And it's been uploaded programmatically automatically.

So how do we fetch this data programmatically? We call a GetVideos method. Same URL, call a GET. One thing we're lacking a way of capturing additional metadata, for example GeoCode. You can do it manually by escaping data and uploading fake names. The web service can then return this data after decoding it. From the web service data, we get the address for the IFRAME we can put on our application. You can also get the IFRAME address manually.

Question: How did you add these extra attributes? I encoded the data and Base64 encoded them and put them as filenames. It's a hack and we'll hope to fix up.

Question: What happens if you use all your minutes for bandwidth time? It won't disconnect you, we haven't locked it down yet. Someone will shoot you an email telling you you're popular and wanting to help you more popular.

Virtual Earth is used a lot in the UK. There's a lot of aspects to it. The user experience is from http://local.live.com you can get maps, or see my street on birds eye view, or New York on 3D. They have not much to do with development. What we do is manage all the data, 14 petabytes of data, for our service. A while ago we opened it up for developers to leverage. You can use the mappoint service you have a SOAP api. You can embed a map with a javascript control. If you want to do tricky stuff like overlaying things then you can use things like Map Cruncher.

Demo of Virtual Earth.

From http://dev.live.com, you have cookbooks containing examples, that show the example, source code, references from msdn and interesting links. It shows the javascript code to show based on Longitude / Latitude, which you can get easily by lookig at the URL when you're browsing the live maps.

In this demo it's all javascript so no code behind. There's a reference to the javascript map control, and we call the GetMap, Load the Map, set the zoom level except you can't look up, we don't have that yet. We have a map showing up, its all running off the live code.

We want to push the video we saw earlier onto this map, and we do that with a pushpin. How do we do that? Back to the virtual earth SDK. There's a tool to add custom shapes, you can look at the code, and see the javascript to do that. Copy and go back to the code, we add the pushpin, add an icon, change the style, add a description. Then we call the javascript code to pull the videos. What we do is add the ScriptMethod and AJAX extensions to call that web service.

In action, there's now 3 pushpins on the map. In the Virtual Earth SDK you can add HTML content to the pushpin which lets you show HTML data whenever you click on the pushpin.

You can also switch to bird eye view or hybrid view, the pushpin is still there.

SportsDo shows a bird eye view of the trajectory of a run above a map. The thing works to where people were swimming, and in bird view you can follow their trajectory!

Another is skiing in Les Arcs, in 2d View you have a pushpin of a geo coded picture. If you switch to 3d mode. The 3d is an ActiveX control, so you can choose high ef or low def experience.

Looking in 3d you can see the contour of the mountain, and you can sin the demo around and the track followed by the skiers is still there. There was no programming changes done at all.

If you have an xbox controller, you can plug it into your PC, it will control your 3d view.

Switching to hubrid mode you can see the textures on top of the geometry of the mountain.

Last one is booking a tour of Toronto. Pictures on a Windows phone, everything gets uploaded and geo-coded. In building view you can zoom in and see the pictures overlayed on the map in 3d view of the buildings. As the track followed gets animated, the icon is automatically put behind the buildings which lets you follow where he was going. I encourage you to have a play on our site. We thnk it's a great example of what can be done with 3D.

Windows Live is opening. People have their worlds in Hotmail, Messenger, etc. If you;re doing any silverlight development, deploy it on Silverlight streaming. With one click of a button from encoder you can publish immediately. On Virtual Earth, you code once in javascript.

We have another session covering everything else on Wednesday at 12:15, covering Messenger, and some pre-release things.

Question:

What is the 700kbs limit? If you load 5 files from your domain you'd get 5 times the bandwidth. What we enforce is the average. We've capped to test how good we push on the server.

How much does it cost for Virtual Earth license for a company? I don't know come see me and leave me your email. Mappoint is another technology, which is a sister of VirtualEarth you may have to choose between the two.

Is it possible to host asp.net services on silverlight streaming? No it's about silverlight content only. You'll still have a web host for a rich asp.net experience, we only provide the silverlight answer. 3 million map tiles for free, above that there's a charge, we can put you in contact with people. There are commercial terms on search, 750k queries for free even for commercial terms.

The 22MB limit, is it going to change over time? Although it's streaming, are you doing http download of the videos? First, 22MB is a temporary which will be changed over a time limit, as long as it stays under 10 minutes limit. We'll be able to offer commercial terms, but there's MPEG royalties involved. The streaming, it's only Http.

What about live video? We don't support live video, but we offer the Windows Media Services as part of Windows Server.

On the Virtual Earth API, it looks different from maps.live.com? No answer. There's nothing different from the demo.

You mentioned an IFRAME part, where do you get the IFRAME URL from? It's in the SDK and it's released so you should be able to get it through there. It's appID and accountID.

Is there a Silverlight compatible api for VirtualEarth? Right now it's not possible, someone may be working on that. An aspect of that is that silverlight 1.1 can call out on javascript, so you can reach to the javascript code from silverlight 1.1 .net code.

Is there any plan for windows live access to receive and send live messenger? From a server point of view, we bought a company which are Windows Live Agents with an SDK ported from Java to .net to program bots against the Messenger platform. We're running an alpha and search for Windows Live Agents you'll find it. There's a lot of things that will be included in the future with contact lists.

Technorati Tags: , ,

Ads

Comment