Cristian
Cristian

Reputation: 61

Advice for noob: Restlet or SOAP

I have to develop a web service that looks like this: I make a get call, including a string in the url, and I need to receive another string based on the initial string from the query.

I might have to make this call even for a thousands times a minute. Do you think that the server will be able to handle so much HTTP communication? Is a RPC approach better?

Any suggestion is welcomed, I am just starting to work on web services and I have no clue about the performance.

Thanks.

Upvotes: 2

Views: 578

Answers (4)

Scott Shea
Scott Shea

Reputation: 11

You may also want to check out Jersey at http://jersey.java.net/ as an alternative to Restlet.

Upvotes: 0

Jim Ferrans
Jim Ferrans

Reputation: 31012

One of the key advantages of a REST web service is that its responses can be cached. In this way, the intermediate HTTP cache chain between your service and its clients bears a huge part of the total workload, so your web service can scale up. REST can be far more scalable than SOAP or RPC.

Upvotes: 0

PaoloVictor
PaoloVictor

Reputation: 1306

IMHO, the main difference between SOAP and REST is that the former inserts an additional overhead (both processing and data) since it's data has to follow a somewhat strict structure. REST is simpler and leaner because it doesn't require you to explicitly define a message format, leaving this task to the software that will handle the message instead of the transport infrastructure.

So:

  • Do you want to enforce a message structure at the cost of additional overhead? Use SOAP;
  • You want a more lightweight option, at the cost of having senders and receivers piece together the messages into meaningful data? Use REST;

Upvotes: 0

AlexR
AlexR

Reputation: 115328

Thousands calls per minute means hundreds per second. I believe that modern computers can do more. I do not think that you will have serious performance limitations. But before you are starting check how long will it take to deal with the request. If this will take time I'd recommend you to decouple the HTTP WEB front end and business logic, i.e. process the request asynchronously. You can easily achieve this using JMS.

SOAP or REST? I personally prefer REST. It is simpler, it is faster. And it seems that you have only 2 String parameters, so SOAP does not give you any advantages.

Upvotes: 2

Related Questions