Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Patterns, Principles and Practices of Domain-Driven Design
This is the forum to discuss the Wrox book Patterns, Principles and Practices of Domain-Driven Design by Scott Millett; ISBN: 978-1-118-71470-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Patterns, Principles and Practices of Domain-Driven Design section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 9th, 2015, 04:52 PM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2015
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Message Gateway

In page 212 is detailed the implementation of message gateway, in order to divide the message in 2. One to process the payment and another one to continue the message avoiding to charge the credit card twice.

But what happens if the message fails after accepting the payment but before sending the message to the bus (like the bus endpoint went down) ? It will change the credit card but will be retried again after the bus goes up again.

Is this scenario possible ?
Reply With Quote
  #2 (permalink)  
Old February 11th, 2016, 05:11 PM
Wrox Author
Points: 237, Level: 4
Points: 237, Level: 4 Points: 237, Level: 4 Points: 237, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2015
Posts: 59
Thanks: 1
Thanked 5 Times in 5 Posts
Default

Hello and thankyou for your question.

Firstly, my apologies for the delay. There is an issue with the Wrox notification system and I was not being notified of new messages.

As for your question. In short yes, there is always the possibility that there could be a failure at any point. By adding a message after each operation, you reduce the potential for a failure to cause harm.

But, there's always that small chance it will happen at an awkward moment. The strategy here is to minimise the possibility as much as possible.

As we talked about in the book, though. If you can make your operations idempotent the problem goes away. If you REALLY REALLY REALLY cannot tolerate failure, you may want to investigate distributed locking as described by Martin Kleppmann http://martin.kleppmann.com/2016/02/...d-locking.html.

Hope that helps and I hope the late response does not cause offence.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SMS Gateway carolynjoseph Java Databases 3 October 11th, 2012 08:27 AM
sms gateway KnightErrant ASP.NET 2.0 Professional 1 October 11th, 2012 08:12 AM
paypal payment gateway. myself.panku ASP.NET 3.5 Professionals 0 July 30th, 2009 01:09 AM
SMS through Gateway gmdotcom2004 ASP.NET 1.0 and 1.1 Basics 1 January 3rd, 2007 09:30 AM
gateway address suresh_rupineni VBScript 0 July 27th, 2006 09:26 AM



All times are GMT -4. The time now is 09:17 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.