I have got my first job/responsibility to design and implement a web service (java, spring) from scratch to be consumed by external systems (other companies). I am excited about the opportunity, but at the same time since this is my first attempt, I want to make sure that I give my best... I am sure I have to consider the following as I evolve with the design : 1. Scalability & Minimal Latency 2. SLA adherence (for e.g. 2 seconds for end to end) 3. Supporting different Media Types (SOAP, POX, JSON)

We are currently in the phase of defining the contract and while we are doing so, I would want to make sure that besides the application level details that I can take care of myself, I should also be able to consider the infrastructural challenges (Servers, Scalability etc.).

I am looking forward to get some help in this regard if you can either answer based on your past experiences or point to to some resources that would help me move forward.

P.S. :- I am already aware of the factors related to security, defining the policies in the wsdl, and other application level considerations. My main concern is on the choices and the decisions at the infrastructure level.

Thanks!

有帮助吗?

解决方案

Congratulations on your new assignment! They must think a lot of you to give you such a big responsibility.

As for your questions, I look at a web service API just like a conventional web application. The only difference is your clients will most likely be code than people. So all the same web application scalability principles you already know--load balancing of your web servers, building index and views on your database, caching--apply just the same here. You shouldn't think of this any differently. So just the same, make sure performance tests with JMeter or a commercial product are a part of your continuous integration infrastructure.

As for supporting different media types, I don't know exactly what you mean. Since you mentioned Spring, Spring and Spring Web Services will cover everything you need to get going fast. There are numerous API-level things like authentication, authorization, logging, auditing, error handling, etc. you will need to address. There are a lot of resources out there to answer your specific questions.

One thing I can also say. Please be careful about coupling. Your WSDL's and REST API's will be sure to evolve a great deal. Make sure you code in such a way that those changes don't impact the rest of your code base. Or you will be working a lot of weekends to fix everything after a small change.

Good luck with your project!

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top