Feel free to contact me at robert.balicki@gmail.com or tweet at me @statisticsftw
This is a rough outline of how we utilize next.js and S3/Cloudfront. Hope it helps!
It assumes some knowledge of AWS.
from django.db.models import Field | |
from django.conf import settings | |
from django.utils.decorators import cached_property | |
class VirtualField(object): | |
""" | |
A virtual field, mainly used for caching and seamless computed field retrieval. | |
This acts both like a (cached) property and a virtual field if supported. | |
""" |
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
Feel free to contact me at robert.balicki@gmail.com or tweet at me @statisticsftw
This is a rough outline of how we utilize next.js and S3/Cloudfront. Hope it helps!
It assumes some knowledge of AWS.
Original Author: Rui Ueyama (creator of the mold linker)
Translated by @windowsboy111
Minimally edited by @lleyton
(still a work-in-progress)
#!/bin/sh | |
sudo yum install -y https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm | |
sudo yum install -y mysql-community-client |
#!/bin/bash | |
S3_BUCKET_NAME=$1 | |
CF_ID=$2 | |
# Sync all files except for service-worker and index | |
echo "Uploading files to $S3_BUCKET_NAME..." | |
aws s3 sync build s3://$S3_BUCKET_NAME/ \ | |
--acl public-read \ | |
--exclude service-worker.js \ |
--- | |
AWSTemplateFormatVersion: '2010-09-09' | |
Description: Sample template that contains a Lambda function behind an API GW | |
Resources: | |
# BEGIN: Should only need this in an empty API Gateway situation | |
ApiGatewayCloudWatchLogsRole: | |
Type: AWS::IAM::Role | |
Properties: | |
AssumeRolePolicyDocument: | |
Version: '2012-10-17' |
Node.js offers a great environment for building ETL scripts. This is because Node is very easy to program and work with, AND has interface libraries for almost everything under the sun.
We need a framework that makes writing ETL scripts easy:
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000