Vijay Ram
Vijay Ram

Reputation: 325

Restful WebService Deployment Strategy - Best practices

We are developing Restful webservices (JAX-RS). We have resource organization like the following:

Base URI: api.example.com
->Accounts
    [AccountId]
->contacts
->orders
->cart

To illustrate, if I wanted to access the contacts resource, my URI would be like this:

http://api.example.com/Accounts/233/V1/contacts/

and for orders, http://api.example.com/Accounts/233/V1/orders/

We want to deploy individual web applications (as WARs) for contacts, orders, carts, etc in the above representation, clustered of course. The requirement is that the consumer app needs to access these apps with the above mentioned URL scheme. The consumer app has no knowledge that there are multiple applications deployed. The basic question is, what are best practices for deploying such applications individually and still to be able to stick to resource oriented architecture?

Note: We are not yet using any ESBs now. and all these APIs are currently used in house.

Upvotes: 1

Views: 504

Answers (1)

Martin Spamer
Martin Spamer

Reputation: 5585

Best practice is to abstract physical url from logical uri with a Service Façade. There are lots of way to do this; from url rewriting at WebSever level to web service governance tools like Layer-7 and Sonic.

Upvotes: 1

Related Questions