Learning Material: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(30 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
= Terminal = | |||
* Basic commands to learn: | |||
** ls | |||
** ls -l | |||
** cd | |||
= VSCode = | |||
* Creating a VSCode project | |||
* Adding folders to a project | |||
= Javascript = | = Javascript = | ||
Use Node environment to learn javascript, will need to change "alert" to "console.log", and browser objects like "document." will not be available | Use Node environment to learn javascript, will need to change "alert" to "console.log", and browser objects like "document." will not be available | ||
Programs to install: | |||
* Node (install using NVM is best) | |||
* Serverless Framework | |||
* NPM | |||
* We use MS Visual Studio Code IDE | |||
coding basics: | coding basics: | ||
Line 14: | Line 32: | ||
* https://javascript.info/function-expressions | * https://javascript.info/function-expressions | ||
* https://javascript.info/javascript-specials | * https://javascript.info/javascript-specials | ||
* timestamps | * timestamps: | ||
* try/catch/finally blocks | ** https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date | ||
** https://www.toptal.com/software/definitive-guide-to-datetime-manipulation | |||
** https://linuxhint.com/convert-timestamp-to-date-format-javascript/ | |||
* try/catch/finally blocks: | |||
** https://www.programiz.com/javascript/try-catch-finally | |||
** https://www.javascripttutorial.net/javascript-try-catch-finally/ | |||
* environment variables | * environment variables | ||
* validating function params or external data before use | * validating function params or external data before use | ||
Line 33: | Line 56: | ||
* https://javascript.info/date | * https://javascript.info/date | ||
* https://javascript.info/json | * https://javascript.info/json | ||
udemy: | |||
* https://www.udemy.com/course/the-complete-web-developer-zero-to-mastery/learn/lecture/8670646#overview | |||
* https://www.udemy.com/course/the-complete-web-developer-zero-to-mastery/learn/lecture/8691770#overview | |||
* https://www.udemy.com/course/the-complete-web-developer-zero-to-mastery/learn/lecture/9427570#overview | |||
advanced: | advanced: | ||
Line 38: | Line 66: | ||
* https://javascript.info/garbage-collection | * https://javascript.info/garbage-collection | ||
* https://javascript.info/object-methods | * https://javascript.info/object-methods | ||
Learn JavaScript: | |||
*Full Course for Beginners | |||
** https://youtu.be/PkZNo7MFNFg?si=nZ38vcL20b0gsjUc | |||
= Node = | = Node = | ||
Line 44: | Line 76: | ||
== npm == | == npm == | ||
* https://www.geeksforgeeks.org/node-js-npm-node-package-manager/ | |||
== async/await == | == async/await == | ||
* https://www.programiz.com/javascript/async-await | |||
* (not as important as we normally use async/await) https://www.programiz.com/javascript/promise | |||
= Git = | = Git = | ||
* https://support.atlassian.com/bitbucket-cloud/docs/log-into-or-connect-to-bitbucket-cloud/ | |||
* https://www.atlassian.com/git/tutorials/learn-git-with-bitbucket-cloud | * https://www.atlassian.com/git/tutorials/learn-git-with-bitbucket-cloud | ||
* https://www.atlassian.com/git/tutorials/setting-up-a-repository | * https://www.atlassian.com/git/tutorials/setting-up-a-repository | ||
Line 60: | Line 98: | ||
AWS offers a free tier, you can create an account and use most services at a limited level for free for one year, then cancel the account (or stop all services) before the year is over. | AWS offers a free tier, you can create an account and use most services at a limited level for free for one year, then cancel the account (or stop all services) before the year is over. | ||
* AWS overview: | |||
** https://www.udemy.com/course/aws-serverless-a-complete-introduction/learn/lecture/7275232#overview | |||
== Serverless Framework (sls) == | == Serverless Framework (sls) == | ||
* https://www.udemy.com/course/serverless-framework/learn/lecture/19420504#overview | |||
* https://www.serverless.com/framework/docs | * https://www.serverless.com/framework/docs | ||
* We use the Serverless Framework to deploy AWS resources | * We use the Serverless Framework to deploy AWS resources | ||
Line 78: | Line 119: | ||
* Understand how partition(hash) and sort(range) keys work, why they are used | * Understand how partition(hash) and sort(range) keys work, why they are used | ||
* https://www.udemy.com/course/aws-serverless-a-complete-introduction/learn/lecture/7221150#overview | |||
=== Pagination === | === Pagination === | ||
Line 107: | Line 149: | ||
== S3 == | == S3 == | ||
* https://iamgique.medium.com/aws-s3-คืออะไร-ฉบับ-เข้าใจง่ายใน-2-นาที-648012fd7268 | |||
= Design Concepts = | = Design Concepts = | ||
== Race Conditions == | == Race Conditions == | ||
* https://www.techtarget.com/searchstorage/definition/race-condition | |||
== Idempotence == | == Idempotence == | ||
Line 120: | Line 166: | ||
== Microservices == | == Microservices == | ||
* https://microservices.io/patterns/microservices.html | |||
== Middleware == | == Middleware == | ||
Line 134: | Line 182: | ||
* https://neo4j.com/docs/cypher-refcard/current/ | * https://neo4j.com/docs/cypher-refcard/current/ | ||
* https://www.tutorialspoint.com/neo4j/neo4j_quick_guide.htm | |||
** Basic node relationship | |||
** Cypher Query Language | |||
*** eg:MATCH,WHERE,MERGE,RETURN | |||
** Neo4j CQL - Creating Nodes | |||
*** Create Node with Properties | |||
*** Returning the Created Node | |||
** Neo4j CQL - Creating a Relationship | |||
*** Creating Relationships | |||
** Neo4j - Return Clause | |||
*** Return nodes | |||
*** Return multiple nodes | |||
= Izara Backend = | = Izara Backend = | ||
Line 154: | Line 214: | ||
* [[Idempotence and Race Conditions]] | * [[Idempotence and Race Conditions]] | ||
* [[Standard Config Table Per Service]] | * [[Standard Config Table Per Service]] | ||
* [[Stored Cache]] | |||
* [[Triggered Cache]] | |||
== Start Project Guide == | |||
step to setup your work | |||
* [[start project]] | |||
== Tasks == | == Tasks == | ||
Line 161: | Line 227: | ||
*: sample in Empty Service Template | *: sample in Empty Service Template | ||
* Create 3 Lambda functions LambdaA posts to an SNS topic, LambdaB and LambdaC each have an SQS with Lambda triggers that subscribe to SNS and invoke when LambdaA posts | * Create 3 Lambda functions LambdaA posts to an SNS topic, LambdaB and LambdaC each have an SQS with Lambda triggers that subscribe to SNS and invoke when LambdaA posts | ||
*: eg: | *: eg: see ComplexFilter service, LambdaFunction: LogicalServiceResponse sends message to OutFilterComplete, which triggers LambdaFunction: ChildComplexFilterComplete (subscribes to OutFilterComplete). See: | ||
** Resource: sns-out.yml: outFilterComplete | |||
** Resource: sns-in-sqs.yml: (create Subscription in service) SNSSubscriptionMessageOutFilterComplete, Endpoint = ChildComplexFilterComplete | |||
** App: function.yml: ChildComplexFilterCompleteHdrSqs, iamRoleStatements: Action = SNS:Publish / Resource = OutFilterComplete | |||
* Create Lambda and API Gateway using http event, use Postman to send request from client to backend Lambda via API Gateway | * Create Lambda and API Gateway using http event, use Postman to send request from client to backend Lambda via API Gateway | ||
*: eg: | *: using Serverless http event for Lambda function | ||
*: [[Using Postman]] to send request from client to backend Lambda via API Gateway (can skip Authorizer) | |||
*: eg: https://bitbucket.org/stb_working/empty-service-template/src/development/ | |||
** lambda Api | |||
** createConfig | |||
** getConfig | |||
** queryConfig | |||
** updateConfig | |||
** deleteConfig | |||
* Try to understand Complex Filter / Search Result / Sort Result flow | * Try to understand Complex Filter / Search Result / Sort Result flow | ||
*: including [[Standard LogicalResults Per Service|ProcessLogical]] and [[Standard FindData Per Service|FindData]] flows | *: including [[Standard LogicalResults Per Service|ProcessLogical]] and [[Standard FindData Per Service|FindData]] flows | ||
*: eg: | *: eg: | ||
*: Complex Filter flows: https://drive.google.com/drive/folders/1C3qXeTASgPKNZOSWwBfQ0KwJqOjKO4ce | |||
= Izara Frontend = | = Izara Frontend = | ||
Line 174: | Line 252: | ||
== Microfrontends == | == Microfrontends == | ||
* Single-SPA | |||
** https://single-spa.js.org/ | |||
* see messy notes and references at [[2021-01-31 - Micro Frontends]] | * see messy notes and references at [[2021-01-31 - Micro Frontends]] |
Latest revision as of 08:59, 26 March 2024
Terminal
- Basic commands to learn:
- ls
- ls -l
- cd
VSCode
- Creating a VSCode project
- Adding folders to a project
Javascript
Use Node environment to learn javascript, will need to change "alert" to "console.log", and browser objects like "document." will not be available
Programs to install:
- Node (install using NVM is best)
- Serverless Framework
- NPM
- We use MS Visual Studio Code IDE
coding basics:
- https://javascript.info/variables
- https://javascript.info/types
- https://javascript.info/operators
- https://javascript.info/comparison
- https://javascript.info/ifelse
- https://javascript.info/switch
- https://javascript.info/logical-operators
- https://javascript.info/function-basics
- https://javascript.info/function-expressions
- https://javascript.info/javascript-specials
- timestamps:
- try/catch/finally blocks:
- environment variables
- validating function params or external data before use
data types:
- https://javascript.info/data-types
- https://javascript.info/number
- https://javascript.info/string
- https://javascript.info/array
- https://javascript.info/array-methods
- https://javascript.info/map-set
- https://javascript.info/keys-values-entries
- https://javascript.info/date
- https://javascript.info/json
udemy:
- https://www.udemy.com/course/the-complete-web-developer-zero-to-mastery/learn/lecture/8670646#overview
- https://www.udemy.com/course/the-complete-web-developer-zero-to-mastery/learn/lecture/8691770#overview
- https://www.udemy.com/course/the-complete-web-developer-zero-to-mastery/learn/lecture/9427570#overview
advanced:
- https://javascript.info/modules
- https://javascript.info/garbage-collection
- https://javascript.info/object-methods
Learn JavaScript:
- Full Course for Beginners
Node
npm
async/await
- https://www.programiz.com/javascript/async-await
- (not as important as we normally use async/await) https://www.programiz.com/javascript/promise
Git
- https://support.atlassian.com/bitbucket-cloud/docs/log-into-or-connect-to-bitbucket-cloud/
- https://www.atlassian.com/git/tutorials/learn-git-with-bitbucket-cloud
- https://www.atlassian.com/git/tutorials/setting-up-a-repository
- https://www.atlassian.com/git/tutorials/saving-changes
- https://www.atlassian.com/git/tutorials/git-ssh
How we use git in Izara:
AWS
AWS offers a free tier, you can create an account and use most services at a limited level for free for one year, then cancel the account (or stop all services) before the year is over.
- AWS overview:
Serverless Framework (sls)
- https://www.udemy.com/course/serverless-framework/learn/lecture/19420504#overview
- https://www.serverless.com/framework/docs
- We use the Serverless Framework to deploy AWS resources
- We do not use the Serverless hosted dashboard
- Learn the basic concepts of Serverless Framework but do not need to learn everything, we use only some elements of the framework and have a standard template for the AWS resources we use
Lambda
Lambda container persistence
- Lambda environments are not discarded after each use, they can be reused for multiple invocations
- We can use this to maintain global variables, such as database connections
DynamoDB
- Understand how partition(hash) and sort(range) keys work, why they are used
- https://www.udemy.com/course/aws-serverless-a-complete-introduction/learn/lecture/7221150#overview
Pagination
- If there is the chance a query can return a large amount of data we need to paginate query results
- Receive a subset of all results and process them, then eg re-invoke the Lambda to process the next set of results
- messy notes: 2021-05-03 - DynamoDB pagination
SNS
SQS
SNS/SQS Message delivery
SQS Batch processing
API Gateway
API Gateway Authorizer Lambda Functions
Websockets
S3
Design Concepts
Race Conditions
Idempotence
- messy notes: 2021-05-03 Idempotence ideas
- some notes about idempotent Lambda processing: 2020-11-28 - Handling Message Batches from SQS Queues
Immutable Data
Microservices
Middleware
- especially for Lambda functions
Graph
We use Neo4j graph engine and Cypher query language
references
- https://www.tutorialspoint.com/neo4j/neo4j_quick_guide.htm
- Basic node relationship
- Cypher Query Language
- eg:MATCH,WHERE,MERGE,RETURN
- Neo4j CQL - Creating Nodes
- Create Node with Properties
- Returning the Created Node
- Neo4j CQL - Creating a Relationship
- Creating Relationships
- Neo4j - Return Clause
- Return nodes
- Return multiple nodes
Izara Backend
Services to study
Project Concepts
Information in the below pages should be understood before developing:
- Repository structure
- Syntax - Backend services
- Remote repository and workspace structure
- Communication between services
- Lambda handler functions
- Idempotence and Race Conditions
- Standard Config Table Per Service
- Stored Cache
- Triggered Cache
Start Project Guide
step to setup your work
Tasks
- Start working with Serverless Framework and our Empty Service Template to deploy resources to AWS
- Create a Lambda and DynamoDB table using iamRoleStatements to allow the Lambda to perform queries on Dynamo table
- sample in Empty Service Template
- Create 3 Lambda functions LambdaA posts to an SNS topic, LambdaB and LambdaC each have an SQS with Lambda triggers that subscribe to SNS and invoke when LambdaA posts
- eg: see ComplexFilter service, LambdaFunction: LogicalServiceResponse sends message to OutFilterComplete, which triggers LambdaFunction: ChildComplexFilterComplete (subscribes to OutFilterComplete). See:
- Resource: sns-out.yml: outFilterComplete
- Resource: sns-in-sqs.yml: (create Subscription in service) SNSSubscriptionMessageOutFilterComplete, Endpoint = ChildComplexFilterComplete
- App: function.yml: ChildComplexFilterCompleteHdrSqs, iamRoleStatements: Action = SNS:Publish / Resource = OutFilterComplete
- Create Lambda and API Gateway using http event, use Postman to send request from client to backend Lambda via API Gateway
- using Serverless http event for Lambda function
- Using Postman to send request from client to backend Lambda via API Gateway (can skip Authorizer)
- eg: https://bitbucket.org/stb_working/empty-service-template/src/development/
- lambda Api
- createConfig
- getConfig
- queryConfig
- updateConfig
- deleteConfig
- Try to understand Complex Filter / Search Result / Sort Result flow
- including ProcessLogical and FindData flows
- eg:
- Complex Filter flows: https://drive.google.com/drive/folders/1C3qXeTASgPKNZOSWwBfQ0KwJqOjKO4ce
Izara Frontend
React
Microfrontends
- Single-SPA
- see messy notes and references at 2021-01-31 - Micro Frontends