Sun Campus Ambassador João Sávio

Terça-feira Nov 17, 2009

Hello people

Today is my last day in Sun Microsystems and I would like to thank all that were following this blog. But, mainly Eduardo Lima, who was a great boss to me and to the others Campus Ambassadors.

My other blog will continue: http://joaosavio.wordpress.com

And my contact is joaosavio@gmail.com

Thank you very much!



Sexta-feira Out 23, 2009

Nesta palestra online serão mostradas as principais características do novo NetBeans 6.7 e serão mostrados alguns exemplos nesta moderna IDE!!!

Dia: terça-feira, dia 27 de Outubro
Horarios Brasil:
3:00 PM - Sudeste, Sul, GO
2:00 PM - Nordeste, PA, MT, MS, AP
1:00 PM - Norte

Horários Europa
6:00 PM - Lisboa

Horários África
5:00 PM - Cabo Verde
7:00 PM - Angola
8:00 PM - Moçambique

Para entrar na palestra, devem apenas clicar no link:
https://sas.elluminate.com/m.jnlp?sid=2007072&password=M.9DCBF134254AF63B4280FAD46A916C

NetBeans é uma IDE gratuita, Open Source, que permite aos desenvolvedores criar aplicações desktop, web, enterprise e mobile de uma maneira rápida e fácil usando a plataforma Java, assim como JavaFX, PHP, JavaScript e Ajax, Ruby e Ruby on Rails, Groovy on Grails, C/C++.

Este webinar será conduzido por João Sávio Ceregatti Longo, Campus Ambassador da Universidade Estadual Paulista, campus Rio Claro, Brasil

Não se esqueçam de entrar 15 minutos antes para testar o som e a conectividade à rede.

Sexta-feira Out 02, 2009

Hello people! Some photos of Software Freedom Day in Rio Claro/SP - Brazil!

Thanks!

Quarta-feira Ago 26, 2009

Sexta-feira Ago 07, 2009

It is with great pleasure I write this post because we finally reached to 100 members!

Terça-feira Ago 04, 2009

Before we see Web Services, let's imagine a situation of our world to understand better the motivation to them.

Imagine that we have a company in Brazil and we'll propose some agreements with a japanese company. But, none of us speaks Japanese, and in turn, nobody in the Japanese company speaks Portuguese. How to solve this problem? Simple, we'll use a language in which two sides will understand, probably the English language. So, the comunication between the companies will be in English, but the communication will be made within each one in its original language. Similarly, bringing this hypothetical situation of the real world to computing, we could have the following problem:

- Hello sir. John, my company has already a search system doing in Java and I would like anyone from anywhere of the world could use my search, including our partner that only uses the .NET plataform, from Microsoft.

Oh my God! And now?

Simple, we'll use a programming language which all systems can understand to exchange messages. And for that, we'll use the SOAP protocol.

According to the Wikipedia definition, SOAP (Simple Object Access Protocol) is a protocol specification for exchanging structured information in the implementation of Web Services in computer networks. It relies on Extensible Markup Language (XML) as its message format, and usually relies on other Application Layer protocols (most notably Remote Procedure Call (RPC) and HTTP) for message negotiation and transmission. SOAP can form the foundation layer of a web services protocol stack, providing a basic messaging framework upon which web services can be built.

A SOAP document is similar to the content below:

<soap:Envelope … >
    <soap:Header>
        ... <!-- (
optional) additional information to help dealing with the messages -->
    </soap:Header>
    <soap:Body>
        … <!-- Main information - request, response or data failure -->
    </soap:Body>
</soap:Envelope>

Other important patterns are described below:

  • XML (eXtensible Markup Language) → describes models, formats and data types. Furthermore, all other standards are based on XML 1.0, XSD (XML Schema) and XML namespaces;

  • HTTP(s) (Hypertext Transfer Protocol (Secure)) → is a low-level protocol used by the Internet. It sends Web Services across networks using the Internet for that;

  • WSDL (Web Services Defition Language) → is a document written in XML which describes the service, specifies how to access it and what are the operations or methods availables;

  • UDDI (Universal Description, Discovery and Integration) → registration and localization of services. A Web Service would be registered in a place available to all. A client would seek the desired service in that repository and thereby would obtain the data necessary to call that service. The image below shows the situation described:


Web Services is a solution used in the integration of systems and communication between different applications. They are a kind of “remote functions”. Below is a simple example done in NetBeans:

@WebService()
public class Test {
/**
* Web Service operation
*/
@WebMethod(operationName = "hello")
public String hello(@WebParam(name = "name") String name) {
return "Hello " + name;
}
}

Recalling that NetBeans already implements the body of the operation, simply change the line: return "Hello" + name. We have done a Web Service named “Test” and a operation named “hello”. But, each Web Service can have many operations.

The client of this Web Service will send a string data and the service will return the word “Hello” concatenated with the string passed. To make the client is needed to have the WSDL file (description of service) generated by the Web service and make the call passing the parameters correctly. Using our previous example, a call to service would be like this:

try {
services.TestService service = new services.TestService();
services.Test port = service.getTestPort();
java.lang.String name = ""; //modify the entry
java.lang.String result = port.hello(name);
System.out.println("Result = "+result);
}
catch (Exception ex) {
//handle the exception
}

As the NetBeans already implements the body of the call, you only have to modify the entry and handle the exception.

References

  • JOSUTTIS, N. M. SOA in Practice The Art of Distributed System Design. 2008. O'Reilly.

  • Wikipedia. SOAP. Available in <http://en.wikipedia.org/wiki/SOAP>. Accessed on 30/07/2009;


Sexta-feira Jun 26, 2009

Hey people!

Here they're the JSF introduction photos!

Thanks!

Sábado Jun 06, 2009

 This is some photos about my lecture OpenSolaris Introduction in Asser university!





Thanks

João Sávio

Terça-feira Mai 19, 2009

Hello people

There is an SOA group on yahoogroups. To participate, send an blank e-mail to service-orientated-architecture-subscribe@yahoogroups.com

Thanks
João Sávio

Quarta-feira Abr 29, 2009

Hey people! These are the photos from lecture performed in UNESP!

 Thanks!!!

João Sávio

Domingo Abr 26, 2009

https://open-esb.dev.java.net/60mintutorial/

Here there is a good BPEL tutorial!

João Sávio

Terça-feira Abr 21, 2009

I. Motivation

  • Reuse systems

  • Standardization of communication between systems enabling integration


II. SOA

Definition: paradigm for the implementation and maintenance of business processes that are in large distributed systems. But we can also think of SOA as a layer that provides a higher level of abstraction based on the Object Oriented paradigm (OO). It has as keywords: interoperability, loose coupling and services.

Interoperability

Interoperability is achieved through an enterprise service bus (ESB) that we can see in the representation below:

 The ESB would be the highest layer of abstraction that has several responsibilities, such as:

  • Provide connectivity

  • Transformation of data

  • Routing (smart)

  • Dealing with security

  • Dealing with reliability

  • Management services

  • Monitoring and logging

The idea is that all systems are integrated through the enterprise service bus. For example, if you have a system made in PHP, but your company currently uses Java, it is not necessary to completely change the old, but provide an integration of the them through an ESB for example.

Loose Coopling

In turn, loose coupling is related to the reduction of dependency of the system, minimizing the effects of changes and failures. We can illustrate this in the Object Oriented Programming with a class tight and one loose coupled:

public class classTightCoupling {
    public String name;
    public int age;                   
}

public class classLooseCoupling {
    private String name;              

    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
}

In the first class, if you have an object, simply do nameOfObject.name = "something" to change the value of the variable. In the second class, the access to the variable "name" can only be done by the methods setName and getName. That is good! It may seem silly in these small examples, but imagine if you have an giant API that has rules to change the values of its variables. If this API was tightly coupled, there would be a great dependence between her classes and those that you were using, because anyone could modify the variables in any way and this could affect the outcome completely.

But, back to our world of SOA, we can use the loose coupling in various situations:

  • Asynchronous Communication - this means that the sender and recipient are not synchronized. This is good because the systems that are exchanging messages don't need to be online at the same time.

  • Iteration Patterns - only string are supported or other data types too? Structures? Arrays? Lists? Objects? Inheritance and polymorphism? Well, the more complex is the data type, the more your system is tighly coupled. For example, if you use objects to exchange messages, only the object oriented languages may participate in the integration.

  • Compensation - it's related with the security in the transaction. If you have to update two backends, how to deal with the problems if only an update was successful? Usually the commit is made of two stages, i.e., backends are updated at the same time. But, the more loose coupled and that ensures the overall consistency is change the backends separately. If only an update is successful, you can reverse it to the previous situation and send an error message, for example.

  • Control Logic Process - if you have a central controller, the failure of a component will stop all the process. Moreover, reducing the coupling, i.e., making a decentralized control, you eliminate this problem.

We only have mentioned advantages of loose coupling. But, there are also disadvantages, because the more a system is loose coupled, it is more complex. Therefore, it is up to you decide how much you're willing to pay for it.

Services

The third key word is "services" that can be defined as a piece of an independent corporative functionality. There are three types:

  • Basic Services - there are basic services of data and logic. For example: create a new user, change a user, returning the age of a registered person, say if a year is leap or not, etc. They belong to only one type of backend.

  • Composite Services - they are services that are composed of other services, and usually multiple backends. In SOA, composing new services from existing ones is called orchestration. As in an orchestra, you combine "instruments" to perform different tasks more complex than those possible with only one. These services are still considered without states and with rapid execution.

  • Process Services - these are called workflows. These services contain states and sometimes need to use multiple sessions. Using a shopping cart as an example, we have one for each client, i. e., a session service for each one. And we have many possible states, because the service has to save the order when the client is looking for more products, finalizing the purchase when the confirmation is made, wait for confirmation of payment and complete the order only when the product is delivered.

III. Conclusion

In this article, we set and talk about the basics of SOA, it is essential to understand Web Services and other types of modeling practices.

IV. References

  • JOSUTTIS, N. M. SOA in Practice – The Art of Distributed System Design. 2008.

Sábado Abr 11, 2009

Hi people!

Look out what I have received by post office!


Sexta-feira Abr 10, 2009

Hi people!

I have stayed very happy about the result of my lectures. People said to me that they have liked very much!

Thanks

João Sávio