Simon Fell > Its just code > January 2006

Monday, January 30, 2006

WS-FTP

WS-FTP, so many bad ideas in a single project, nice going !. Lets see, it sends chunks of a file over SOAP, it doesn't use any binary packaging scheme for this, so you take a 4/3 bandwidth / filesize hit (i.e. you spend at least 4Mb of bandwidth to send a 3Mb file). The chunking is done via multiple SOAP calls, so you're spending lots of round trips (remember, round trips are evil). All this to get a chunked upload, when in fact HTTP supports this out of the box, you can do this in a single HTTP call using PUT with chunked encoding (if you don't know the starting size). I guess you end up in this mess trying to paste over the holes in the .NET http client. No wonder Web Services have such a bad name.

You know its bad when I feel like I'm channeling Mark Baker!

< 8:48 PM PST # > tags : Web Services

Wednesday, January 04, 2006

Share and Enjoy

Sforce 7.0 aka Winter '06 goes live this weekend, the Whats new in Winter '06 outlines what's coming up, here's some of the things I think are interesting.

Improved Performance, requests hitting the 7.0 API are handled by a completely new SOAP stack, the new stack was written from the ground up purely to be Salesforces server side soap processor, its is extensible just enough to do its job and no more (many soap tools are extremely extensible, and it comes at a considerable cost), we concentrated hard on perf both response time and scalability. The open source soap stack that we used previously has particularly bad scalability issues, it uses a lot of memory to process a request, which leads to a high level of GC related load, and a reduced concurrency ability from transient out of memory exceptions. Reduced GC load is good for us, and improved response times are good for you, in some testing I did I saw response times (for the entire request not just the soap processing part) as much as 50% faster than the earlier stack. In addition creates / inserts and upsert calls for 7.0 by default will no longer update the application MRU, which can further increase write performance by upto 25%, this is a great win for back end integrations that don't run in the context of a end user of the application. (If you have an app that extends the Salesforce UI using the API, then you should send up the MruHeader in your request so that the MRU does get updated).

Upsert + External ID, there's so many uses for this its hard to know where to start. The External Id is a flag on custom fields, when you turn it on, we index that field (improved query performance for filtering on that field), in addition it now allows you to use the upsert call which uses that external Id as the key instead of the Salesforce Id. If you're syncing additional data sources with Salesforce, it makes that process much easier to handle. On additional use is to an external Id field as an operation identifier, SOAP over HTTP is not 100% reliable, if you make a create call and the response never makes it back to the client, its hard to work out if the data got created or not, by adding an operation Id custom field, you can make all your creates calls via the upsert call, simply assign a unique id (say a GUID) to the create you're trying to do and call upsert. If something goes wrong and the response is lost in transit, you can simply make the upsert call again, if the original insert never happened, then there won't be a row for that GUID and we'll do the insert, or if we did the original insert, the row will now be there, and we'll just update it. This can drastically simplify handling failure conditions.

Formula fields with results that are really HTML. You can do some cool things with Formula fields, including the HYPERLINK and IMAGE functions, but if you queried one of these from the API you'd get some weirdly formatted result that was neither HTML or plain text, and to make things worse, other than the formula flag in describe you didn't know if you were dealing with one of these weird fields or not. In 7.0 its all much cleaner, query calls for formulas that generate HTML will return the actual resulting html, and an additional flag in the describe results for that field will indicate that this particular field is returning html formatted values. This makes doing the right thing WRT to html encoding and handling scripting injection when re-presenting data via a web page much easier.

There's a ton of other new stuff, check out the tech note and start thinking about switching to 7.0

Now, if you're making that switch to 7.0 here's a few things that might trip you up, be cafeful!

All these changes and additions are purely for Sforce 7.0, if you have a previous API client written against an earlier Sforce version, it should continue to function as it does today.

< 8:57 PM PST # > tags : Salesforce.com [playing DJ KENTARO - No Mind (The Zen Experience) (from ON THE WHEELS OF Solid Steel)]

Monday, January 02, 2006

Santa's Santos

I was good this year and Santa brought me a Bodum Santos, a vacuum pot coffee brewer, we set it up and tried it out yesterday, its a very cool contraption, its just fascinating to watch it push the water up into the top pot, mix with the grinds, brew the coffee, then have the brewed coffee drop back into the bottom pot, with all the grinds left in the top. It does this purely with a mechanical spring and vapor pressure, not a single electrical gizmo in sight, great to watch in action and quite the contrast to the high tech espresso machine I normally use. The resulting coffee had a very clean & crisp taste, vastly better than the more popular drip coffee results, and given the nature of it I was very surprised that there were practically no grinds left in the brewed coffee.

If you normally drink drip and are looking for something that’s both better and a little different, check them out. Sweet Marias has a range of vac pots available, the Cona ones look realy nice.

Mark Prince (the geek in coffeegeek.com) wrote a great vac pot faq if you want to know more.

< 5:40 PM PST # > [playing DJ KENTARO - King's Lyn (from ON THE WHEELS OF Solid Steel)]