Someone else agrees with me that getting rid of ACID is a bad idea. Enter “NewSQL”.
Friday, 8 July 2011
Tuesday, 7 June 2011
Microsoft Web Platform Installer
I have to admit at being very sceptical about the Microsoft Web Platform Installer, thinking it was just for noobs. Recently, I was nudged down the path of using it (to get the Windows Azure Tools) and I have to say it works very well. Rather than fishing around for various installers, you just pick what you want from the lists (see below) and the Web Platform Installer will go away and install everything for you. There’s no need to mess around downloading MSIs yourself.
The Web Platform Installer offers a comprehensive list of developer frameworks, servers and tools. In addition, it offers various products such as DotNetNuke, WordPress, Umbraco CMS, ScrewTurn Wiki, N2 CMS etc.
The Web Platform Installer has a tiny footprint too.
Great stuff.
Monday, 6 June 2011
Using the cloud to crack passwords?
There’s been much talk recently of using the processing power of the cloud, perhaps Amazon EC2 spot instances, to crack passwords.
Why bother? A cheap local GPU will do the job.
| Password | Time to crack | |
| CPU | GPU | |
| fjR8n | 24 seconds | <1 second |
| pYDbL6 | 1 hour 30 minutes | 4 seconds |
| fh0GH5h | ~4 days | 17 minutes 30 seconds |
Seven character passwords are pretty common. Mixing upper case letters and numbers doesn’t really help.
Friday, 3 June 2011
Windows 8
The world changes. Here’s the best analysis I’ve read.
“…So if you're running an existing PC hardware or software company, ask yourself how a new competitor could use the platform transition to challenge your current products. Here's a sobering thought to keep you awake tonight: the odds are that the challengers will win. The company most at risk from this change is the largest vendor of Windows apps, Microsoft itself. Microsoft Office must be completely rethought for the new paradigm. You have about 18 months, guys. Good luck.
By the way, web companies are also at risk. Your web apps are designed for a browser-centric, mouse-driven user experience. What happens to your app when the browser melts into the OS, and the UI is driven by touch? If you think this change doesn't affect you, I have an old copy of WordStar that you can play with. Google and Facebook, I am talking to you.
If you're running a hardware company, how will you need to change your devices to take advantage of the new OS? Shipping a device that isn't Windows 8 ready will soon be as risky as shipping a PC in 1993 that couldn't connect a mouse. (Unfortunately, because Windows 8 is so far out, I don't know if Microsoft has even fully defined the hardware spec for a Windows 8 PC. The OS cries out for a flat panel screen that docks, so you can use it on your lap or as a monitor. Microsoft has a lot of work to do, and the PC vendors will face a lot of uncertainty.)…”
http://mobileopportunity.blogspot.com/2011/06/windows-8-beginning-of-end-of-windows.html
Update:
Some people aren’t happy. Get a grip.
Sunday, 20 March 2011
SQL Server Service Broker simple example
I had a reason to use SQL Server Service Broker (SSSB) again recently. It’s a queuing mechanism built into SQL Server (from SQL Server 2005). It’s a great solution for providing messaging integration patterns with legacy databases.
It’s been a while since I used it and getting it working is a bit tricky the first time (or when you’ve forgotten the details). A very simple example to set-up SSSB is as follows:
CREATE DATABASE [YourDatabase]
GOUSE [YourDatabase]
GOALTER DATABASE [YourDatabase] SET ENABLE_BROKER WITH ROLLBACK IMMEDIATE;
CREATE MESSAGE TYPE [YourMessage] VALIDATION = WELL_FORMED_XML;
CREATE CONTRACT [YourMessageContract] ([YourMessage] SENT BY ANY );
CREATE QUEUE [dbo].[YourMessageSendingQueue] WITH STATUS=ON, RETENTION=OFF;
CREATE QUEUE [dbo].[YourMessageReceivingQueue] WITH STATUS=ON, RETENTION=OFF;
CREATE SERVICE [YourMessageSendingService] ON QUEUE [dbo].[YourMessageSendingQueue]([YourMessageContract]);
CREATE SERVICE [YourMessageReceivingService] ON QUEUE [dbo].[YourMessageReceivingQueue]([YourMessageContract]);
DECLARE @Message xml
SET @Message= '<MyMessage>blah</MyMessage>'
DECLARE @handle uniqueidentifier
BEGIN DIALOG CONVERSATION @handle
FROM SERVICE YourMessageSendingService
TO SERVICE 'YourMessageReceivingService'
ON CONTRACT YourMessageContract
WITH ENCRYPTION = OFF;
SEND ON CONVERSATION @handle MESSAGE TYPE YourMessage (@Message)
END CONVERSATION @handle WITH CLEANUP;RECEIVE TOP (1) CAST([message_body] AS XML)
FROM YourMessageReceivingQueue;USE master
GODROP DATABASE [YourDatabase]
GO
Notes:
- The “SET ENABLE_BROKER” is called with “ROLLBACK IMMEDIATE” because of this.
- The validation on the Message Type is “WELL_FORMED_XML” which does as described. If you want schema validation you can do but it gets complicated.
- You can use encryption but then you need to create and manage Master Keys.
- For communication between SQL Server instances, you need to create Routes.
Wednesday, 16 March 2011
Changing the collation on an existing SQL Server 2008 instance
If you have a SQL Server 2008 installation and wish to change the collation, you can run the following:
setup.exe /ACTION=REBUILDDATABASE /QUIET /INSTANCENAME=MSSQLSERVER /SQLSYSADMINACCOUNTS=MyDomain\MyAccount /SQLCOLLATION=SomeCollation
Where “MSSQLSERVER” is the default instance name (you can change this to a named instance) and the rest of the parameters are fairly self explanatory.
Note that user databases will not be updated, only the system databases (Master etc).
To update any user databases you need to:
- Export all data from user databases using something like the BCP utility.
- Drop all user databases
- Update collation using above command
- Create user databases
- Import the data that you exported
Note that a back-up and restore of user databases does not work. In that scenario you simply restore the previous collation. You need to create an entirely new database and import the data.
Thursday, 10 February 2011
Vendors
[Vendor representative],
I knew at the start of this process you were unlikely to change your implementation soon, certainly not within timescales which we could take advantage of for our delivery. However, I strongly disagree with your comments around SOAP Faults.
Your current implementation makes it difficult for consumers to work with your API and creates significant additional work to deal with error conditions returned from the API. When your service returns a response and I have to interrogate that response to find out if the request was successful, this is extra work for me. Were your service to return SOAP Faults, I can do something like the following (this is code from an internally developed web service at [my employer]):
try
{
FindResponse findResponse = userService.Find(findRequest);
Session["LoggedInUser"] = findResponse.User;
}
catch (FaultException<UserNotFoundFault>)
{
// rather than quit just return the user being unknown
User user = new User();
user.Fullname = "Unknown User";
this.Session["LoggedInUser"] = user;
}
You can see that I am able to deal with the SOAP Fault returned from the User Service using normal exception handling. In this particular use case, the application does not care that the user is not found and can continue. Other consumers of the User Service may choose to act differently, maybe the user not being found is a problem for other consumers and they can act accordingly.
Where I have to examine the response from a service to see if it was successful or not (as in the case of the [vendor] services) I have to start examining response objects rather than using exception handling. This is unnatural and prone to bugs. This creates unnecessary work for me as a consumer of your service (extra development, extra testing).
Using SOAP Faults, I can also deal with different error conditions easily:
try
{
// Call some service
}
catch (FaultExcpetion<BusinessErrorA>)
{
// Do some corrective action
}
catch (FaultExcpetion<BusinessErrorB>)
{
// Do some other corrective action
}
catch (FaultExcpetion<BusinessErrorC>)
{
// Do something else
}
I have no such options with your service and I have to jump through hoops to look at the response object to find out what happened.
The problem is compounded further when using BPM/integration/messaging platforms like BizTalk. In BizTalk there are standard Orchestration steps/tasks to deal with exceptions. However, the lack of SOAP Faults in your service means there are no exceptions so I have to devise a custom solution to see if there was an error in the response object. Again, this creates yet more work for me the consumer of your service.
Furthermore, the error messages you provide are simply serialised exceptions, many of them are not helpful. We have seen your service return a “Null Reference Exception” which simply says “Object reference not set to an instance of an object”. As the consumer of your service, what am I supposed to do with that information? What remedial action can I take? I don’t know because I have no way to know what went wrong. Looking at the User Service example above I know what errors to expect (the SOAP Faults in the service contract) so I know what the business logic should be for the consumer. Even when your service might return a helpful error message, I have no way of knowing I will get it without the trial and error of calling your service to find out. Again, this is more work for me.
I’ll re-iterate my previous comments that as per the SOAP specification, errors should be returned as SOAP Faults (http://www.w3.org/TR/soap12-part1/#soapfault).
It may be more effort for you to provide SOAP Faults in your service contract but as the publisher of a service it is your responsibility to do so. As a consumer your service, who is paying for the product, I expect you to do so. Yes, SOAP Faults mean you have a standard set of error messages. If you are unable to provide these because you do not know all of your error conditions, as a publisher of a service, you have bigger problems. This also links back to creating a lot of work for the consumer of your services. If you do not publish the list of error conditions, that does not mean error conditions do not exist, it means your consumers have to find them by trial and error.
You have shifted the cost of maintaining a set of SOAP Faults from yourself to the consumer who must come up with a custom way to find out if there is an error, work out the fault conditions by trial and error and guess at what remedial actions might be. This creates a lot of extra development and testing for consumers. As a consumer of your service, who is paying for it, I am less than happy with this.
I strongly suggest you reconsider your position for future releases of your product.
Regards,
Callum
Tuesday, 25 January 2011
Configuring TFS 2010 with SharePoint 2010
Some link juice for this guy: http://blog.hinshelwood.com/archive/2010/05/03/integrate-sharepoint-2010-with-team-foundation-server-2010.aspx
His instructions worked perfectly, no gotchas encountered.
Not sure I like what Microsoft has done with Team Build in TFS2010 though.
Wednesday, 12 January 2011
The size of Amazon’s cloud
According to a recent article from The Economist, it is estimated that Amazon are adding 90,000 virtual machines to their cloud every day.
That is a staggering number and (as the article notes) suggests that Amazon’s cloud is a bigger business than previously though.
The second cool thing in the article is the description of how the estimate was made. The “serial numbers” of the virtual machines were decrypted allowing for an accurate estimate to be made (I assume the serial number contains some sort of incrementing number). As is also noted in the article, this technique was similar to how the allies estimated the number of German tanks in existence in World War 2. This information was required to determine the feasibility of the Normandy landings – too many tanks would have made the landings a no-go. Relying on remorseless German efficiency and process, the allies used the serial numbers of captured German tanks to guess how many of them were being produced per month. The allies estimated 256, German records discovered later showed it to be 255.
Thursday, 2 December 2010
Windows Server 2008 as a workstation (Part 5)
Following on from my previous posts…
Windows Server 2008 runs pretty well on a laptop, even the 64 bit version - providing the vendor supplies the drivers. Even if they don’t, the Windows 7 or Windows Vista drivers usually work okay.
If you have the 64-bit version of Windows Server 2008 you then have the option of installing the Hyper-V Role (Hyper-V is 64-bit only).
However, after installing the Hyper-V Role you loose the ability for your laptop to hibernate. This is a bit of pain.