Thursday, November 8, 2007

JXTA Framework

JXTA is to create a framework by providing capabilities that most peer-to-peer applications require. Moreover JXTA is simple application that relies on JXTA platform and when application starts, it becomes a peer in the network. After that, it can be used to discover other peers and can communicate with each other while publishing own services among the peers in the network. When increasing the number of peers in the network it becomes more complex to manage an individual peer. To avoid this problem, it addresses the grouping concept where multiple peers could collectively fit in to a group and that group members are facilitated to add new members into the network, deleting members, finding members and communicate with each other in the network. JXTA specifications provide security, authentication, access control and pipe connection services and infrastructures also to form and manage peers as well as collection of groups for peer-to-peer networks.


JXTA Messaging

After created the JXTA based network and peers are put together to communicate each other, then it does the communication among the peers via pipes. When communicating among peers the messages are sent into a pipe and all peers endpoints that are listening to that pipe. The pipe binding protocol controls how peers are connected and disconnected to a pipe at runtime. Not all messages needs to be broadcast and JXTA recognizes that. It also offers a point-to-point pipe where oneway communication occurs between two peers. In the JXTA model, a message is an object which is sent among peers.

JXTA depends greatly on XML to accomplish its goals which are messaging services that are exchanged among the peers in the peer-to-peer network are in XML format, which makes JXTA platform independent. And based on XML those peers, pipes and services are represented through the advertisements. Each advertisement describes peer information such as name, peer id, properties and services. The main advertisement categories are in JXTA peer, peer group, pipe, service, content, endpoint and user-defined advertisements.

WS-AtomicTransaction


Mainly, WS-Transaction is defined how web services coordinate their activities each other and having the underlying database operations. Under the WS-Transaction,it defines two transactions models over the web services. Those are atomic transactions and business activity transactions. An Atomic transaction of web services is considered as short-lived an activity which is executed within a short duration time. And WS-AtomicTransactions are made up of services that all enforce to a common outcome[Web Services Transactions Specifications].

In this case, an atomic transaction follows ACID properties and either commit or abort entire transaction which is all or nothing property. Likewise, there is a coordinator to coordinate the transactions and has responsibility to give instructions to participants either commit or abort the transaction. This process is known as two-phase commit. Normally, the two-phase commit protocol is a coordination protocol and that defines how multiple participants to reach on the final outcome of WS-AtomicTransaction. As well as, each participant locks the transaction that is involved to prevent any changes being made to the data while the transaction is being processing. This is because ACID implies resources must be locked until the transaction terminated by each other participants, so that it preserves isolation and consistency of each transaction.

WS-BusinessActivity


There is another transaction activity called WS-BusinessActivity. Normally, business activity is a long running business transaction that consumes many resources over a long duration. And there may be a significant number of atomic transactions involved. Therefore, this may be violating ACID properties since it is not suitable to lock the resources by each participant while the transaction is being processing for a long time. WS-Coordination protocols provide the specification to handle the distributed web transactions[Web Services Transactions Specifications].






No comments: