Showing posts with label Computing. Show all posts
Showing posts with label Computing. Show all posts

Saturday, November 21, 2009

TIOBE Programming Community Index for November 2009

Check TIOBE index for 2009.

I guess this year C will be declared as programming language of the year. And with GO in league we know some dynamics will change by next year.

What I am interested to know what is driving PHP so strong. And between Python and Ruby, ruby is picking up.

Friday, October 26, 2007

Dave Winer on SOAP, REST and XML-RPC.

A good link http://www.kbcafe.com/rss/?guid=20060704042846

Note: Reproduced from site

SOAP Request

GET /stock HTTP/1.1
Host: www.kbcafe.com


<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
xmlns:m="http://www.kbcafe.com/stock">
<soap:Header>
<m:DeveloperKey>1234</t>
</soap:Header>
<soap:Body>

<m:GetStockPrice>
<m:StockName>HUMC</m:StockName>
</m:GetStockPrice>
</soap:Body>
</soap:Envelope>

The SOAP request tends to be overly verbose, but generally (not always) easy to understand. The SOAP envelope wraps an optional Header and the Body. The Body contains the actual XML request object. The Header contains information not required to service the request, but that help in some other way. A common use of the SOAP Header is the attachment of user credentials to the request. The beauty of SOAP is that it's not bound to the HTTP transport, although HTTP is by far the most commonly used transport for SOAP messages.



SOAP Response

HTTP/1.1 200 OK

<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
xmlns:m="http://www.kbcafe.com/stock">
<soap:Body>
<m:GetStockPriceResponse>
<m:Price>27.66</m:Price>

</m:GetStockPriceResponse>
</soap:Body>
</soap:Envelope>

The SOAP response, also slightly overly verbose, but easy to understand. Now, imagine getting this response and you want the m:Price element text. How would you formulate the XPath to acquire this bit of information? Very simple ("//m:Price/text()").


REST Request

GET /stock?StockName=HUMC HTTP/1.1
Host: www.kbcafe.com

The beauty of REST is that GET requests do not require a request package. In this case, the parameter data is simply passed as an HTTP request parameter. Of course, this simplicity comes with a price. You are now bound to the HTTP protocol. Although the argument has been made that the principles of REST are not bound to HTTP, nobody has ever documented that approach.


It's important I explain here that REST is primarily used to service GET requests. By GET, I mean REST requests using the HTTP GET verb. REST uses three other HTTP verbs POST, PUT and DELETE. GET is used to retrieve data, POST to create, PUT to edit and DELETE to ... umh... delete. The HTTP verb is another element that binds the REST protocol to HTTP.


REST Response

HTTP/1.1 200 OK


<?xml version="1.0"?>
<m:Price xmlns:m="http://www.kbcafe.com/stock">27.66</m:Price>

The REST response is often very similar to the contents of the SOAP request body. And it's very easy to express an XPath and retrieve the data ("//m:Price/text()"). Note the REST response is actually simpler than the SOAP Body. This is by convention. SOAP transactions typically contain an element named with the method name and the strings Request and Response appended. This is actually unnecessary, but does have one advantage. REST request typically embed the method name within the request URL, which again binds the protocol to HTTP, whereas embedding the method name within the package allows SOAP to exist over any protocol.


XML-RPC Request

POST /stock HTTP/1.1
Host: www.kbcafe.com

<?xml version="1.0"?>
<methodCall>
<methodName>stock.GetStockPrice</methodName>

<params>
<param>
<value><string>HUMC</string></value>
</param>
</params>

</methodCall>

The XML-RPC request is the most verbose of all the protocols. This verbosity is what makes XML-RPC both difficult to use and lacking in inter-op. For example, the <string> element is optional, so the <value> element could have been expressed as <value>HUMC</value>. Several MetaWeblogAPI (the most common implementation of XML-RPC) providers assume the <string> element is present, while others assume it's not present. Whichever way you code it, at least one MetaWeblogAPI provider will fail. This leads to a lot of frustration for developers trying to write XML-RPC applications. You often have to code the request differently to compensate for different server implementations.



XML-RPC Response

HTTP/1.1 200 OK

<?xml version="1.0"?>
<methodCall>
<methodName>stock.GetStockPrice</methodName>
<params>
<param>

<value><double>27.66</double></value>
</param>
</params>
</methodCall>

Again, the XML-RPC response is the most verbose and again it contains a gross limitation. What's the XPath for retrieving the data? If you said ("//double/text()"), then we might have a problem down the road. Imagine the provider augments his response with new elements that includes the stocks 365-day high and 365-day low. The XPath would fail. Neither SOAP or REST have this problem, because the elements are named semantically.

Friday, March 24, 2006

Unified Extensible Firmware Interface

I guess the buzz word “unified” is getting prefixed everywhere. Since Jan 31 2006 it took its place in front of EFI. EFI is an Intel’s initiative and now governed by EFI Forum.
Forum released their UEFI 2 Specification a couple of months back. OK why I am writing about this now is because of Microsoft’s press release about Vista will not support EFI in initial phase. So I just want to focus some light on this subject.

The basic sequence that goes in booting a PC is, power on, load BIOS and then boot loaded and then Operating system. This is what we learned and experimented around since years. First time when you though of upgrading your BIOS, you would have got a doubt whether my PC supports BIOS upgrade though flash update or do I need to replace those funny chips. To go a bit deeper, what is BIOS doing on your box?

As you can think of every processor by virtue of hardware design can jump to particular location when it is powered on. It is not as simple as jumping, but to keep things simple just make an assumption of such feature. Then it got to find out some instructions there to run your computer. These instructions are important to build an environment where in various different components of your computer can be controlled. By then some fixed locations of your RAM are holding pointers to various device controls. So as a programmer that is your environment, schedule your tasks to leverage on this environment. But such a sophisticated program (typically operating system) consumes more footprint, which your BIOS chip doesn’t have. So BIOS need a position to jump into some location which has huge memory to feed in further instructions of operating system. Such a location is typically a mass storage device or hard disk or even a network interface card. Thus BIOS provides options to boot from floppy (this for traditional support only, can do much because of 1.44 MB limitation), cd-rom, hard disk, network, and even some new BIOS chips can understand USB flash sticks also. Mean basically BIOS need to understand how to initialize these devices and keep a place holder in RAM, so that when OS boots up it can utilize these placeholders either to reinitialize or use then to control devices.

Then what is boot loader? Now when you select hard disk option, there is some tricky thing here. There can be many hard disks and there can be many operating systems on these hard disks. BIOS solve this problem by assuming a fixed location on first hard disk which is called Master Boot Record (MBR) of your hard disk. MBR is a 512 byte block which points to operating selected. But for the operating system to boot up it requires some pre built binaries at specified location. Means kernel code will have idea about a file system that you are going to mount as root. It is this root file system that holds various small programs that help kernel initialize hardware and keep pointers.

All is good then why we need a change from BIOS? Of course the primary reason is aging. BIOS is developed in pre-historic times. Earlier it is used only to initialize and bootstrap the operating system. Later OS can reinitialize the interfaces again. But in recent times this phenomenon changed. The dependency on BIOS increased again due to advent of ACPI and hot plug stuff. This called for layered BIOS architecture.

Also BIOS, being a binary code, is specific to processor architecture. Mean different versions of BIOS are needed to boot different architecture families. To overcome this problem a byte coded BIOS is needed.

Then plug in support should be possible for BIOS. Right now additional boot options can be provided using BIOS boot specification API. And BIOS options are stored on CMOS which is a non volatile memory in addition to BIOS EEPROM. This complicated the stuff to customize the boot environment. That called for a modular architecture.

Open source community attempted to build Linux BIOS to overcome limitations of BIOS. But this is more of subject of hardware manufacturers than software. So a strong initiative from Intel kind of companies is envisaged. Thus came out EFI.

So what this can do so special is explained in much of technical terms in UEFI_2_Specification.pdf. I am going through this now. And want to write some simplistic gist out of this soon.

Wednesday, February 15, 2006

What is in IBM's new P6

There is a new hype about IBM's P6. Recently we were discussing about why Industrial Automation controllers are not catching up microprocessor technology updates.

So following is the update that ISA published about IBM's P6

For years, chipmakers have improved computer performance by shrinking the size of transistors, squeezing more of them into smaller spaces, and ratcheting up the speed at which they process instructions. Recently, the benefits have diminished as the chips’ power requirements and temperatures have risen.

To get around the problem, the industry has resorted to building two or more computing engines known as "cores" on a single chip and throttling back the clock speed to prevent a silicon meltdown. As a result, performance does increase, but it does not double, even with two computing cores.

IBM claims its upcoming Power6, which is multicore and designed for higher-end servers running the Unix operating system, was crafted from the ground up to run fast without major losses in power efficiency.

Power6 is expected to run somewhere between four and five gigahertz.

Can someone focus on it and post what is special with IBM's P6