Skip to content

Commit

Permalink
ADD: monitor and shopify.
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesBonddu committed Apr 17, 2020
1 parent 82825fa commit 8bbfdd5
Show file tree
Hide file tree
Showing 9 changed files with 238 additions and 2 deletions.
31 changes: 31 additions & 0 deletions Q&A/监控规则.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

# 业务规则

参考:

https://liqiang.io/post/understanding-the-delays-on-prometheus-alerting-89dd7269

https://tech.meituan.com/2017/12/04/logictree.html

https://tech.meituan.com/2017/11/03/dsmf.html

# 数据指标

https://ahrefs.com/blog/zh/seo-metrics/

https://analysys.gitbook.io/ark/features/analytics/event

https://insights.thoughtworks.cn/data-quality-management/

https://prometheus.io/docs/concepts/metric_types/

http://bigsec.com/bigsec-news/wechat-2017510-monitor


https://ci.apache.org/projects/flink/flink-docs-release-1.10/monitoring/metrics.html

http://peter.bourgon.org/blog/2017/02/21/metrics-tracing-and-logging.html

https://lists.cncf.io/g/cncf-opentelemetry-community/subgroups

https://landing.google.com/sre/resources/practicesandprocesses/art-of-slos/
25 changes: 25 additions & 0 deletions 常用命令/系统常用命令/常用工具命令.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,28 @@ https://unix.stackexchange.com/questions/162900/what-is-this-folder-run-user-100
chmod a+rwxt /tmp

https://unix.stackexchange.com/questions/277387/tab-completion-errors-bash-cannot-create-temp-file-for-here-document-no-space

## each day shell

```sh
#!/bin/bash

# slightly malformed input data
input_start=2020-03-01
input_end=2020-03-31

# After this, startdate and enddate will be valid ISO 8601 dates,
# or the script will have aborted when it encountered unparseable data
# such as input_end=abcd
startdate=$(date -I -d "$input_start") || exit -1
enddate=$(date -I -d "$input_end") || exit -1

d="$startdate"
while [ "$d" != "$enddate" ]; do
echo $d
prev=$d
d=$(date -I -d "$d + 3 day")
cur=$d
echo "path; pipenv run python manage.py xxx --start=${prev} --end=${cur} 2>&1|tee ~/xxx${prev}=${cur}.log &"
done
```
20 changes: 20 additions & 0 deletions 常见协议/HTTP/缓存机制/cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,23 @@ https://stackoverflow.com/questions/40992000/what-is-a-strong-etag
https://support.cloudflare.com/hc/en-us/articles/218505467-Does-CloudFlare-support-ETag-headers-

https://www.cnblogs.com/findumars/p/5745345.html


## Timeout

https://stackoverflow.com/questions/48105448/python-http-server-client-remote-end-closed-connection-without-response-error


https://blog.csdn.net/zdwzzu2006/article/details/7713499


https://stackoverflow.com/questions/15912370/how-do-i-remove-a-close-wait-socket-connection


https://superuser.com/questions/173535/what-are-close-wait-and-time-wait-states


https://stackoverflow.com/questions/13018981/poll-system-call-timeout


https://stackoverflow.com/questions/1150635/unix-nonblocking-i-o-o-nonblock-vs-fionbio
16 changes: 16 additions & 0 deletions 数据库/Redis/redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,19 @@ flushall
主从复制
简单事务控制
参考资料:
https://redislabs.com/redis-enterprise/redis-time-series/
https://redislabs.com/redis-best-practices/
https://redisbook.readthedocs.io/en/latest/index.html
https://juejin.im/post/5d86cf7f6fb9a06b211724e7
https://stackoom.com/question/2zJ72/%E5%9C%A8%E5%88%86%E5%B1%82%E6%95%B0%E6%8D%AE%E6%A8%A1%E5%9E%8B%E4%B8%AD%E4%BD%BF%E7%94%A8Redis%E8%BF%9B%E8%A1%8C%E5%A4%8D%E5%90%88%E7%B4%A2%E5%BC%95
https://stackoverflow.com/questions/44164152/composite-indexing-using-redis-in-a-hierarchical-data-model
9 changes: 9 additions & 0 deletions 数据库/mysql/mysql.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,12 @@ https://leokongwq.github.io/2017/07/06/mysql-deadlock-detection.html
https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html

https://www.aneasystone.com/archives/2018/04/solving-dead-locks-four.html


## 放置数据重复读写

参考:

https://cloud.tencent.com/developer/news/458227

https://juejin.im/post/5d7108abe51d453b753a1b37
16 changes: 14 additions & 2 deletions 编程模式/编程模式.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 编程模式

## MVC
## MVC
Smalltalk提出的 Model View Controller

## 事件驱动
Expand All @@ -13,4 +13,16 @@ Smalltalk提出的 Model View Controller

参考:

[事件驱动机制](https://www.jianshu.com/p/d4e591465ef3)
[事件驱动机制](https://www.jianshu.com/p/d4e591465ef3)


https://sourcemaking.com/design_patterns/strategy/python/1

https://www.giacomodebidda.com/strategy-pattern-in-python/


https://refactoringguru.cn/design-patterns/strategy/python/example

https://www.cs.uic.edu/~jbell/CourseNotes/OO_SoftwareEngineering/MappingModels.html

https://stackoverflow.com/questions/3302956/design-pattern-options-for-same-return-object-but-different-enum-type-value-and
14 changes: 14 additions & 0 deletions 编程语言/Python/Django/django.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,17 @@ https://docs.djangoproject.com/en/3.0/topics/logging/


https://pycoders-weekly-chinese.readthedocs.io/en/latest/issue8/Notes-on-tracing-code-execution-in-Django-and-Python.html

## django migrations如何检测变化

https://realpython.com/digging-deeper-into-migrations/

https://realpython.com/django-migrations-a-primer/


https://stackoverflow.com/questions/1355150/when-saving-how-can-you-check-if-a-field-has-changed


## django queryset manager

https://simpleisbetterthancomplex.com/tips/2016/08/16/django-tip-11-custom-manager-with-chainable-querysets.html
97 changes: 97 additions & 0 deletions 资源/shopify.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
Shopify
API工具及开发者社区

shopify开发者工具
https://shopify.dev/tools/graphiql-admin-api

shopify开发者社区
https://help.shopify.com/en/partners/getting-started/walkthrough#step-1-learn-about-the-program

shopify开发资源清单
https://www.shopify.ca/partners/blog/the-essential-list-of-resources-for-shopify-app-development

shopify开发者博客
https://www.shopify.ca/partners/blog/topics/shopify-api

API版本报告弃用做法
https://shopify.dev/concepts/about-apis/versioning

API健康报告
https://shopify.dev/concepts/about-apis/versioning/api-health

shopify通过物流和退款把控供应链
https://www.shopify.ca/partners/blog/shopify-locations-developers

Shopify API Unite
https://www.shopify.ca/partners/blog/shopify-api-unite-2019

API查询成本(漏斗算法用于api节流限制)
https://shopify.dev/concepts/about-apis/rate-limits
https://en.wikipedia.org/wiki/Leaky_bucket
GraphQL的好处
https://shopify.dev/concepts/graphql/benefits

https://www.shopify.ca/partners/blog/shopify-graphql-learning-kit

调用graph ql的工具
https://insomnia.rest/

API版本更新:

https://shopify.dev/tutorials/update-your-app-to-a-new-api-version

https://shopify.dev/changelog

shopify的APP应用
根据您的应用程序的用途以及发行或销售方式,首先需要选择要构建的应用程序类型。创建应用后,无法更改应用类型,因此请确保您了解每种类型的不同功能和要求。共有三种应用类型:
- 公开应用
- 自定义应用
- 私人应用

公开应用
公开应用程序适用于希望将其应用程序分发给许多商人的开发人员。这些是公共应用程序的关键功能:
- 它们可以安装在多个Shopify商店中
- 他们必须通过Shopify的应用批准流程
- 您可以在Shopify App Store中出售它们
- 他们使用OAuth 2.0管理身份验证
- 它们是在您的合作伙伴信息中心中创建和管理的
- 他们可以使用Shopify App Bridge在Shopify管理员中显示为嵌入式应用程序
- 他们可以使用应用程序扩展来扩展Shopify管理界面
- 他们必须将某些客户数据与Shopify同步,如API使用条款中所述
教程:使用OAuth对公共应用进行身份验证
自定义应用
自定义应用程序适用于开发人员构建针对单个商家的应用程序。这些是自定义应用程序的关键功能:
- 它们可以安装在单个Shopify商店中
- 他们没有通过Shopify的应用批准流程
- 您不能在Shopify App Store中出售它们
- 您不能使用Billing API向商家收费
- 他们使用OAuth 2.0管理身份验证
- 它们是在您的合作伙伴信息中心中创建和管理的
- 他们可以使用Shopify App Bridge在Shopify管理员中显示为嵌入式应用程序
- 他们可以使用应用程序扩展来扩展Shopify管理界面
教程:使用OAuth验证自定义应用
私人应用
开发人员仍然可以创建私人应用程序,但是推荐使用自定义应用程序。
私人应用程序是指开发人员为商家开发的应用程序,而这些应用程序具有特定要求,而自定义应用程序无法满足这些要求。这些是私人应用程序的关键功能:
- 它们是为单个Shopify商店或一小部分客户创建的
- 他们没有通过Shopify的应用批准流程
- 您不能在Shopify App Store中出售它们
- 使用基本HTTP身份验证管理身份验证
- 它们是在商家的Shopify管理员中创建和管理的
教程:使用Shopify管理员对私人应用进行身份验证


私人应用的验证方式
https://shopify.dev/concepts/about-apis/authentication

创建私人程序的步骤
https://help.shopify.com/en/manual/apps/private-apps

Embedded sdk
https://shopify.dev/tools/embedded-app-sdk/getting-started

Webhook
https://shopify.dev/docs/admin-api/rest/reference/events/webhook


https://hevodata.com/blog/shopify-to-bigquery/
12 changes: 12 additions & 0 deletions 运维/GCP/cloudlogging.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

参考:


https://cloud.google.com/logging/docs/api/tasks/exporting-logs#logging-list-sinks-python

https://stackoverflow.com/questions/54263701/using-yaml-file-to-setup-gcp-cloud-logging


https://medium.com/google-cloud/writing-developer-logs-with-google-cloud-logging-484016c05e16

https://stackoverflow.com/questions/59827670/stackdriver-logging-agent-not-showing-logs-read-from-a-custom-log-file-in-stackd

0 comments on commit 8bbfdd5

Please sign in to comment.