Learning Material: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
No edit summary
 
(31 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 ==


* especially for Lambda functions
* especially for Lambda functions
= Graph =
We use Neo4j graph engine and Cypher query language
== references ==
* https://neo4j.com/docs/cypher-cheat-sheet/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 144: 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 ==
* 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 [[Standard LogicalResults Per Service|ProcessLogical]] and [[Standard FindData Per Service|FindData]] flows
*: eg:
*: Complex Filter flows: https://drive.google.com/drive/folders/1C3qXeTASgPKNZOSWwBfQ0KwJqOjKO4ce


= Izara Frontend =
= Izara Frontend =
Line 151: 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:

data types:

udemy:

advanced:

Learn JavaScript:

Node

npm

async/await

Git

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.

Serverless Framework (sls)

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

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

API Gateway Authorizers

Websockets

S3

Design Concepts

Race Conditions

Idempotence

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:

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