Tuesday, June 18, 2013

Web Services with SOAP and REST

Almost every problem in computer science can be solved by sending large amounts of XML across the network. These solutions are called Web services. Nobody has solved Pi to the Nth place yet this way, but experts insist it can be done!

One reason Web services are so popular is that many organizations allow traffic only on HTTP port 80 or HTTPS port 443, so protocols were developed to send and receive data over these ports. SOAP and REST are two common ways to encapsulate XML data.


SOAP (simple object access protocol) is an envelope protocol on top of a transport protocol for sending and receiving data. It can run over email using SMTP but usually runs over HTTP or HTTPS. The XML interchange formats are defined by a WSDL (Web services definition language), which is often generated by a toolkit from a high-level language.

SOAP was designed in 1988 by people working at Microsoft, among others, and remains critical for the .NET framework. Visual Studio .NET is Microsoft's toolkit for use with many languages including C#. Other toolkits include Axis and JAX-WS for Java, and gSOAP for C++.


REST (representational state transfer) is called a software architecture style, but it can be considered another protocol on top of HTTP or HTTPS for sending and receiving XML data. Simpler than SOAP, it uses only the get, put, post, patch, and delete methods. Sometimes REST sends JSON (JavaScript object notation) instead of XML.

REST was defined in a 2000 dissertation by Roy Fielding, and developed into a working system by a W3C group along with HTTP 1.1. Yahoo picked REST for many of their Web services.

Each REST interface assigned a URL, with GET and POST (or PUT) interfaces near each other. Generally POST modifies data, while PUT creates data. Programming languages can be mixed in a REST implementation. Java, Python, and Perl might be most frequently used.

The Chrome and Firefox browsers offer add-ons to examine a REST API, which can be very helpful during development.

REST versus SOAP

Many commentators prefer REST because it is simpler and lighter weight than SOAP, but SOAP has other advantages.

SOAP offers asynchronous processing, so it is suitable for long-running operations especially when reliability is a concern. SOAP requires a formal agreement between two sides (server and client) so stability by version is guaranteed.  SOAP also allows stateful context for functions that build on previous contexts

REST is a stateless, which has advantages for atomicity, consistency, and durability. REST makes good use of limited bandwidth and compute resources.


SOAP is a complicated and highly functional protocol that is heavily used in enterprise datacenters. REST is a simpler but highly functional protocol that is often preferred for agile development.

Tuesday, October 23, 2012

Chromebook vs iPad vs Surface

On the way to rivers it would be great to have an Internet device to check flows. A laptop seems like overkill, so I have been looking at tablets and pseudo tablets. Chromebook seems irresistable. Here's a table of specs:

Chromebook Surface RT iPad 3
$249 $599 $505
11.6" 1366x768 10.6" 1366x768 9.7" 2048x1536
touchpad-only touchscreen touchscreen
weight 1100 g weight 680 g weight 680 g
17.5 mm thick 9.3 mm thick 5.7 mm thick
battery 6.5 hrs battery 8 hrs battery 10 hrs
2GB memory 2GB memory 1GB memory
16GB SSD 32GB SSD 16,32,64 GB
USB 3, 2, SD USB 2, microSD Apple-dock
mic/headset headset jack headset jack
1.5W speakers ?? speakers one speaker
HDMI HD video out Apple-dock
keyboard $100 touchcover external option
802.11 abg/n 802.11 abg/n 202.11 abg/n
webcam 720p 2 webcams 720p webcam 1080p
no geolocate accelerometer accelerometer
Google apps Office demo Apple store

Saturday, July 31, 2010

Arches Non-National Monument

Along Deer Creek in Ishi Wilderness, California.

Thursday, April 22, 2010

REI, Premier Tent Supplier

It seemed unlikely when I was young, but now it seems like REI designs the best tents. This season their Quarter Dome and Half Dome are available in Plus versions for tall people like me. Also new is a redesigned Cirque ASL (all season light) based on the original Quarter Dome with crossed poles in sleeves, instead of failure-prone hubs. Rather than mesh, you get a fabric tent body for warmth, and a short pole to prop up the roof vents, all for around 5 pounds. There must be something wrong with this tent, but I can't figure out what.

Friday, January 15, 2010

Great Day on the Arroyo

The weekend before Christmas it rained enough to bring up the Arroyo Seco, so we headed there instead of the shopping malls. It was the usual great day on the Arroyo. Chris and Richard elected to co-paddle a tandem AIRE Outfitter, and it was fascinating watching them maneuver to avoid the many rocks that are exposed at these low flows. The Outfitter-2 is a big boat! It makes this drop look smaller than it is.

The Spanish must have been smokin' something when they named this creek, which has water all year: just a trickle in late summer, but debris in the tree branches attested to the monster flood that had occurred about a week before our trip.
More pictures here.

Thursday, December 31, 2009

Tarps Tarps Tarps

With weather gradually warming after the winter solstice, it might be time to think about getting out of your tent and under a lightweight tarp. The cheapest alternative is the (usually blue colored) plastic sheet with grommets, available from hardware stores everywhere. These are actually not bad. They are waterproof and lightweight when dry. Three drawbacks are lack of durability, long drying cycles, and radically increased weight when wet.

Silnylon (silicone-impregnated polyamide) is a more expensive alternative. These tarps are lighter and quieter in the wind than urethane-covered nylon, but they take longer to dry in the sun, and suffer UV damage almost as easily. All types of nylon stretch after pitching, especially in the rain, so you need to tighten them up in the middle of the night. Suppliers say silnylon is self healing, although a general quality decline has led to "misting," in other words, they might not really be waterproof. Old-fashioned urethane-coated nylon is costly nowadays, but silnylon tarps are probably not worth the price premium if you can find coated nylon tarps in a surplus store. Better would be urethane-coated polyester, which weighs more than nylon, a reasonable trade-off for less stretchiness and greater UV resistance.

One recent development is Cuben fiber, made from Spectra or Dyneema (same thing), a polyethylene fiber with molecules directionalized for extra strength. This is half the weight of silnylon, currently at four times the cost. Another recent development is Spinnaker Ultralight, a thin polyester fiber woven ripstop-style then silicone impregnated. With more reasonable cost, this is probably the best choice now for ultralight tarps.

For interesting background reading about high-tech fabrics, see this page at Mountain Laurel Designs.

Tuesday, December 8, 2009

Best Traction on the River

Recently I started wearing new Chaco sandals with Pro Vibram soles, because my old Chaco sandals with 5.10 Dot soles wore out. Chaco no longer offers the 5.10 Dot soles, pictured above. The Pro Vibram traction is not as good. It is fine on dry rock, but not as good on wet rock, and nowhere near as good on algae-covered rock. Felt soles are great on wet and algae-covered rock, but not good as 5.10 Dot soles for general purpose hiking. After many years of being able to rely on sure footing with 5.10 Dots, I really miss them. When the time comes to resole my Chacos, I will try to buy the soles as a repair kit from fiveten.com and glue them on myself.