Showing posts with label azure. Show all posts
Showing posts with label azure. Show all posts

Friday, December 12, 2008

Azure Invitiation code still not received :(

Come on - it's been well over a month now....

Really not impressed.

I've got two websites written and ready to upload to Azure.

I've played with the local SDK ad nauseum...

I really really really want to get my hands on the real deal.

But still no sign of the invitation code from Microsoft... and even when I do get the code I know it will only limit me to one website at a time...

Really not impressed.

Wednesday, November 26, 2008

While working on Azure - some ASP.NET stuff covered

So my ASP is a little rusty...

But working on my first Azure website - www.stacka.com - has helped me oil out quite a bit of rustiness.

Among the items covered (so far):
  • General ASP.NET structure - including master pages, pages, server controls, validation, viewstate, code behind, sending emails, using web.config, writing custom HTTPModules ...
  • Some specific ASP.NET nasties:
    • IIS7 integration - spent far too long working out why my HTTPModule wasn't being called in IIS7 - how was I to know all my web.config examples were IIS6 ones?
    • URL rewriting - this MSDN article was especially useful as was Scott Gu's blog - the post back issue took me a day to code around... but eventually it was solved using 2 url rewrites - the first in BeginRequest, the second in PostMapRequestHandler
    • AJAX general things - including some basic tutorials on things like UpdatePanels from asp.net
    • Using the AJAX Control Toolkit - kudos to all who've contributed to this excellent set of tools.
    • Integrating Google Custom Search - really this should have been easy - but a clash of forms meant some very odd errors appeared in my application (bizarrely I was seeing both Ajax and normal submit buttons work in Firefox, but break in IE) - eventually on the way to solving this using Scott Mitchell's notes on dotnetslackers.
    • CSS integration - really, I've given up on this - it's just too hard integrating CSS and using things like the Login control... I'll try again later (maybe I'll use ASP.Net MVC and then I'll not use the standard login code?)
    • Adding email verification to an ASP.Net user registration - easy - see this link on aspcode.net.
  • Some specific Azure issues/challenges:
    • How to live in a data store without JOINs
    • How to keep data consistent without Transactions
    • How to effectively use Partition and Row Keys as data lookup mechanisms
    • How to implement aggregate methods (counts and averages) in the Azure Table storage
    • What to do when optimistic locking is too optimistic (still working on this one!)
    • How to put larger tasks on background threads (worker roles)
    • Some bug fixes in the supplied samples for (for example) TableStorageMembershipProvider - really these samples are a godsend - I'm so glad that Microsoft supplied these!
Will post more details when I get my full invitation token from Microsoft - at that stage hopefully I will be able to upload my webapp and show it off a little...

Thursday, November 20, 2008

Azure data challenges

My first app on azure - stacka - is progressing quite well.

However, I keep hitting problems... especially when I try to do things which are very simple and straightforward if I was working with conventional SQL database - but they often prove somewhat more tricky in the distributed Azure storage.

Here's an example.

For stacka, I've got a StackTable structure - within this each StackRow is indexed by:
  • PartitionKey - userid
  • RowKey - a creation tickcount based number - similar to that used by smarx in his ongoing blogger worked example
My thinking behind this was that the partitioning would make it easy to search by user (which is a common task to do) which the row key would ensure that results were returned in time order.

However.... what I hadn't understood was that the sort order returned by the azure table storage is not rowkey - but rather is the tuple (partitionkey, rowkey) with normal lexicographical (alphabetical) ordering defined.

And (unlike in SQL) what I can't now do is reorder the stacks easily in the query - i.e. I cannot simple add a global "" to the query

So....... now I'm looking at:
  • possibly rewriting this indexing, so that the Stacks are not stored with any preference for userid, but so that time based returning is still preserved. This will make it quicker to get the most recent N entities - but will make it slower to get all Stacks associated with one particular user.
  • possibly adding an additional (manually maintained) table which stores the most recent StackRows with a time based ordering. Because this table doesn't need to store everything - just the top N entities - it doesn't need to be particularly large.
There are definitely some interesting patterns that will arise while coding with Azure....