Skip to content

Instantly share code, notes, and snippets.

View aditi5's full-sized avatar

Aditi Mishra aditi5

View GitHub Profile

Aws ingect logs in couldwatch. Cloudwatch is a repository service for metric data. What is a metric? time ordered set of data points.

Metric example: EC2: datapoint for every 5 minutes (CPUutilization of EC2 is metric)

In long term trends matter granular metrics matter in shorter term

  1. Bag's initial state is WIP, when Bag is created
  2. Sorter pushes packages in bags and seals bags with a bag seal
  3. Bag seal is created by a third party service.
  4. Sorter then hits HQ to do following activities:
  5. a. Create Bag in HQ
  6. b. Tell about all pkg ids to be added into the bag
  7. c. Apply bag seal on the bag provided by sorter
  8. Sorter auto bagging is done via mobile. if bag is not created by bagAPI check Device Bag Listing

PR: [#CAAS-30] initial app level code Line 124 : Container_id_list is used because we are asssociating multiple children to a container so for all those children , descendants have to be updated so we will have to push container_id of all those chidren on sqs. So for the same reason we are maintaining a list of all those children to be pushed to sqs

  • CAP theorem states that it is impossible for a distributed software system to simultaneously provide more than two out of three of the following guarantees (CAP): Consistency, Availability, and Partition tolerance. When we design a distributed system, trading off among CAP is almost the first thing we want to consider. CAP theorem says while designing a distributed system we can pick only two of the following three options:
  • Consistency: All nodes see the same data at the same time. Consistency is achieved by updating several nodes before allowing further reads.
  • Availability: Every request gets a response on success/failure. Availability is achieved by replicating the data across different servers.
  • Partition tolerance: The system continues to work despite message loss or partial failure. A system that is partition-tolerant can sustain any amount of network failure that doesn’t result in a failure of the entire network. Data is sufficiently replicated across combinations of nodes and networks to keep
@aditi5
aditi5 / redash
Last active December 18, 2019 06:28
select * from SMS_daily_report where destination_phone_number like '%8950482032%'
select *
from
(
select * from
SMS_daily_report where destination_phone_number like '%8950482032%'
) d
join

low queue have different instances(workers) m4.2xlarge

HQ ALB : Express-SDB-ALB

@aditi5
aditi5 / CORS.md
Last active October 30, 2020 16:36

1.CORS concept 2. RSS Feed which django facilitates 3. CSFR

@aditi5
aditi5 / docker.md
Last active December 23, 2019 12:24

Run docker file with custom dockerfile name:

  • sudo docker build -f workflows.Dockerfile -t workflow .

See docker images: sudo docker images

running celery worker as root is not recommended

@aditi5
aditi5 / Docke_hc_command.md
Last active December 3, 2021 08:06 — forked from cig0/Cheatsheet.md
Docker #docker
  • 1906 sudo docker container stop laughing_mestorf
  • 1907 sudo docker container rm laughing_mestorf
  • 1908 docker container ls
  • 1909 sudo -su
  • 1910 su
  • 1911 ls
  • 1912 sudo docker container ls -a
  • 1913 sudo docker container $(sudo docker container ls -q)
  • 1914 sudo docker containerrm $(sudo docker container ls -q)
  • 1915 sudo docker container rm $(sudo docker container ls -q)
  1. Urls should only have resources and not noun or verbs