Home > Net >  How do you write c # logic timing buckle balance?
How do you write c # logic timing buckle balance?

Time:10-17

Customers booking a certain time fields, after the end of this period, deducted automatically user balance, use the timer is not insurance, there is no other solution?

CodePudding user response:

Why don't the timer insurance? If you do not use timer, can only use thread block (Sleep) mode, this way less insurance,

CodePudding user response:

refer to the original poster weixin_46749451 response:
customers booking a certain time fields, after the end of this period, deducted automatically user balance, use the timer is not insurance, there is no other solution?

Use queue, add logo, top-up and withdrawal this much, there will be no problem, just want to point in time within any performs a good son, don't and plug, the memory,

CodePudding user response:

What is the reason of insurance? Know the reason to solve.
A reference example, Internet of things commonly used the Mqtt protocol, protocol there are three kinds of mode information accessibility, one kind is sent successfully at least once, one kind is up to send a, another is to ensure the success of the send and only send once. This implementation includes how to solve the logic of insurance, can study.

CodePudding user response:

The timer is not insurance? How to draw this conclusion? Don't want to use the task planning system at timer you can use or direct database operations to operate

CodePudding user response:

Can be used to trigger, such as user checkout when settle accounts

CodePudding user response:

Hangfire, quartz, at the time of booking, through the program to create the trigger, the trigger time setting for the task is completed

CodePudding user response:

Good business is more than technology, to consult with an business rules, and then the technology,

Pure technical, project tasks, distributed cache dependence (overdue notice),

But maybe the business will say, I'm night nuclear Posting every day, every day you have to do daily daily tasks, what technologies are blind, anyway do every day, what is that plan?

CodePudding user response:

Quartz.NET + MQ, can ensure that deductions must perform
  •  Tags:  
  • C#
  • Related