Client-Server connection response timeout issues
User creates a folder in client and in the client-side code I hit an API to the server to make this persistent for that user. But in some cases, my server is so busy that the request timesout. The server has executed my request but timedout before sending a response back to client. The timeout set is 10 seconds in client. At this point the client thinks that server has not executed its request (of creating a folder) and ends up sending it again. Now I have 2 folders on the server but the user has created only 1 folder in the client. How to prevent this?
When should one use “out” parameters?
In Objective-C, there are several methods like initWithContentsOfFile:encoding:error:
where one passes in a reference to an NSError
object for the error:
parameter. In this example, the value of the NSError
object passed in can change based on what goes on at runtime when the method is being called and whether the body of the method was executed in a certain way successfully. In a way I think of this NSError
object as sort of like a second return value from the method, and only differs from an object anObject
in the statement return anObject;
in that when this statement is called, execution leaves the method.
What is thread safety? [closed]
Closed 9 years ago.
Maintenance wise, is `else while` without intervening braces considered safe?
Is else while
without intervening braces considered “safe” maintenance wise?
Evaluate math expressions without a stack
How do you evaluate arbitrary math expressions using temporary variables instead of a stack? What I’m talking about is translating an expression into an array of simple operations- each that change one variable based on the second argument.
Best Practice to Avoid “Playing Telephone” with Constructor Arguments
I find that the encapsulation required by OO has me frequently passing paramenters down the line from parent to child to great grandchild to second grand nephew once removed (not actually that bad). But inevitably in the process, and especially if graphics are involved there will be garbling the by the third iteration of someConstructor(int minX, int minY, int maxX, int maxY)
.
Loop fusion example using aspect-oriented framework
I had recently read a paper ‘Aspect-Oriented Programming’ by Gregor Kiczales and others, and found there the loop fusion example.
How to share common methods if objects have different roles?
If 2 classes have the following in common:
What are the pros and cons of Inter process communication done via sockets vs shared memory?
I understand that two of the many more options for inter process communication can be :
Need some input on storing stdin, stdout, stderr information for debugging
I am working with a legacy system that is not too bad, but I thought of making some improvements to it, and I wanted to solicit your feedback to help me make good decisions. The platform is Linix (different flavors of it).