Guides, resources, notes, docs and knowledge for everything Oscar.
Tagsnpm install -g parse-server mongodb-runner
If MongoDb fails, download MongoDb.
set PATH=%PATH%;C:/Program Files/MongoDB/Server/3.2/bin/
"C:\Program Files\MongoDB\Server\3.4\bin\mongod.exe" --dbpath "d:\test\mongo db data"
"C:\Program Files\MongoDB\Server\3.4\bin\mongo.exe
Referencing on the one-side, many-side or both?
Denormalize fields into the one or many side
Updating denormalized values are slower, more expensive and not atomic.
Two-way referencing
Requires two updates
Embedded vs referencing
Embedding is better for…
Small subdocuments
Data that does not change regularly
When eventual consistency is acceptable
Documents that grow by a small amount
Data that you’ll often need to perform a second query to fetch Fast reads
References are better for…
Large subdocuments
Volatile data
When immediate consistency is necessary
Documents that grow a large amount
Data that you’ll often exclude from the results
Fast writes
https://stackoverflow.com/a/27247579/6131896
A blog post has many comments
A comment can only belong to one blog post
Customer has many orders
Should the objects on the many side be accessed separately or only in the context of the parent object?
What is the ratio of updates to reads for a particular field?
Array of embedded documents
< 100 documents
Array of pointers or part-reference on the many-side
> 100 documents
Use parent-reference on the many-side
Comment
Query for all comments…
“Get all comments where post is blog post X”
Query for post that a comment belongs to
…
BlogPost
Query for all comments
Query for blog post that comment belongs to
Users following each other
Students and teachers
Sales persons and Accounts
If the relationships requires meta-data, use join tables otherwise Parse Relation
Create…
Query all accounts for a gien person
Query all persons for a given account
When meta-data is required for the relationships
Users following users
Creating…
Querying does Bob follow Eve…
Name | Database storage | Requests/second | Price | Notes |
---|---|---|---|---|
Back4App | 0.5 GB | 10 | Free | 1 Cloud code job |
Buddy | ? | 30 | Free | $100 USD per additional 10 rps per month |
Heroku | 10K rows | ? | Free | - |
Google Cloud Platform | ? | ? | ? | - |
Red Hat OpenShift Online | 1GiB | 1GiB Memory | Free | - |
Name | Database storage | Price | Notes |
---|---|---|---|
mLab | 0.5 GB | Free | - |
Command | Description |
---|---|
configure accountkey |
Configure account to use |
new |
Create a new app or add cloud code to an existing app |
deplpy |
Deploy code |
list |
View all linked apps |
develop <App Name> |
Watch for any updates, deploy them and see live stream of Cloud Code logs. |
Resources