Notes by Craig Phillips
- There are 11 fallacies of Distributed Computing:
- The network is reliable
- Latency isn’t a problem
- Bandwidth isn’t a problem
- The network is secure
- The topology won’t change
function getLambdaEventSource(event) { | |
if (event.Records && event.Records[0].cf) return 'isCloudfront'; | |
if (event.configRuleId && event.configRuleName && event.configRuleArn) return 'isAwsConfig'; | |
if (event.Records && (event.Records[0].eventSource === 'aws:codecommit')) return 'isCodeCommit'; | |
if (event.authorizationToken === "incoming-client-token") return 'isApiGatewayAuthorizer'; | |
if (event.StackId && event.RequestType && event.ResourceType) return 'isCloudFormation'; |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
If you have two days to learn the very basics of modelling, Domain-Driven Design, CQRS and Event Sourcing, here's what you should do:
In the evenings read the [Domain-Driven Design Quickly Minibook]{http://www.infoq.com/minibooks/domain-driven-design-quickly}. During the day watch following great videos (in this order):
This is just a small post in response to [this tweet][tweet] by Julien Pauli (who by the way is the release manager for PHP 5.5). In the tweet he claims that objects use more memory than arrays in PHP. Even though it can be like that, it's not true in most cases. (Note: This only applies to PHP 5.4 or newer.)
The reason why it's easy to assume that objects are larger than arrays is because objects can be seen as an array of properties and a bit of additional information (like the class it belongs to). And as array + additional info > array
it obviously follows that objects are larger. The thing is that in most cases PHP can optimize the array
part of it away. So how does that work?
The key here is that objects usually have a predefined set of keys, whereas arrays don't: