go-panton / mcre

Panton Multi-Content Repository Service (Panton MCRE), provides developers and IT teams with secure, durable, highly-scalable cloud storage.
0 stars 0 forks source link

microservice design pattern (soa, mvc, ddd?) #26

Closed roylee0704 closed 8 years ago

roylee0704 commented 8 years ago

https://medium.com/aws-activate-startup-blog/using-containers-to-build-a-microservices-architecture-6e1b8bacb7d1#.b93sdq48n

roylee0704 commented 8 years ago

https://medium.com/aws-activate-startup-blog/using-containers-to-build-a-microservices-architecture-6e1b8bacb7d1#.b93sdq48n

roylee0704 commented 8 years ago

http://thenewstack.io/domain-driven-design-aids-planning-microservices-architecture/

roylee0704 commented 8 years ago

another ddd: https://www.thoughtworks.com/insights/blog/domain-driven-design-services-architecture

roylee0704 commented 8 years ago

hackernews!! read the comment!

https://news.ycombinator.com/item?id=9857288

We've moved down this path from a massively complicated distributed transaction environment on top of MSMQ, SQL Server etc and you know what? With some careful design and thought about ordering operations and atomic service endpoints, we didn't need them at all after all. Transactions can be cleanly replaced with reservations in most cases i.e. "I'll reserve this stock for 10 minutes" after which point the reservation is invalid. So a typical flow for a order pipeline payment failure would be:

  1. Client places order to order service.
  2. Order service calls ERP service and places reservation on stuff for 10 minutes.
  3. Order service calls payment service (which is sloooow and takes 2-3 mins for a callback) and issues payment.
  4. Payment service fails or payment fails.
  5. Order service correlation times out.
  6. Order service calls notification service and tells buyer that their transaction timed out and cancels the order.
  7. ERP service doesn't hear back from the order service and kills reservation. etc etc. At step (4) you have an option to just chuck the message back on the bus to try again after say 2 minutes. If everything times out, meh.
roylee0704 commented 8 years ago

great google group!

https://groups.google.com/forum/#!topic/clean-code-discussion/SKckq7D59D0

roylee0704 commented 8 years ago

ddd is chosen as the core technique to structure the codebase, then followed by clean architecture (not extreaming)