ubervu
Apple iPhone
Nexus One
+ Add

This year I was able to present at Code Camp! In my mind, Code Camp is meant to be an event where you try and to whacky things with code. So I decided to explore what the possibilities were of using Windows Azure to create Artificial life in the cloud. I ended up focusing more on the possibilities of farming out the work of calculating genetic algorithms to find optimal paths for the travelling salesman
problem.
The first section gives a background on cloud computing and Windows Azure. If you are interested in an overview of Azure i recommend you watch my Remix presentation on Windows Azure instead, as I did it after this talk and had a chance to refine that section further.
The talk went well, unfortunately the video capture software I was using was eating up one of my cores on my dual core laptop which meant the calculations ran slower than they should have. I apologise for the audio quality also, I didn’t have the drivers for my laptop microphone so ended up having to use my mobile phone to record the audio.
I hope you enjoy my talk!
Artificial life in the cloud, using Windows Azure on Vimeo.
The slides are also available 20090405 Codecamp – Alife in the cloud.pptx
Timeline for the talk
0:00 – An overview of Windows Azure
22:30 – Programming with Azure
23:00 – Demo 1 (Hello World with ASP.Net)
32:20 – Azure Storage
35:00 – Architecting your solutions for Azure
46:30 – Introduction to Genetic Algorithms
53:00 – The travelling salesman problem
1:01:00 – Learnings from trying to convert a single threaded library into a distributed Azure environment
1:03:00 – Future work that could be done with A-Life
Burela
...
See all content
Hide content
4 months, 1 week ago on
Wordpress in davidburela.wordpress.com
*Update* I have posted some further analysis of the new Azure instance sizes in a new post – Analysis of windows azure virtual machine sizes
With more details on Windows Azure to be announced next week at PDC, Microsoft have released the latest version of the Azure tools & SDK in preparation. There are a few things we can learn from them.
http://blogs.msdn.com/cloud/archive/2009/11/12/windows-azure-tools-and-sdk-v1-0-november-2009-release
.aspx
As this has been marked as version 1.0 of the SDK, I think we can safely assume that this release of the tools can be seen as “Feature complete”, especially with Azure to be officially released soon. So although we may not see any tool refreshes in the coming months, there is sure to be newer version of the tools for the upcoming versions of VS2010
There are some interesting update notes that jump out at me
“The sample storage client has been replaced by a new production quality library” – This is great to see as most people use this as production code anyway, despite Microsoft trying to say “it is an example of how you may do it yourself”
“Service Model UI: A redesigned and significantly more complete interface for manipulating Role configuration information. To access, double-click on a role node in the Solution Explorer” – This feature is quite nice, we don’t need to manually edit the .cscfg file, we have a nice UI to change it instead.
“Ability to choose the size of the VM for a role instance” – Microsoft has previously stated that we will eventually have “more control” of the VM instances, but this sounds interesting. You can find about these VM sizes at this url http://msdn.microsoft.com/en-us/library/ee814754.aspx. They differ in CPU counts and RAM. Perhaps there is some new pricing to be announced at PDC based around this?
But this is what I have been hanging out for! “Service Runtime library updated to support inter-role communication and notification of configuration changes” – I have a bunch of research ideas that required this feature. Queues are great for structured sequential data and is the way you should be processing data between instances. But for things like network rendering you really needed this feature.
Burelaimage
...
See all content
Hide content
4 months, 1 week ago on
Wordpress in davidburela.wordpress.com
*Update* Microsoft have updated their FAQ with instance pricing
In my previous post on the newly released Azure SDK I touched on the ability to set a size for your VM instance.
Lets delve down into what size virtual machines are available (values from http://msdn.microsoft.com/en-us/library/ee814754.aspx)
VM Size
CPU Cores
Memory
Disk space for
local storage
Small
1
1.7 GB
250 GB
Medium
2
3.5 GB
500 GB
Large
4
7 GB
1,000 GB
Extra Large
8
15 GB
2,000 GB
The sizes are easy to follow, they are all just multiples of the base VM size. Microsoft have said in their FAQ that the pricing is based on multiples of the small VM size. It is based on “CPU cores / hour”, so $0.12 per hour for the small VM, $0.24 for medium, $0.48 for large, etc.
Lets draw up a matrix to compare the Microsoft Azure and Amazon EC2 pricing side by side:
Azure
Amazon EC2
CPU cores
Memory
Platform
OS
cost / hour
"Compute units"
Memory
Platform
OS
cost / hour
1
1.7 GB
64 Bit
Windows Server 2008 R2
$0.12
1
1.7 GB
32 Bit
Windows Server 2003
$0.12
2
3.5 GB
64 Bit
Windows Server 2008 R2
$0.24
N/A
N/A
N/A
N/A
N/A
4
7 GB
64 Bit
Windows Server 2008 R2
$0.48
4
7.5 GB
64 Bit
Windows Server 2003
$0.48
8
15 GB
64 Bit
Windows Server 2008 R2
$0.96
8
15 GB
64 Bit
Windows Server 2003
$0.96
(Values taken from http://msdn.microsoft.com/en-us/library/ee814754.aspx and http://aws.amazon.com/ec2/instance-types/ )
The Azure and EC2 packages are roughly equivalent to each other and the “CPU” speeds are roughly the same (Azure: 1.5-1.7GHz, EC2: 1.0-1.2GHz Xeon). Where they still do differ though is Amazon is still only offering Windows Server 2003, and the low end instance is only 32bit compared.
Conclusion
From a .Net developer’s perspective I see Azure winning here. For the same price I can get Windows server 2008 R2 over a 2003 instance, which gives me IIS7. If you are developing cutting edge .Net code (like ASP.Net MVC), IIS7 is going to be a lot easier to work with than IIS6. Of course if you need to control more in your instance then Amazon is going to offer you that over Azure.
Footnote: Amazon does have a few more instance types available that offer higher CPU processing or increased memory. Here I have just used the basic instance types for easier comparison.
Burela
...
See all content
Hide content
4 months ago on
Wordpress in davidburela.wordpress.com
Day1 is on Azure and backend services
Day2 is on client side, Win7, IE9 and Silverlight
The keynote can be downloaded from http://microsoftpdc.com/Sessions/KEY01
Highlights of today
Windows Azure can now have apache, tomcat and others installed
You can have full control of your instances, install what you want on it, then set that as your new baseline
to deploy apps to
App fabric is a new add-on for Windows Server. Lets you deploy applications to your servers easier. Also lets you easily deploy to either on premise or Azure
Dallas CTP announce. Is a way of exposing your data feeds in an easily discoverable and consumable way http://www.microsoft.com/windowsazure/dallas/
Ray ozzie walks on stage
Ray ozzie talks about how Microsoft has been talking about Software + services for the last 4 years, last year they announced Azure.
Goes on about how everything we have is "connected", PC’s, devices, etc.
They want to go towards "seamless multi screen experiences, their "3 screens & a cloud" strategy
The 3 screens are: Mobile, PC and your TV
Today we will hear more about the backend stuff. The services, azure, etc.
Tomorrow, we will hear more about front end stuff.
Software on their "3 screens and a cloud"
In tools, they have visual studio for devs. And expression studio for web
For the "3 screens"(mobile, pc, TC), they have IE + Silverlight.
Silverlight "compliments" javascript by creating highly responsive web controls
Because silverlight is .net it is the premier runtime to develop all of this software
Guy who wrote the seesmic twitter application comes on stage
Talks about how they subscribe to the "3 screens and a cloud" concept. You should be able to get your data from wherever.
They decided to write a version of seesmic using silverlight.
He is showing it using the Silverlight OOB (Out of box) experience.
They are releasing the new version today. *Edit* I installed the windows desktop version, and it is a slow non-silverlight app. Don’t know what happened here
He is saying it is very fast on Silverlight, and showing the scroll speed, etc. It does seem smoother than the bit of jerking i get when i scroll in the Adobe air version.
New features, you can click drag users between groups.
They want seesmic to be THE twitter platform. You can now create plugins for it that do lots of things. Auto tweet people, ask Mr. Tweet for more info about a person, etc.
Ray ozzie comes back
Says that tomorrow Scott Guthrie will talk about IE9. Sinofsky is talking about Silverlight 4
Starts giving the Azure marketing pitch. Made it powerful enough to scale due to all of their backend, yet familiar enough for current visual studio developers to pick it up.
The live stream glitches, then he comes back and is saying how Systems centre allows for seamless control of private clouds, etc.
Azure goes live January 1st. For all of Jan it will be free, will start charging Feb 1st.
New features that are "going live today" in Azure:
You now have single sign on for Azure portal, Sql Azure
They offer multiple sized VMs now (see my blog post)
They now support much more complex service architecture (multiple worker roles, web roles)
Support for FastCGI (PHP)
Java running on top of Tomcat
The Azure CDN datacentres are coming online
Azures datacentres are built using the "modular container" design. So they can just quickly scale up datacentres. Photos of the Azure container are at http://allyourclouds.stackexchange.com/questions/5/what-do-cloud-computing-data-centers-look-like/7#7
New storage type: Azure xdrive are Azure storage blobs that are accessible using NTFS
SQL Azure It isn’t just sql server that is in VMs that are turned on.
It is a "True database as a service"
You can simply create a new database when you need it.
Don’t need to think about memory, don’t need to worry about replication, data recovery.
It works unmodified against Excel, .net. Is just a connection string.
Although Azure goes into production on Jan, they have allowed a few companies to go into production today. One of them is wordpress!
Founder of wordpress comes on stage
One of his devs at wordpress rang him and said "hey wordpress now supports PHP, mysql, sqlserver"
He logs onto the Azure portal and shows how he has an instance running apache. He only has 1 at the moment, says "what if we get slashdotted? Easy we just scale it up from here"
Says how the 2 most popular wordpress blogs are a "political one" and ICANHAZCHEEZBURGER
ICANHAZCHEEZBURGER guy comes on stage
Shows how he runs ICANHAZCHEEZBURGER, failblog, etc.
They don’t know what is going to be popular, they have MASSIVE spikes in users due to a picture suddenly becoming popular.
They really need a way to quickly scale up and down. They don’t want to have to pay during the quiet times.
Announcing a new website www.Oddlyspecific.com
They are using SQL Azure as the backend, and SQL storage for the blobs.
They have a plugin for wordpress which lets you use the Windows Azure storage platform
Means users now have more storage AND it is served over the Azure CDN!
Ray Ozzie comes back on stage
"having reliable to high scale elastic computer utility is really important"
during the windows Azure CTP, many people asked "how can I use Azure to help build my business?"
Announcing "Microsoft pinpoint"
http://www.pinpoint.com/en-US/Dallas
People wanted an easier way to find things that have already been built so that they can take advantage of it. Here you can search for solutions that already exist, experts, data feeds.
Pinpoint is integrated into the Azure portal
The most powerful place to be if you are trying to bring your services to IT pros
Online catalogues and marketplaces are useful
Announcing CTP of "Dallas" which Ray "believes to be game changing"
http://blogs.msdn.com/dallas/default.aspx
Uniform discovery way of finding data, of uniformly joining it.
Enables an open catalog and marketplace of data.
Believes it will bring in a whole new wave of "remixing"
David campbell comes on stage
Dallas lowers the barrier to finding, exploring and consuming data
Pinpoint is the place where you will find dallas data feeds.
Some are public data sources, some are commercial.
There may be ratings and reviews from people about the data
He logs in and shows how he has subscribed to 2 data feeds, one from NASA and infoUSA
Shows the full list of citysearch.com, US government
Clicks into the InfoUSA datafeed.
The data has already been described, so he can see the parameters he can put into the webform to query it (zip code, etc).
Can see the feed in Atom Pub
Clicks "analyse" and it opens up excel so he can start twisting the data.
Opens NASA feed
He can search for image scientific information, or just get the single image.
He clicks one button, and it generates a C# partial class so he can just consume it right in code!
Has a blank WPF application, he click drags a listbox on, pastes in a codesnippet to consume the data.
Shows an demo app that someone else had already written.
Is a WPF app that consumes the NASA feed and displays all the images, slideshow. Show the images using old school red/green 3D. Tells the crowd to put their 3D glasses on.
This is just a demo of what you could do if data was this easy to explore, discover and consume
Ray comes back on stage and starts a live feed with Washington DC government
Decide to democratise data
They announced health data, and encouraged everyone to use it and lots of innovation happened.
The military did the same thing, and now we have super cheap GPS. It is a great example of what can happen when data is made public.
They need to look out of the 4 walls of government and look for innovation.
http://beamartian.jpl.nasa.gov/welcome
They started off with 47 datasets. Now they have over 100,000 released datasets. Of environment hazards, of flight paths.
This data is part of the Data.gov platform
Showing an iPhone app called "career finder", shows all the government jobs available near you. App was created in only a few days
He made sure to call it a "mobile device" and not iPhone
They have a bucketload of datacentres now. The CIOs are now focused on serving up new data.
For the 1st time now, they can now focus on "service delivery" instead of worrying about infrastructure.
Live interview stops, back to Ray
When thinking of client, bet on Windows 7
When thinking of the backend, bet on Windows Azure
Think of how Pinpoint and Dallas are going to change the world with just the volume of new consumable data.
Weave together public domain data with your own data to create cool things
Shows a small vidclip.
Has "the cloud" talking about his identity crisis. He has been called a private cloud, a public cloud, he is so confused.
"YOU ARE CLOUD, embrace who you are" "embrace who you are".
WTF this is stupid.
Bob muglia comes on stage (president of server & tools)
The cloud is more than just about infrastructure
It is also about an application model. That is what he is going to talk about.
There is a lot of consistency about how they are talking about the cloud
As attributes "scale and elastic"
As things it provides "software, app platform, services"
Talks about how Bing created a controller called "auto pilot" to run all of their computers in their data centre. Automatically brought up servers to replace dead PCs
What they did was good, but it was very specific, it wasn’t generalised enough to use on their other services. It was kind of a precursor to Azure.
*blah blah, the cloud is good, lets us have resources that work together. Can have ways to deploy, etc. Recaps the cloud for 5mins* Not just me, lots of people online saying "WTF is he actually talking about"
Mentions now how we can describe architecture of a cloud app which you can use to model it. Model driven approach is better.
*waffles on for another few mins*
"take steps to make your application always on, instead of down for maintenance times"
Don Box comes on stage
Last year we showed you Azure
Since then people have said that they want to use Azure to write PHP code, Java, C++
Brings up C++ in visual studio
They are going to write a CGI app, grab the query string and process it.
They are going to use pointers all over the place.
So when they hit the web app, they are going to show the 4 bytes before the query string.
Points out how there is a bug, so he puts in an asm push and pop command
They have a 2nd project, an Azure cloud project, so they are pushing it up into Azure now
Goes into the portal and publishes the Azure app ready
Moves to SQL Azure
Last year they accessed SQL Azure using REST.
Feedback was "yeah REST is great…. But we are used to connection strings and transactions and T-Sql"
They create a new SQL Azure database, now they are going to use SQL Server management studio to connect to it.
They open it up, and start executing T-SQL against it.
creates a table, starts a transaction, pastes in all the rows to insert, ends transaction
Hits execute and it immediately runs against the cloud
Last year talked about Access control Service
Enterprise grade authorisation
Feedback was "we like that… But we want something more lightweight so we can use in web pages, etc"
Worked with google, etc. To come up with a way to do it.
They use http://en.wikipedia.org/wiki/OAuth
Try to hit the data from javascript. Nope can’t get in because they aren’t authrorised.
So in javascript, they request a token, and can then get into it.
Kelly blue book comes on stage
They have 2 data centres, try to get one data centre serving all the customers, so they have a 2nd failover data centre.
They were paying lots for servers they didn’t need… So *surprise* they moved it to Azure to reduce costs since they can elastically scale up and down.
Their data goes through ETL’s and other processes, they can still use the exact same process with SQL Azure
Demoing SQL Azure Data Sync.
They can keep their on premise SQL server and the Azure one in sync. Using Azure as a backup for spikes
They have taken the time down to provision a new server down from 6 weeks to 6mins with Azure
Back to just Bob mulgia, he shows a demo reel
Dominos pizza, they have a MASSIVE spike during superbowls which is expensive to provision for.
Seiemens talking about hybrid clouds. Their on premise data centre combined with offloading to Azure
Back to bob. (1Hour, 30mins)
Access Control System is an important way of saying who has access to your services.
Sometimes you want low level access.
Announcing "project Sydney", available next year
Allows you to connect your existing apps running on your servers with Windows Azure.
Demo of it with one of their apps
They have a charity promotion called "give" which is a charity auction.
Showing it running in the IT datacentre at Microsoft (even if his URL says localhost….)
From Azure, they try to tell it to connect to his SQL server that is running on premises.
He uses the Windows Azure connectivity Agent (project Sydney) to allow "the cloud" to connect to their on premise SQL server.
Now Azure can scale and do all the compute while connecting to their existing data.
New windows Azure virtual machine role
Select windws server base image
Customised virtual machine role
Snapshot virtual machine image
Deploy app and target your new VM role
So you can preload Apache on it or whatever you want.
You can remote desktop onto it to configure it.
Announcing Windows "app fabric" (I THINK this is dublin)
Allows you to create highly scalable flexible app platform.
Built on IIS, WCF, workflow, etc. Data caching
Is an add-in for windows server
You can zip up your application, so it can be passed to your IT admins and they can publish it straight into staging. Could also send to your internet hosts and get them to deploy it. Sounds like an easier way to deploy ASP.Net applications
Windows Azure will use it, will allow for the ease of deployment between Azure and your on premise data centres.
Explanation from Mary Jo Foley: The AppFabric technology combines hosting and caching technologies (formerly known as Microsoft code-named "Dublin" and Microsoft code-named "Velocity") with the Windows Azure platform AppFabric Service Bus and AppFabric Access Control (formerly referred to as .NET Services).
New person on stage demonstrating new features in Visual studio 2010
Demoing new Visual studio 2010 features.
He runs the application, does a few things then closes it.
It shows the call trace of his app so he can see how it works (then he drags the tab to his 2nd monitor and ppl go crazy)
Showing windows federated identity. (Geneva)
AD now has an STS provider in it.
Shows how to get your app to run with authentication by just right click your solution in visual studio and using the wizard (just like adding a WCF reference)
Says his app is running slower than it should be, hitting the DB too much? So he clicks "break all" and intellisense comes up.
Filters just to show the calls to ADO.Net, then he can drill down and see where the calls were made.
Douglas purdy (Data modeling group) comes on stage (2 hours)
Opens up visual studio and an exisiting ASP.Net MVC app, windows identity services
Is going to migrate it to Azure using "models"
In VS he Creates -> New project -> application model project
Shows a blank workspace with a toolbox.
Can see "the web role", "the worker role", "the database" + more in the toolbox
To deploy the application he is going to drag out 3 roles onto the workspace
-Web role
-App fabric
-And database
Then drags the projects on top of the icons he has there for web role, database.
Can say how many instances of each he wants
He wants to just push it out into the cloud now.
Right click, "publish to test environment"
They are shredding it into oslo data modeling (which has been renamed to SQL server data modeling?)
Windows identity services is now just working, still hitting the on premise Active Directory.
Right click, generates app package.
Bundles it up into a single package. Myproject.app on the desktop
So to push it out into production, he opens up powershell
He can run "deploy-application myproject.app https://myserver -whatif"
The whatif will show what will change if he does the deployment. How many instances of each thing.
Shows Microsoft operations manager, shows it connected to Windows Azure
Can see a diagram of the application that was put into SQL server data modeling inside of operations manager. Can see the load in each of the servers for each of those roles in the diagram
They can see that the server in Azure is overloaded, so they tell it to scale up from 2 to 4 from inside Operations manager.
They expand that web role for the ASP.net app, they can see the 2 existing servers and the 2 that are spinning up.
Bob back on stage
Says "see, this is why i was talking about the importance of modelling".
talks about how all of this is in the new server / services stack.
Keynote closes
Burelaclip_image001clip_image002clip_image003clip_image004clip_image005
...
See all content
Hide content
4 months ago on
Wordpress in davidburela.wordpress.com
Highlights
Scott Gu Rickrolls the entire PDC audience
Silverlight 4 beta is out now!
Silverlight can now access local resources on your computer like cameras, filesystem, drag/drop support
Silverlight has updated WCF support
IE9 is announced
Work on IE9 has been going on for 3-4 weeks. Performance and Acid3 results are improving
There
will be videos on http://channel9.msdn.com/
Steve sinofsky comes on stage
Says win7 has been out for a few weeks now, it has been really humbling.
Will discuss what they learnt from Win7
Some people were saying "just fix these few things", but they knew it wasn’t just about solving problem
Their windows 7 blog was useful, there were over 6,000 comments and 10,000 emails with suggestions.
A MASSIVE part of Win7 development was how to handle just the sheer volume suggestions.
The telemetry they built into win7 helped heaps. The hardware reliability, which bits were slow or fast, was the installation of new drivers successful?
The telemetry is like a "black box recorder" of your computer
80% of customers voluntarily opt in to the telemetry feedback.
When applications crash, they send the memory dump via watson back to Microsoft to help sort out issuse.
They showed the "We Share your Pain" video the video where they shock the programmer that wrote the piece of code that is annoying you
They had ~1,730,000 feedback reports sent back.
~91,500 uniqe external devices plugged in
14,000 unique PRINTERS plugged in
46,000,000 times that areo shake and snap were used
55% of people were using 1024×768 as the screen resolution
Talks about UAC, shows a video about it (that we can’t see via streaming due to Intellectual Property issues)
Goes back to him, he says "and when we are trying out other new features like aero snap, we do the usability testing like this" and it cuts to another video that we aren’t allowed to view.
Developing for Windows 7, what are the opportunities?
HD audio/video, new sensors, jump lists
Mike comes up on stage to talk about "new things in the ecosystem" (34 mins)
Shows an eeepc, says it came out 2 years ago. Customers were really interested in the concept.
Netbooks are now the fastest growing category of computers now
Showing a gaming PC that is liquid cooled. Showing off DirectX11
Showing a demo of 10,000 particles doing things, but it is all hardware accelerated. No CPU processing time, it is all being done on the GPU.
http://www.nvidia.com/object/directcompute.html
Showing a "Server replacement laptop". Corei7 raid5 drives, running hyperv with 3 virtual machines.
The ribbon UI feature is built into Win7 so you can use in your apps. Works well with touch
Showing how firefox supports taskbar preview, google chrome supports jump lists (he comments how he changed the default start page to to bing)
Back to just sinofsky (45 mins)
When they were building win7, they wanted to know what is it like to build a new piece of hardware? Trying to understand the flow
They decided to build their own laptop from scratch to test it out. Made a tablet pc with all the cool specs, to see how it all hangs together.
Took them about 3months to put it all together.
They announce it as the "windows 7 PDC laptop", they are giving one to each of the attendees
Internet explorer (48 mins)
I want to talk about four things, show you where we are heading.
They learnt about "responsible engineering, trustworthy experience, real world interop, innovate technologies.
One of the most talked about and liked features is around privacy and trustworthiness
Said that they made a lot of advances around incorporating web standards…
Want to continue to make sure that IE is the best featured web browser on windows.
They are working on IE9.
Standards. Admit that they need to do more around Acid3 test. Want to "be responsible" when looking at new things like HTML5
Talking about the "ACID score", in IE8 they were at 20/100, in IE9 today they are at 32/100
(in comparison, FF is at 70+ and opera is at 100)
Show graphs that there is a lot of work that goes into getting a page on your screen, different sites spend different amout of time in the subsystems (scripts, rendering, etc.)
Show a graph of performance. IE6 was far away. IE8 was still much slower than FF, chrome, etc.
IE9 now is at about the same speed as all the other browsers now.
And these are early builds of IE9 , they have only just started work on IE9 engine for 3-5 weeks
The text rending engine will take advantage of all the clear text technologies, makes it clearer than just straight GDI in IE today
Showing a demo of bing maps. Using GDI rendering they were getting ~13fps. They made the rendering engine now hardware accelerated (as in the screen rendering) and it sped up heaps.
No roadmap for IE9 yet
There will be videos on Channl9 today on IE9
Scott Guthrie comes on stage to talk about Silverlight (1:03)
In silverlight 3 then enabled hardware accelerated video rendering
They shipped blend 3 with sketchflow
Shows a video about rapid prototyping with sketchflow
A bunch of sites have used steaming (mostly sporting websites) in HD
Lots of big name companies are using it to create scientific apps, line of business apps.
Last year they were at 33% penetration, today there are on 45% of internet connected desktops.
Announcing Silverlight 4
Focusing on 3 things
Media
Business apps
Beyond the browser
Can access webcam & microphone now
Supporting DRM now… For some reason that feature didn’t get any applause
Demoing the new webcam stuff.
Can apply pixel shaders over the webcam feed. All the usual distortion effects. They are super fast!
Scott Gu took a random photo and then updated his twitter profile pic as it.
You can get the raw feed of the webcam feed, so they show barcode reading. He scans a copy of the barcode of his ASP.Net MVC book, then it looked it up on Amazon.
Demoing smooth streaming
Demoing other video effects, you can do slow motion, and a few others
Announcing Silverlight media (pack?) that you can use to do those effects
Smooth steaming is available on browsers that don’t have plugins (like iPhone), they enable HTTP streaming and they pick it up
http://www.iis.net/iphone
New Silverlight4 features
Programmatic printing support
Clipboard access
Right click
Mouse wheel
Implicit styling
Drag/drop files into silverlight
Bidi & RightToLeft text
Can host HTML as a control inside your app
Commanding and MVVM!
Shows an app that has English test, arabic, japanese.
Can right click in the app to bring up a context menu.
Copies the text
Pastes in a datagrid control from excel into the silverlight textbox
He drags a word doc from the desktop onto the silverlight app, the app put all the text from the document into the textbox.
He clicks print and the print dialog comes up.
Shows a Silverlight app that has a HTML control, so he has his app with bing.com in a control.
Because it is still a normal control, you can do all the normal crazy things you can do with controls, he makes the control go all about the place, he makes the bing page split up into a jigsaw puzzle and the pieces scatter around the screen.
All the usual plugins work
So he brings up youtube.com and rickrolls everyone
While the video is playing, he makes it into a puzzle again, the video is still playing in all the scattered pieces
Share assemblies across SL & .net 4.0!!!!
Data binding improvements
UDP multicast support
Peer to peer networking.
REST enhancements
WCF improvements (different streaming, up to 400% faster)
WCF RIA services
VS2010 support
WYSIWYG desigin
XAML intellisense improvements
Databinding enhancements
WCF RIA services integration
Scott Hanselman comes on stage to demo how do develop in it (1:30)
His demo is here http://jeffhandley.com/archive/2009/11/18/contososales.aspx
Buliding a RIA services silverlight app inside VS2010
He is using an EDMX data model
Data model has many Stores have many Contacts (so has a join table)
Creates a new Contact Service
All the WCF methods are returning Iqueryable
New xaml page
The data sources window shows his service
He drags it onto his silverlight window and it auto creates a datagrid and binds it.
The Datasources window works as usual, can see all the fields, can set the control type, drag out. Can make them a ListBox
He is using implicit styling so the ListBoxes look good by default.
He can right click controls and tell them to dock fill
He clicks his control, in the properties window there is a new "styles browser"
Dragging on data pagers
The service is saying that one of the data properties is a URL, so scott changes the control to image, drags it onto the page.
Camel case intellisense support (like resharper)
Brings up the data model, shows annotations. Can now enforce rules on the data which are client side and server side validated automatically (like age must be >18)
Rep from Snapflow comes on stage (1:38)
Wants people to be able to create applications without "writing a line of code"
Well actually no, this is a "business logic" mapper.
Workflow foundation on steroids?
Yep it isn’t anywhere near as sophisticated as he claims it is, just a silverlight based workflow creator.
Just scott on stage (1:42)
New Silverlight 4 Out Of Browser features
Windowing APIs
Notification popups
HTML support
Drop target
You can say that this application MUST run in elevated mode, if the user grants it then you get
Custom window chrome
Can access local file system
Cross site network
Keyboard in full screen mode
Hardware device access
COM automation support
If you had office installed, you could now query outlook for your calendar from silverlight
Access the Win7 sensor information
Silverlight 4 is twice as fast
30% faster startup
New profiling support! I’m looking forward to this one
Brial Goldfarb on stage (1:47)
Showing a Silverlight 4 trusted application for accessing Facebook
So he has a custom chrome
Can programmatically move the window around the screen because of this, can make it go into "mini mode"
He uses COM automation, brings in his outlook calendar into silverlight.
Reads his friends feeds, can see the embedded videos in his feeds, can play the youtube vids in his app.
Wants to upload new photos, so he drag and drops a bunch of photos on, he can see them in silverlight and starts tagging them
Takes a photo, plugs the camera in. The app pops up a notification that camera was plugged in, and brings in the new photo.
Will be shipped as a reference sample
Just scott (1:56)
You can vote on the next silverlight features using their website.
When is silverlight4 coming out?
Beta: SL4 beta is now available for download
Final release: first half 2010
Burela
...
See all content
Hide content
4 months ago on
Wordpress in davidburela.wordpress.com
I would like to announce the launch of a new Cloud Computing community website!
www.AllYourClouds.com
This is a new community website which focuses on having the answers for all your clouds.
Got a question about Amazon EC2, Azure, Google app engine, Go-grid, rackspace, etc? Need to know how to modify your code? Wondering how to migrate?
Just post the question and
someone in the community will answer it for you.
The best part about it, is that the site uses OpenID, so there is no need to sign up. Just click to log in with your existing credentials (Google, wordpress, blogger, etc. etc.)
BurelaLogo
...
See all content
Hide content
4 months ago on
Wordpress in davidburela.wordpress.com
When deploying your Silverlight application out to your customers, there are a number of points that could become bottlenecks. Looking at it at a high level there are 3 main ones
Getting your files to the client (.xap + other media)
Processing requests
Retrieving data
Lets tackle these in order
Getting your files to the client
Having the client
download your application can become the first problem you encounter. If the user is sitting there, watching a loading screen for 5 minutes, they will most likely just move onto another site. Your application can be split up into the .net code, and the supporting files (.jpgs, etc.)
For this we can use ‘Windows Azure Storage’ + the ‘Content Delivery Network’ (CDN) to help us push the bits to the end user. An official overview and how to set it up can be seen on the Azure CDN website. But to sum it up, you can put your .xap files and your supporting files onto Azure storage, then enable CDN on your account. Azure CDN will then push the files out to servers around the world (currently 18 locations). When a users requests the files, they will download it from the closest server reducing download times.
The loading time of your application can be further reduced by cutting your application up into modules. This way instead of downloading a 10mb .xap file, the end user can just quickly download the 100k core application, meanwhile the rest of the modules can be loaded using MEF, Prisim or something similar. These other modules can also be put onto the Azure CDN (they are just additional .xaps after all!). Brendan Forster has a quick overview on what MEF is. But there are plenty of tutorials out there on how to integrate MEF into Silverlight.
Processing requests / Retrieving data
Most Silverlight applications will require information from somewhere to operate, it could be the current stock prices, an employee record or the weather forecast. This is the ‘backend’ of your Silverlight application. Azure can help you to scale your backend through its computational scaling. A simple way to do this is by exposing your backend services as a WCF or WCF RIA service. These are stateless services which make them very simple to scale!
Once you have create your service, put it into a web role. From there you can tell Azure to scale the number of instances up and down based on the usage of your application.
Retrieving data
Your service is going to need to store the data somewhere. Azure storage tables are one option, but for this example it is easiest to use SQL Azure. SQL Azure ‘acts’ pretty much like standard SQL Server 2008, except the server is being hosted in Microsoft’s data centres. Once you have created the database on their server, all you need to do is paste the connection string into your code. That is it, just a connection string. This means now we can use LinqToSql directly onto SQL Azure. All of your standard code will still work how you would expect it to.
Summing up
Putting these 2 technologies is fairly simple. Depending on your application architecture you can use any and all of these solutions offered here to create an application. In fact we could create an entire scalablee service in about 10minutes.
Create the DB
Create the LinqToSql entities using the SQL Azure connection string
Create a ‘WCF RIA Services’ domain service, allow it to auto generate the code.
Your entire backend is done
Hook Silverlight into your service
Burelaimageimageimage
...
See all content
Hide content
1 month, 2 weeks ago on
Wordpress in davidburela.wordpress.com
In my previous article i explained how you can distribute server side processing on Azure to scale the backend of your Silverlight applications. But what if we did a 180 could use Silverlight to distribute work out to clients instead?
The idea
For years people have been running applications on their home computers to help the greater good. They use the ‘spare CPU cycles’ of your computer
to brute force an algorithm. Popular examples include:
Seti@home (help process signals from space to search for extraterrestrial life)
Folding@Home (help run calculations to figure out how protiens fold, to aid in dieses Alzheimer’s, ALS, Huntington’s, Parkinson’s disease, and many Cancers)
Distributed.net (for fun try to crack encryption algorithms)
An issue with these applications is the need for a user to install the software onto their home computers. With the increasing worries over trojans, viruses + system administrators locking down PCs it can be difficult to install these applications. So what if we used Silverlight to assist in this?
The theory
Writing algorithms that can run on a users PC is made easier due to Silverlight running .Net code, it is part of the reason it’s uptake amongst developers has been so strong. This makes it easy for us to port the calculations across that would have previously been done using a desktop client, or on a server.
Once the algorithms have been written distributing the client out to users is the easy part, this is what Silverlight is designed to do!
The server can host the assemblies that contain all the different algorithms, the Silverlight client is able load these up using MEF to load them dynamically. From there clients can request chunks of data that need to be processed. Once the the calculations have been made, the Silverlight clients send the results back to the server where all of the results are collected.
Using Silverlight also gives access to isolated storage, meaning clients can store temporary data during processing, or allow a client to continue a 2 hour processing chunk if they accidently close the browser window.
What are the benefits?
The main benefit here is that the end user doesn’t need to install anything on their computer to help out. If someone wants to help the search for aliens all they need to do is point their browser to the site, leave it open for a while and they will assist.
The Silverlight deployment model makes it easy to push updates to the users. If a more efficient algorithm is created, or the users have solved the algorithm and we would now like to direct their efforts into another problem, it is very easy to just upload new components and tell MEF to load them.
Example
Here is a quick example I mocked up for Seti@Home.
For a user to help, they would just need to direct their browsers to http://seti-at-home.com/silverlight
The Silverlight client would load, MEF would immediately grab the processing module
The Silverlight client then requests a chunk of work from the Seti@Home servers
The Silverlight client processes the work. Saving to isolated storage as it goes and displaying the progress bar
Once the data has been processed, the Silverlight client sends the results back to the server and requests the next block of data
repeat steps 3-6
Final thoughts
This could be an easy way for users to help out important causes, while also simplifying the deployment and update process of the software. Here are some final pros and cons to this proposal
Pros
Easy deployment / easy for user to help out
You get all the power of the users pc
Easy ways to use .net parallel frameworks to further increase performance
Cons
Might be difficult to make the application only use idle CPU time. The application might take over the users PC and make the system start to slow down
This could be used for malicious purposes (more on that later post)
Burelaimageimage
...
See all content
Hide content
1 month, 2 weeks ago on
Wordpress in davidburela.wordpress.com
There isn’t much information available for creating Expression blend 3 addins. There is some information on creating blend 2 plugins, but the addin model has changed between versions.
Here I have given an overview of what is needed to setup your Visual studio environment, as well as sample code and a sample project to get you up and running.
Creating the addin
Create a new
Class library called BlendAddinDemo. Be sure that you set it to .net 3.5 and not .net 4.0
Reference Microsoft.Expression.Framework. This is located in the Blend application folder
Make your class implement Microsoft.Expression.Framework.IPackage
Implement the interface (add the Load and Unload methods)
Add a new text file to the project and call it BlendAddinDemo.Addin, this will be our addin’s manifest file.
add this line to the manifest file <AddIn AssemblyFile="BlendAddinDemo.dll" />
Change the BlendAddinDemo.Addin file to Copy if newer
Go to the project settings
Go to the debug tab and change the start action to “Start external application” and point it to blend.exe
Create a new subfolder in your blend application folder, call it “Addins”
go to the build tab, change the output directory of the project to the blend\Addins folder
Throw in a breakpoint in the load method if you want to verify that it is being loaded
Hit F5
That is it, you now have an addin that will be automatically loaded by blend. Visual studio will automatically attach the debugger to blend, so you can immediately start debugging your code.
Initialising your addin
There are actually 2 ways to load your addin. One is by getting blend to load it automatically from the /addins folder. Another way is to start blend from a shortcut or command prompt like so “blend.exe -addin:BlendAddinDemo.dll”
What you need to be aware of is blend will actually load your addin differently in these 2 scenarios. You will need to capture this and make sure your addin works in both scenarios
Blend auto loads addin from /addins folder: Blend will load the addin WHILE it is still starting up. This means that you won’t have access to the menu bars and things like this. You can get around this by adding an event handler to applicationService.WindowService.Initialized. Blend will call your callback and then you can continue initilising your application.
Addin is loaded from the command line “blend.exe –addin:BlendAddinDemo.dll”: Blend will fully start up and THEN load your addin. Your addin will immediately be able to access the menu bars and the application in general. But the application would have already have started. So if you just rely on the applicationService.WindowService.Initialized event, then you are out of luck as that event has long since fired…
At the moment i am using applicationService.WindowService.IsVisible to check if the app has initialised or not… it works in my tests so far, but might not work in all scenarios. Here is a quick code snippet of a sample addin to get you started.
Code Snippet
using System;
using System.Windows.Forms;
using Microsoft.Expression.Framework;
namespace BlendAddinDemo
{
public class DemoAddin : IPackage
{
private IApplicationService _applicationService;
public void Load(IApplicationService applicationService)
{
_applicationService = applicationService;
if (applicationService.WindowService.IsVisible)
InitializeAddin();
else
applicationService.WindowService.Initialized += WindowService_Initialized;
}
void WindowService_Initialized(object sender, EventArgs e)
{
InitializeAddin();
}
private void InitializeAddin()
{
//Set up your addin
MessageBox.Show(@"Demo by David Burela. Http:\\DavidBurela.wordpress.com");
}
public void Unload()
{
}
}
}
Final words
All of this is undocumented and i figured a lot of it out with the help of Jason Stangroome. There are no guarantees that Microsoft won’t change things in the future that will break this
I have also uploaded a sample project that you can download.
Burelaimage
...
See all content
Hide content
1 month, 2 weeks ago on
Wordpress in davidburela.wordpress.com
Follow us
FEEDBACKTwitterFacebook
DASHBOARD
PRO
MY KEYWORDS
PRO
ubervu
Apple iPhone
Nexus One
+ Add

TOOLS & WIDGETS

Amazon released a great “best practices” guide on how to architect for the cloud. It can be found at http://jineshvaria.s3.amazonaws.com/public/cloudbestpractices-jvaria.pdf
It covers off a lot of great information, some of the information is Amazon specific as you would expect, but a lot of it is generic enough to let you apply the thoughts to any cloud architecture.
Starts with the benefits of using the cloud (reduced up front cost, quicker provisioning of additional resources, etc.)
Explains why your application needs to be created in a way that you can scale the work out, not up
Explains the concept of elasticity
The concept of changing your thought process from “this one server doesn’t have enough RAM to handle all the users”, to thinking of the resources as abstract components for you to use
Expecting that servers will fail and to compensate for it
If you haven’t read it yet, i highly recommend that you do. ... See all content Hide content
1 week, 5 days ago on
Wordpress in davidburela.wordpress.com