title: How to split large XML webservice applications in microservices?
body: <p>I have a <code>XML</code> <code>webservice</code> application that consists of several parts. There is a common entry <code>servlet</code> that delegates to different internal webservices based on the <code>request parameters</code>.</p>
  
  <p>Now I wonder which solution might be better:</p>
  
  <ul>
  <li>to have any of those services running within a single application? So, one application serves all?</li>
  <li>or split them into microservices, where each servlet app is responsible for only one single purpose/brand?</li>
  </ul>
  
  <p>Example: lets assume we have a common <code>car</code> service that serves content for all cars of a brand. Each of them might have completely different logic.</p>
  
  <ul>
  <li>Some brands might have periodic data imports.</li>
  <li>Some brands might get data from additional an external webservice.</li>
  <li>Some brands might have a database cache, etc.</li>
  </ul>
  
  <p><code>/my/rest/car/AUDI/details?id=123</code></p>
  
  <p><code>/my/rest/car/BMW/details?id=456</code></p>
  
  <p><code>...</code></p>
  
  <p>Most of those webservices are nearly independent. Though they are currently contained within a single application, as they all serve "car content".</p>
  
  <p>Now I'm rethinking if it could make sense having the common <code>/my/rest/car/{brand}</code> webservice servlet in a main <code>war</code> file. And then create a new war file for each of the brands. Each of them would offer its own XML <code>webservice</code>, and the common servlet would delegate and join them.</p>
  
  <p>Of course, this might result in a bit overhead, as the xml <code>request</code> and <code>response</code> has to be exchanged locally between those services.</p>
  
  <p>But as an advantage, I could more easily maintain and restart each service individually without downtime of the others, and would have less side effects refactoring and extending a part. Eg if there is only one data import change for BWM.</p>
  
  <p>So, what is your experience in splitting large applications like this? One serves all, or single services?</p>