Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Injected Services - Fewer Large services versus many smaller services. Best Practice?

 
Gary Wolgast
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my current job, we are using jsf 1.2 and Spring 2.5. We are currently developing an application that has roughly 50 or so discrete entities. Most of the entities are related in one way or another to an "application" entity. This entity is a super entity to which most of the others are related in a one-to-many relationship in the data model. Using Spring DI we have built a few small services and have ended up with a "super size" service that was originally intended to serve the application entity only, but now serves up a large portion of the other related entities using discrete DAOs for each entity. My question: Was this the best way to design this model (One large service serving many different entities) or should we have created smaller bite size services as in 1 service for 1 or 2 entities, regardless of it's relationship to other entities? I'm just looking for opinions about whether fewer large services or many smaller services is better.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Totally depends, but in general, giant services are a pain to maintain.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic