Pergunta

I'm looking to create a custom carbon component and there are a few choices for persistence. The main options appear to be JPA, or WSO2 data services.

  1. What is the strengths and weaknesses of both options?
  2. Are there other recommended approaches?
Foi útil?

Solução

The preferred way to access data in an SOA would be to use services. Basically, if you use JPA, your data access logic will be limited to the use of that specific component. If you use a solution like data services, then those services will be accessible globally, and thus enforce re-usability and a more consistent architecture.

Outras dicas

The problem with exposing data services outside of individual service boundaries is that you lose isolation and expose internal implementation of a service to the outside world. Each service should use its own database (and you can use data services if that data comes from multiple sources).

The place to have a single database with cross service data is the reporting database which should be different from the transactional one anyway (a pattern I call aggregated reporting)

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top