Wednesday, August 19, 2009

Using CEA Services - Inventory Management example



We have spent a lot of time talking about how to use our CEA Web 2.0 widget features in WebSphere to communications enable your website but there certainly are several other use cases we have provided for. Overall, we are providing three main access points to help communications enable your applications. We provide the Web 2.0 widgets, REST like services, and web services. I wanted to blog in more depth about the CEA services that are available in WebSphere.

First, we have a REST like service. I say REST like because while we tried to follow the REST semantics as much as possible, it definitely made more sense to build some level of affinity logic into the service to tie a HTTP request to a specific server which is participating in the telephony side of the conversation. To build a similar system stateless would have been much more challenging and not perform as well. The service however does use the REST semantics. The verbs are still HTTP methods, PUT, POST, GET, and DELETE and at the root of the URLs are nouns. The REST services use either encoded URLs or Cookies for affinity. These services either send back data in JSON or XML formats depending on which is easiest for the consumer to handle. Here is a great in depth article on the REST services in the Communications Enabled Applications Feature Pack.

Second we have web services. As I stated above, we have challenges with having affinity for these services and needing a call back mechanism in order to get updates about the call state. We used WS-Adressing to deal with the affinity issues by having specially encoded end point references which tie the web services to a backend SIP session talking to your telephony infrastructure. We also use WS-Notification as a way to send updates about a particular call state.
Here is a good reference usage of using the web services to make a phone call.

So, how can these be used? Well, one example as briefly talked about in the video above is in an inventory management system. When the inventory begins to run low, a call could be made between the buyer and supplier using web services so that more stock could be ordered. This could be in addition to sending the appropriate message to the buyer letting them know what is low, what needs ordered, and the account information for the supplier. Now, this scenario could also be handled through REST integration or even using the widgets, it really just depends where the right place in your existing application is to plug in communications.

0 comments:

Post a Comment