精进之路  

2023年3月15日

摘要: Fastify 中一个核心概念是封装上下文(encapsulating context). 它决定哪些 decorators, plugins, hooks 对什么 routes 可见。通过 fastifyInstance.register() 方法注册的插件,就对应于一个独立的上下文。默认情况下, 阅读全文
posted @ 2023-03-15 14:52 Optimus_Prime 阅读(49) 评论(0) 推荐(0) 编辑

2022年10月19日

摘要: $$X=\left( \begin{matrix} x_{11} & x_{12} & \cdots & x_{1d}\ x_{21} & x_{22} & \cdots & x_{2d}\ \vdots & \vdots & \ddots & \vdots\ x_{m1} & x_{m2} & \ 阅读全文
posted @ 2022-10-19 00:52 Optimus_Prime 阅读(22) 评论(0) 推荐(0) 编辑

2022年10月6日

摘要: 如何避免 burnout 阅读摘要 of: The Silent Killer Of Too Many Software Engineer Careers: Burnout Burnout 的原因以及应对办法 No boundaries 工作永远是做不完的,很容易陷入 burnout. 可以通过人为 阅读全文
posted @ 2022-10-06 01:56 Optimus_Prime 阅读(27) 评论(0) 推荐(0) 编辑

2022年9月5日

摘要: 相关概念 edge proxy / front proxy cluster listener filter filter chain data plane control plane 参考 Envoy 基础教程:入门篇 使用 Envoy 作为前端代理 在 Kubernetes 中使用 Envoy M 阅读全文
posted @ 2022-09-05 01:35 Optimus_Prime 阅读(4) 评论(0) 推荐(0) 编辑

2022年8月29日

摘要: apollo 的 plugin 是在 apollo server 启动时候注册的,其形态是一个 js object. 在其中,可以通过 key 指定针对不同事件阶段的自定义处理函数。 events 其实是 apollo 处理请求的 life cycle 中的一系列时间点上触发的。这里既有 pre h 阅读全文
posted @ 2022-08-29 02:20 Optimus_Prime 阅读(41) 评论(0) 推荐(0) 编辑
 
摘要: GraphQL 的 directive 有点类似 typescript 的 decorator. 可以被附加在 schema 中的各个地方(通过 location 来定义可以用在哪里),如 type, field, fragment, mutation, input 等等。 其实现的基本方式,是继承 阅读全文
posted @ 2022-08-29 01:08 Optimus_Prime 阅读(112) 评论(0) 推荐(0) 编辑

2022年8月8日

摘要: How Netflix Scales its API with GraphQL Federation (Part 1) https://netflixtechblog.com/how-netflix-scales-its-api-with-graphql-federation-part-1-ae35 阅读全文
posted @ 2022-08-08 02:11 Optimus_Prime 阅读(85) 评论(0) 推荐(0) 编辑

2022年7月23日

摘要: Using DOM like a Pro 关于元素选择器函数 querySelector 和 querySelectorAll. 首先,这2个函数不一定要通过 document 执行,而且可以通过任意元素去执行,实现相对搜索。 还可以为此2函数创建别名: const $ = document.que 阅读全文
posted @ 2022-07-23 23:26 Optimus_Prime 阅读(23) 评论(0) 推荐(0) 编辑

2022年7月20日

摘要: 失败的尝试 本来打算使用 elasticsearch 以及 kibana 的官方镜像自己配置的,当前的 latest 版本为 8.3.2. 但是稍作尝试后发现,kibana 要连接到 elasticsearch 还是比较麻烦的,虽然使用了 token 以及按照界面提示获取了 verification 阅读全文
posted @ 2022-07-20 02:36 Optimus_Prime 阅读(67) 评论(0) 推荐(0) 编辑

2022年7月17日

摘要: CSS Modules 是管理 css 的另一种方式。 它默认 css 文件中定义的所有 class names 都是 local 的,并且会通过 webpack loader 等方式进行转换,使之变成 namespaced,从而避免运行时 class name 的重复。 阅读全文
posted @ 2022-07-17 02:13 Optimus_Prime 阅读(21) 评论(0) 推荐(0) 编辑