Tag Info

New answers tagged

0

I came up with a "hybrid" solution. And you may give it a thought. I understand it's not desireable to modify 3rd party database, or, sometime it is not even possible because you don't have access to client sources, right? In my case, source data did not have anything I can "reference" like "updatedOn" or any reliable timestamps or logs.. I also needed to ...


1

I do not think making decisions about if trial time was exhausted on client is a good idea. This can be easily fooled and can't be calculated with some precision. Since you have a web application, I guess, it would be much better to limit a number of API calls a trial user can make without payment. You can make some tests and map an average number of API ...


1

Use 200 Ok The setup you propose is common with a service orientated architecture (SOA). When using asynchronous messaging you typically have a flow like: --> Request <-- Delivery acknowledgement <-- Process acknowledgement --> Delivery acknowledgement It is typical to use 200 Ok for a successful delivery acknowledgement. I would expect this ...


6

The successful creation of the task to do whatever was successful. This means that one should be looking in the 2xx block of the response codes. In this block one jumps out as the correct answer quite quickly: 202 Accepted The request has been accepted for processing, but the processing has not been completed. The request might or might not ...


1

You miss the opportunity to report errors that may occur while processing the message. That way the consumer of your service can never be sure if the call was successful.


0

An alternative approach, which may or may not be appropriate for your situation, would be to implement a queue and have a worker thread or process which processes items in the queue. There would always be only a single instance of the worker. The worker processes requests in a FIFO order. This way you eliminate race conditions - if two users both sign up ...


1

I would go with locking and making sure that validating the enrollment is single-threaded. This is similar to any one of another similar scenarios where a potentially large number of users are attempting to secure a scarce resource: registering for class/training, booking a seat on an airplane, buying a movie theater ticket in advance for opening day of a ...



Top 50 recent answers are included