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

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

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.

Summary

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.

Wednesday, November 11, 2009

River Rookie Romps, 4-0


For more pictures, see this CA Creeks page about the South Fork American.

My friend Chris borrowed a kayak for his friend Matt, a rookie. We wanted to do the Pillsbury run of the Eel, but it was only 140 cfs, so we went to the South Fork American with scheduled release of 1400 cfs Saturday and Sunday 9:00-12:00. We camped about 1/3 way down the river and planned to run the lower 2/3 on Saturday, which starts off easy, and the upper 1/3 on Sunday. Matt had paddled a canoe back east, class 1-2, but had never held a double-bladed paddle. He quickly decided he preferred feathered to straight. In one of the first class 2 rapids, he ran over a rock, but the boat did not flip. Gradually he was gaining control and placement. Chris gave lessons, and seems to have a knack for kayak instruction.

Despite a 10:30 start, we kept getting ahead of the water, so we stopped early for an long lunch. The fall colors were beautiful, with yellow cottonwood trees and red poison oak bushes. The increased flow passed us, so we pushed off again. However by the time we got to the class 3 rapids in the Gorge, we were ahead of the flow again. I had never seen Fowler's Rock so low. Lost Hat was rocky but straightforward. Then we got to Satan's Cesspool. Holy smokes that thing is steep at low flows! It is a >1 meter waterfalls in kind of a horse-shoe arrangement, a fun creekin' style drop. I suggested we wait for the water to come up and run it again. Seeing this rapid change from 300(?) to 1400 cfs in just several minutes was my personal highlight of the trip. Chris and Matt took conservative routes, but I went into the teeth of the hole and had a nice tailstand, or as a kayaker corrected me, "stern squirt." The rest of the Gorge was the usual fun, including all the rapids down to Salmon Falls bridge, usually covered by Folsom reservoir. When we took out at Skunk Hollow, there were a few minutes of sunlight left to dry our boats.

After a great dinner at the Sierra-Nevada House and a long night of sleep, we got ready for the Chili Bar run. Matt had no flips on his first day, but the upper rapids are more difficult. He ran Meatgrinder perfectly, hit the heart of the hole in First Threat, and kept going for the big stuff in the lower Threats. Impressive balance. Lots of rafters were on the river, which seemed odd, because on the lower run there were only kayakers. We decided to scout Troublemaker, within sight of our tents, and decided to run just left of Gunsight Rock, rather than finesse it by going right. Some friendly campers took pictures including this one of Matt hitting the line perfectly. Score 3 for the hard rapids, plus 1 for running Satan's twice, 0 for the river.

Friday, November 6, 2009

Drift Boat or Dory?

My friend Doug bought a drift boat or dory recently. He won't tell me which. Here he is lining it through the Rainie Falls fish-ladder. Dories are fast! On the Grand Canyon, the dories speed past the rafts, even if the rafters are rowing hard. Dories are good for fishing because it's relatively easy to row them against the current.

Monday, November 2, 2009

Same Lame Frame


On the aforementioned Verde river trip, Brian and I took this exact same shot. He did not post it in his writeup maybe because it is soooo ugly.

Wednesday, October 28, 2009

Drybags Within and Without


Speaking of river gear, “Tiger” has an interesting post about compression bags on his Pray-for-Rain blog. I'll have to try one. I've been using Outdoor Research HydroSeal pack sacks inside a drybag for double protection. Over the years I've settled on two types of drybags: the red Watershed Colorado zip duffle (if sealed properly it's the only one that keeps your stuff dry during a wrap) and the green SealLine Boundary Pack (it's the only one that has straps comfortable enough for a 3 mile pack-in).

Tuesday, October 27, 2009

Verde, Arizona's only Wild and Scenic


I'd like to give a shout to my friend Brian Vogt, who wrote a great trip report of our spring 2009 journey down the Verde river in Arizona. The water was that color, a pleasant change in the desert southwest. Brian did not include this picture, which I think epitomizes the Verde: beautiful wilderness scenery, mostly class 2 moving water, never boring. Brian's writeup is at his RiverLog Blog near the top.

Monday, October 26, 2009

Dehydrated Beer

REI does not sell dehydrated beer. This is why I hate shopping. You know what you want, you go into a store, and they don't have it. So I thought about the next best thing: dehydrated margaritas. Stores don't have that either. Amazon.com to the rescue! BarTender's makes a margarita mix that is OK when mixed with tequila. It's not as good as a real margarita, but when you're backpacking, it's a lot easier to carry.