Introdução a SOA

Resolvi deixar disponível um workshop introdutório sobre SOA a pedidos de alguns colegas.

OBJETIVO

Iniciar conceitos de nível básico-médio sobre SOA. Expor o conhecimento fundamental necessário para um anti-rojeto, mostrando exemplos de construção de serviços e uma possível arquitetura simples, enxuta e bem fundamentada. Também idealizar mudanças na construção de produtos e formalizar o conceito SOA, dismistificando-o.

PÚBLICO

  • Gestores
  • Desenvolvedores
  • Estudantes
  • E aqueles que acreditam ter vivenciado um projeto SOA porque criou algum web service ou um projeto com vários serviços feitos com WCF” ou usam o barramento como sinônimo estrutural de SOA. (confusão mental sobre metodologia e tecnologia que inferioriza a proposta de SOA numa empresa e deixa o mercado ruim)

A apresentação é baseada na literatura SOA de Thomas Erl.

CONTEÚDO

  • O que é SOA?
  • Características fundamentais
  • Tipos de SOA
  • Influência histórica
  • Benefícios estratégicos
  • Impactos comuns
  • Serviços
    • Encapsulamento, Relacionamento, Comunicação e projeto
    • Princípios de Orientação a serviços
  • Web Services e SOA primitivo
  • Web Services e SOA Contemporâneo
  • Formas de Implementação

DOWNLOAD

  1. Apresentação.
  2. Complementos – não disponível

MVC Design Pattern with DOS Batch Files!

I’ve been speechless for some moment just before this blog comes up. In the unlimited world of programming languages, I’ve met DoD (DOS on Dope). It despises Ruby on Rails, .NET, PHP, or any of those fancy web frameworks and give you an web site with MVC design pattern just using DOS. Amazing work!

WCF error: the underlying connection was closed an unexpected error occurred on a receive

I don’t like to post solution as I like to comment industry, strategies, patterns… But this solution gave me happiness. I want to share it because these error has so many reasons to happen I haven’t found solution anywhere.

As I architect and code a SOA project using WCF as tool, I had the folowing problem:

System.Exception: An error occurred while receiving the HTTP response to http://soaAdress.com. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details..

which datails:

the underlying connection was closed an unexpected error occurred on a receive

I thought my client application was fine because it closes the connection. Last time I had problem with WCF calls, the calls stopped at 11º one because it was needed to be closed. But this time I couldn’t close. The service contract has 4 operations:

[OperationContract(IsOneWay = false)]
[TransactionFlow(TransactionFlowOption.NotAllowed)]
myEntity GetComission(long id);

[OperationContract(IsOneWay = false)]
[TransactionFlow(TransactionFlowOption.NotAllowed)]
myEntity GetComissionPartial(long id);

[OperationContract(IsOneWay = false)]
[TransactionFlow(TransactionFlowOption.NotAllowed)]
myEntity GetComissionAuto(long id);

[OperationContract(IsOneWay = true)]
void CloseOderProcess(Contracts.CloseMessageOrder input);

The dump file was terrible to read, but I found something:

“The message could not be processed. This is most likely because the action
‘http://schemas.xmlsoap.org/ws/2005/02/trust/RST/SCT/Cancel’ is incorrect or
because the message contains an invalid or expired security context token or
because there is a mismatch between bindings. The security context token
would be invalid
if the service aborted the channel due to inactivity. To
prevent the service from aborting idle sessions prematurely increase the
Receive timeout on the service endpoint’s binding.”

It let me to a conclusion, if the service operation is IsOneWay = true, I shouldn’t close it. The service wouldn’t have the security token anymore as there is a very short connection between service and consumer and the message is operated asynchronously as stated in the contract. So I removed the .close operation and things are working now.

Surt Framework

Has been three years since I started studies on advanced way to start software projects. This time gave me some authority on framework design using modern methodologies and simples technology that works!

I’ve been usin this research and some of the past projects I’ve done and now it became mature and I hope I can share it. Take a look at this page. It talks about what it is, technologies and some of methodology I use. I hope to increment details as the time goes on.

I’m so happy because I had migrated one poor enterprise software to a highly structure one, by changing usability, patterns, layers in few weeks working alone. Badly saying, migrating some 20 files (lists, froms, data screens) with lots of complexity to 50 files with simplicity, good usability, navigation, ajax, SOA Services. Users were amazed and they don’t know I did much more, with less people, no error, and the system works best.

The dilemma of the agnostic software architect

We have been spreading a different thinking in our customers advocating that their products needs to be somehow technology agnostic. So what that could possible mean?

A meeting with my customer put forward an important discussion about whether they should build or buy off-the-shelf components to integrate into the new product release which radically change its environment from to web. I mean from Delphi to ASP.NET.

They were conducting their migration process based only in the ASP.NET available functionalities. They’ve shown a research, comparing a past Delphi solution with a possible .net solution. They pointed out a range of off-the-shelf components like ajaxControlToolkit and many others which they wanted to purchase.

Desktop and web solution are different paradigms indeed and demands different kinds solution and methodologies. They didn’t see that all they need would be simply being done at home.

One may think about limitation of the web, and we believe about the wide range solution the web can provide. Take the example of some industry leaders like Amazon.com and Google. Do you really believe they follow Microsoft & Java framework versions and keep using off-the-shelf components extensively? Actually YOU may use what they provide.

I’m not saying that we shouldn’t use off-the-shelf components, there’s nothing wrong with that. We need to balance about its usage. For example, the Enterprise Library Logging Application Block offer many options to log information into the text files, event viewer, e-mail and databases. But my application only needs to write log in the event viewer. Having many options doesn’t limit my application IF IN THE FUTURE I want to change log directions. Future seems so distance, so intangible that it must be preferable write a small components with fewer lines providing same functionality instead of having a monster component with lots functionalities and overhead. (Have you had time to look their code? Probably not but you may want if your product start to perform badly or if you change from one version to another, or if you may want to use MySql instead of the SqlServer!)

At the end, what we always are looking foward is a clean path to quickly deliver value and avoid spending time working bugs out.

Follow

Get every new post delivered to your Inbox.