Over at Wordpress

In case you come by here, note that I'm moved over to Wordpress (http://eikonne.wordpress.com/) and I'm also now available on Twitter (@eikonne).

Nigerian Presidential Elections, Oh What A Shame!

Nigerians and observers alike have been very critical of the presidential elections that recently occurred in the motherland.  I don't want to suggest that I settle for less or that how the elections were run are acceptable, however, it is true that a baby doesn't start running because the adults around it can walk.

As a friend of mine reminded me today, there is a country to east of Nigeria whose president has been in power for 26 years!  We need to appreciate the small victories however insignificant they may look.

Am I Your Servant?

Via Dare's post: Define: Servant, I came to find out that some of my Nigerian brethren did not take kindly to his description of the fellow in the picture below as a "servant".  Check out http://naijaman.cfmxdeveloper.co.uk/diary/2007/04/objs-cribs.html and http://grandioseparlor.com/2007/04/a-presidential-servant/

Should his picture have called the gentleman a "houseboy" or  something kinder?  Should he have not shown the picture at all? I might have taken umbrage to the picture taking if Dare hadn't also taken pictures to show the other end of the spectrum - affluency, which he is a member of.  What interests me the most is that a Presidential servant actually lives in such conditions.  How come?  What's the excuse?  That things could be worse for him?  Could this be his Aso Rock?

Dare, hope you left him with enough "pocket money".

For the full catalog, check out: http://flickr.com/photos/carnage4life/sets/72157600155828724/55828724/

REST -only links or no?

REST touts that a "progresses through an application by selecting links (state transitions) resulting in the next page....

To borrow from a commonly used example, if I have a web service that "gets a list of parts", the URI to get the parts would look like this: http://www.parts-depot.com/parts and the "response" contains a list of links to the individual parts like this: <Part id="00345" xlink:href="http://www.parts-depot.com/parts/00345"/>

For additional information, I would have to "select" the link to "GET" information on the part.

What consumer application really wants to iterate through a list of links to get part detail information (other than a user interface)? 

The Astoria samples are more liberal and actually return detail information for each product that exists (a URI is included also):

<DataService xml:base="http://host/vdir/northwind.svc">
 <Products>
 <Product uri="Products[1]">
   <ProductName>Chai</ProductName>
   <QuantityPerUnit>10 boxes x 20 bags</QuantityPerUnit>
   <UnitPrice>18.0000</UnitPrice>
   <UnitsInStock />
   <UnitsOnOrder>0</UnitsOnOrder>
   <ReorderLevel>10</ReorderLevel>
   <Discontinued>False</Discontinued>
   <ProductCategory href="Products[1]/ProductCategory" />
   <Supplier href="Products[1]/Supplier" />
  </Product>
 <Product uri="Products[2]">
  <ProductName>Chang</ProductName>
   <QuantityPerUnit>24 - 12 oz bottles</QuantityPerUnit>
  <UnitPrice>19.0000</UnitPrice>
   <UnitsInStock>17</UnitsInStock>
  <UnitsOnOrder>40</UnitsOnOrder>
  <ReorderLevel>25</ReorderLevel>
  <Discontinued>False</Discontinued>
   <ProductCategory href="Products[2]/ProductCategory" />
  <Supplier href="Products[2]/Supplier" />
  </Product>
  <!-- more products ... -->
 </Products>
</DataService>

This just seems wrong to me and state transitioning seems to be shot.  In other words, I think it becomes less about REST and more about HTTP and data formats.  Maybe it's hi-REST versus low-REST?

Astoria - MS getting RESTful

I've been gone for a long time now; hopefully I'm back.

I discovered http://astoria.mslivelabs.com/ today and it is pretty interesting.  Underneath the covers, the "Entity Data Model" (EDM) is used (a post for another day) and it seems like there is a conscious effort not to mention "resources".

The samples provided also bring some questions about resource/state representation and the concepts of traversing links.  A follow-up post on this is coming.

Is Software Development Really Hard?

Rocky blogs that 98% of the systems being built out there are "trivial" or at least can be solved by "trivial" solutions.  Is this really the case?  He also contends that most applications are a "viewer (form, page, screen)" over data and development tools such automat this, attributing unecessary complexity to tool vendors, framework builders, architects etc.

I actually disagree with his assessment on the distribution of complexity.  My developers spend much more of their time behind the screen than in it.  I've worked on enough projects to know that there are a fair share of applications where more interesting things happen when a user clicks the "Ok" button.

Understanding the business problem that needs to be solved (deployment model, update strategy, functionality, performance requirements, scalability, user interaction, configurability, integration etc) drive the tools and methodologies that should be used.  A decent understanding of tools and methodologies are required in order to effectively use them.  It's not a secret that a lot of software projects fail due to a lack of understanding of both the problem domain and the toolset/methodologies required.

I cringe when folks with influence imply a panacea of sorts for software engineering based on a subset of scenarios.  Each situation has to be studied in isolation. While there may be reusable "patterns and practices", in a lot of cases, these need to be "tweaked" to solve the problem.  If your application is simply forms-over-data, build it in the simplest manner possible!

 

Is there such a thing as a "simple" service?

A lot of time has been spent debating REST versus WS-*, examples are given based on what have been qualified as “simple” services.  For instance, a RESTian example that shows how to retrieve a list of orders (or cars) or a WS-* (dare I say SOAP?) example that shows how to consume a service that returns the current weather.

There has been a lot of banter that suggests that REST is used for “simple” web services and this has been slightly offensive to certain individuals.  In fact many a blog has been dedicated to demonstrate how REST can be used to build “complex” web services.

I'm not sure that I subscribe to the simple versus complex views.  I tend to to view services in the context of their nature i.e. how do they behave, what they require, how they interact etc.

For instance, certain services are long-running in nature i.e. they can take hours before completing business functionality.  I won't get into discussions on whether the consumer should block or not - that's an implementation issue, but we generally agree that the service shouldn't “always” force the consumer to block.  However building such services using REST is interesting (to say the least) because of the underlying protocol of choice - HTTP and its default RPC-like behavior.  What does this mean?  The developer of the RESTful service will need to override the default timeout for an ASP.NET thread (executionTimeout) to ensure that the thread managing the long-running process does not die prematurely.  It doesn't end there however, the consumer of the RESTful service also needs to override their “request“ objects default timeout also so it doesn't die while “waiting“ because by default it blocks.

Scenarios like the one above should ultimately influence service architecture and not necessarily the logic executing under the covers.

 

Complex Queries and REST

It's been a while, been busy with work and all that.

I've decided to venture into the realm of RESTful Web Services.  As is popularly quoted, “in theory, theory and practice are the same, but in practice, they are different”.

Trust me, I am still drinking the REST kool-aid and I definitely believe it solves a certain set of problems.  You will be hard pressed however to convince me that there is an architectural style that solves all “web service“-type problems cleanly. 

Having said all that, how do I RESTfully solve a situation like this:

Every order has an associated address.  What a consumer wants to do, is send me a list of orders and have the corresponding address for each order returned, there are no links to be followed afterwords.  Note that I said “a list“, as performance is an issue here i.e. the consumer cannot iterate through their list of orders and for each one, RESTfully (GET) ask for the address.

Questions:

  1. What is the resource?  I'm assuming its “addresses“ since that is the resource that I need returned.
  2. What is the URI? “/addresses/orders“ or “/addresses/query?
  3. GET doesn't seem like an option here, hence, looks like I need to POST my criteria
  4. Does this have be followed with a corresponding GET to actual “retrieve“ the list of addresses or can my POST above handle that as its response.
  5. Am I totally off base? :)

I will state that a lot of business applications that I work with use more complex semantics as opposed to the example (good one for illustration) Dare Obasanjo places here and most of the “samples“ out there are pretty trivial.

I'm hoping Mark Baker,  Paul Prescod or someone out there can weigh in on this.

Thanks.

Why I Hate Frameworks

Via Don Box, I stumbled on this Why I Hate Frameworks. Quite humorous and actutally a good read.

Frameworks exist at multiple levels e.g. in my opinion System.IO is a framework.  However, just like everything else, things can be overdone which leads invariably to Technology (maybe now Framework?) Overload.

What do you think?

All things pragmatic...

So Mr.Box posts Pragmatics and he's generated quite a buzz.  Bottom line (unfortunately) is that something has to ship, and with the toolsets available SOAP seems the easier/easiest option right now.  Clemens has a series of articles that I need to read up on to see how “Indigo can do REST”.  I wonder how many .NET based REST implementations exist out there?  If you know of any please share.

Interesting stuff huh?

Exceptions and SOA

Arnon posts here Exceptions and SOA that

"...(innerException) the original error" - do not expose internal implementation out side of the service - only what's in the contract - in other words don't, just don't bubble exceptions out of your service.

Well I wonder what the verbiage of the exception should be?  If a null pointer occurred in the service, what message should I return back to the consumer of the service?

Lessons....

Does anyone even understand this article?

What value does it provide other than to make me wonder what the point of the article is!!

Enlighten me if you may.

Why Do You Blog?

So why do you blog?

Is it to share information?  React to something you've read, seen or heard?

Do you care if people react to what you say?  Or is just having an outlet of expression ok?

 

African Cup of Nations

I had to hook myself up with a new dish (Dish network) so I could actually catch my Super Eagles (Nigeria) playing in Egypt and avoid having to drive to Chicago this year.  I was impressed that Telesud actually has the commentary in English even though its a French channel.

Back to the tournament.  Cameroon is the best team that I've watched so far.  They have totally been dominating and have been in control of every game they've played.  The game against Cote d'Ivoire on Saturday will be a cracker because Cameroon definitely has something to prove.  Then again, Cote d'Ivoire really didn't deny them a trip to the World Cup - they couldn't beat Egypt at home.

Nigeria looks like a team that feels that they can turn it on whenever.  There is a lot of talent on this roster, probably one of the best I've seen in a long time.  Nigeria's weakest link (in my opinion) has been the lack of a true defensive midfielder - this kid Aliyu is the real deal though.

Not trying to look ahead, but if both Nigeria and Cameroon win their next games, they'll meet in the semi-finals.  That will be one heck of a game as both teams want to win to make up for not making the World Cup.

Having to watch these games during the day make me wonder what my summer will be like.  With the time difference between Indiana and Germany, it's going to be interesting juggling work and watching the world's finest footballers play the greatest game on earth.

If you've got any thoughts, as always feel free to share.

It's been a while

I've been out of pocket for a couple of weeks.  Went home (Nigeria) for Christmas and New Year.  Visited Aruba immediately after that and finally just waltzed in the office last week.  Honestly, I need a vacation from the vacation.

Anyway, I hope to be back blogging shortly...