DEV Community

Discussion on: Hexagonal Architecture doesn't really work

 
grahamcox82 profile image
Graham Cox

Hmm - That's interesting.

So you end up with:

  • The actual service in question, which exposes an XxxRepository port.
  • An implementation of the XxxRepository that just calls Postgres
  • An implementation of the XxxRepository that is a hexagon of its own, and which exposes two ports - XxxDataStoreRepository and XxxSearchRepository
  • An implementation of XxxDataStoreRepository for DynamoDB
  • An implementation of XxxSearchRepository for CloudSearch
  • An implementation of XxxSearchRepository for Elasticsearch

It works. It feels quite complicated, but it works. :)