Sunday, September 13, 2015

Recovering a compromised DO doplet

Configure Python-mode for Python development

quick REST error codes and indempotency

Error Codes -

  • 1XX - informational
  • 2XX - success
  • 3XX - redirection
  • 4XX - client error
  • 5XX - server error

Source: https://spring.io/understanding/REST

An idempotent operation is an operation, action, or request that can be applied multiple times without changing the result, i.e. the state of the system, beyond the initial application.

EXAMPLES (WEB APP CONTEXT):

NULLIPOTENT: If an operation has no side effects, like purely displaying information on a web page without any change in a database (in other words you are only reading the database), we say the operation is NULLIPOTENT. All GETs should be nullipotent. Otherwise, use POST.

IDEMPOTENT: A message in an email messaging system is opened and marked as "opened" in the database. One can open the message many times but this repeated action will only ever result in that message being in the "opened" state. This is an idempotent operation.

NON-IDEMPOTENT: If an operation always causes a change in state, like POSTing the same message to a user over and over, resulting in a new message sent and stored in the database every time, we say that the operation is NON-IDEMPOTENT.

When talking about the state of the system we are obviously ignoring hopefully harmless and inevitable effects like logging and diagnostics

Source: http://stackoverflow.com/questions/1077412/what-is-an-idempotent-operation




development workflow should make failure cheap