Watchdogs in OpenFaaS

Classic Watchdog OpenFaaS 的 Classic Watchdog 是一个用于处理无服务器(Serverless)函数请求的核心组件。它是 OpenFaaS 的默认函数执行器,用于在容器内运行用户定义的函数代码,并通过 HTTP 请求与外部进行通信。 工作原理 Classic Watchdog 主要负责以下任务: 启动函数: 当容器启动时,Classic Watchdog 会启动并监听 HTTP 端口。 它会执行用户提供的函数代码,通过 exec 启动一个新的进程运行函数。 处理请求: Classic Watchdog 监听指定端口上的 HTTP 请求。 当收到请求时,它会将请求的内容传递给函数进程,并等待函数的响应。 返回响应: 函数进程处理请求后,将结果返回给 Classic Watchdog。 Classic Watchdog 将函数的响应封装成 HTTP 响应,并返回给调用方。 A tiny web-server or shim that forks your desired process for every incoming HTTP request Every function needs to embed this binary and use it as its ENTRYPOINT or CMD, in effect it is the init process for your container. Once your process is forked the watchdog passses in the HTTP request via stdin and reads a HTTP response via stdout. This means your process does not need to know anything about the web or HTTP. ...

August 25, 2024 · 7 min · KKKZOZ

A Piece Of: Logs

Log Levels Log levels for software applications have a rich history dating back to the 1980s. One of the earliest and most influential logging solutions for Unix systems, Syslog, introduced a range of severity levels, which provided the first standardized framework for categorizing log entries based on their impact or urgency. The following are the levels defined by Syslog in descending order of severity: Emergency (emerg): indicates that the system is unusable and requires immediate attention. Alert (alert): indicates that immediate action is necessary to resolve a critical issue. Critical (crit): signifies critical conditions in the program that demand intervention to prevent system failure. Error (error): indicates error conditions that impair some operation but are less severe than critical situations. Warning (warn): signifies potential issues that may lead to errors or unexpected behavior in the future if not addressed. Notice (notice): applies to normal but significant conditions that may require monitoring. Informational (info): includes messages that provide a record of the normal operation of the system. Debug (debug): intended for logging detailed information about the system for debugging purposes. The specific log levels available to you may defer depending on the programming language, logging framework, or service in use. However, in most cases, you can expect to encounter levels such as FATAL, ERROR, WARN, INFO, DEBUG, and TRACE. ...

May 13, 2024 · 5 min · KKKZOZ

Data Management in Microservices: State of the Practice, Challenges, and Research Directions

FAQ What is polyglot persistence principle? Polyglot Persistence is a term coined by Martin Fowler and Pramod Sadalage to describe the concept of using different data storage technologies to handle varying data storage needs within a given application. The principle behind polyglot persistence is that no single database can serve all needs of a modern application. Different kinds of data are best dealt with different types of databases. For example, you might use a relational database such as MySQL for transaction data, a NoSQL document store like MongoDB for semi-structured data, and a graph database like Neo4j for relationships between entities. Instead of trying to make one data storage technology work for all types of data, you use the type of database that is best suited for each particular need. This approach can result in a system that’s more scalable, performant, and easier to work with. Polyglot Persistence represents a shift away from the traditional, one-size-fits-all database strategy, allowing for a more flexible and optimized approach to data management. ...

April 15, 2024 · 5 min · KKKZOZ

Transaction Anomalies

Non-Repeatable Read A non-repeatable read occurs, when during the course of a transaction, a row is retrieved twice and the values within the row differ between reads. Phantom Read A phantom read occurs when, in the course of a transaction, two identical queries are executed, and the collection of rows returned by the second query is different from the first. Read Skew Read skew is that with two different queries, a transaction reads inconsistent data because between the 1st and 2nd queries, other transactions insert, update or delete data and commit. Finally, an inconsistent result is produced by the inconsistent data. ...

March 31, 2024 · 2 min · KKKZOZ

Paper Note: Taking Omid to the Clouds: Fast, Scalable Transactions for Real-Time Cloud Analytics

Designing a TPS for clouds will meet these challenges: Diverse functionality. The concept of translytics as “a unified and integrated data platform that supports multi-workloads such as transactional, operational, and analytical simultaneously in realtime, … and ensures full transactional integrity and data consistency”. Scale Cloud-first data platforms are designed to scale well beyond the limits of a single application. Latency With the thrust into new interactive domains like social networks, messaging and algorithmic trading,latency becomes essential. Multi-tenancy Maintaining access rights is therefore an important design consideration for TPSs. 论文的工作集中于以下几点: ...

March 25, 2024 · 2 min · KKKZOZ