Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions docs/_meta.en.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
{
"*": {
"type": "page"
},
"index": {
"title": "Home",
"type": "page",
"theme": {
"typesetting": "article"
}
},
"documentation": {
"title": "Documentation",
"type": "page"
"title": "Documentation"
},
"blogs": {
"title": "Blog",
"type": "page"
"theme": {
"typesetting": "article"
}
},
"dev_guide": {
"title": "Developer's Guide",
"type": "page"
"title": "Developer's Guide"
}
}
14 changes: 8 additions & 6 deletions docs/_meta.zh-CN.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
{
"*": {
"type": "page"
},
"index": {
"title": "首页",
"type": "page",
"theme": {
"typesetting": "article"
}
},
"documentation": {
"title": "文档",
"type": "page"
"title": "文档"
},
"blogs": {
"title": "博客",
"type": "page"
"theme": {
"typesetting": "article"
}
},
"dev_guide": {
"title": "开发者指南",
"type": "page"
"title": "开发者指南"
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
title: Rethinking a Cloud-Native Application Development Paradigm
date: 2023-12-27
description: The existing development model for cloud-native applications encounters challenges in the FaaS environment. This article introduces a novel development paradigm, "Monolithic Programming, Compile-Time Splitting, and Distributed Execution," with the objective of streamlining cloud application development, and improving development efficiency. The concept entails utilizing a compiler to automatically split monolithic application code, enabling distributed execution on cloud infrastructure.
---

# Rethinking a Cloud-Native Application Development Paradigm
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
title: 云原生应用开发模式的一个构想
date: 2023-12-27
description: 当前云原生应用的开发模式在 FaaS 环境下存在挑战,这里提出一种开发模式构想:“单体式编程,编译时拆分,分布式执行”,旨在简化云应用开发,提升开发效率和应用性能。思路是通过编译器自动拆分单体应用代码,实现云基础设施上的分布式运行。
---

# 云原生应用开发模式的一个构想
Expand Down
2 changes: 2 additions & 0 deletions docs/blogs/has-cloud-evolved-into-infra.en.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
title: Has the Cloud Truly Evolved into Infrastructure?
date: 2023-10-27
description: Pluto aims to leverage programming languages to lower the barriers for developers using the cloud, while still enjoying the convenience of existing language ecosystems and ensuring an optimal coding experience. Therefore, Pluto has given TypeScript a "makeover"...
---

# Has the Cloud Truly Evolved into Infrastructure?
Expand Down
2 changes: 2 additions & 0 deletions docs/blogs/has-cloud-evolved-into-infra.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
title: 云真的成为基础设施了吗?
date: 2023-10-27
description: Pluto 希望想利用编程语言来降低开发者使用云的门槛,同时仍能享受现有语言生态的便利性,极致地保障开发者的编程体验。所以,Pluto 对 TypeScript 进行了“翻新”...
---

# 云真的成为基础设施了吗?
Expand Down
2 changes: 1 addition & 1 deletion docs/documentation/concepts/sdk.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The `@plutolang/base` library contains three basic interfaces:
- `get name()`: Retrieves the basic name of the resource object, which may be different from the name of the created resource instance.
- `getPermission()`: Generates the necessary permissions for calling specific operations on itself.
- `postProcess()`: Some operations need to be performed only after all configuration processes are completed. These operations are placed in this function. For example, AWS ApiGateway needs to configure Deployment and Stage after setting up all routes.
4. **IResourceCapturedProps**: This interface should be extended within both the client implementaion and infrastructure implementation of a resource type. It contains some getter methods that defines the properties of the resource, which are generated at compile time and will be obtained during runtime. More details can be found in [this design document](../design/capture-value.en.md).
4. **IResourceCapturedProps**: This interface should be extended within both the client implementaion and infrastructure implementation of a resource type. It contains some getter methods that defines the properties of the resource, which are generated at compile time and will be obtained during runtime. More details can be found in [this design document](../design/capture-value.en.mdx).
- For instance, the URL of a Router resource.
5. **IResourceClientApi**: This interface should be extended within the client implementation of a resource type. It contains several methods that can be called during runtime. Typically, these methods represents the function provided by the platform's specific resource type.
- For instance, the `push` method of message queue is used to publish a message to the message queue during runtime.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This document provides a detailed description of the functional requirements and

Deducer focuses on a special type of instantiated objects (referred to as "special objects"), monitoring the instantiation process (i.e., the invocation of constructors) of special types, as well as the invocation of special methods by special objects. Specifically, it tracks the arguments passed during each invocation of the constructor and special methods. If the corresponding argument type in the function definition is a function type, it needs to be extracted as a computational closure; otherwise, its specific value needs to be deduced. An error can be reported if the deduction or extraction fails.

- **Root Type**: This refers to a set of special interfaces defined by Pluto in the Base SDK, with different interfaces having different meanings and effects. These root interfaces are the fundamental basis for Deducer to determine whether an object or method needs special attention. For example, in the example below, `base.IResource`, `base.IResourceClientApi`, `base.IResourceInfraApi`, and `base.IResourceCapturedProps` are all root types, where `base.IResource` is used to indicate that its subclasses or interfaces are cloud resource types; `base.IResourceClientApi` indicates that the methods in its subclasses or interfaces are functional methods of cloud resource instances, accessible at runtime; `base.IResourceInfraApi` is used to indicate that the methods in its subclasses or interfaces are methods that need to be executed during deployment, used to construct cloud resource instances and relationships; `base.IResourceCapturedProps` is used to indicate that the methods in its subclasses or interfaces are cloud resource properties, and the specific values of these properties are generated at deployment time. If interested, you can read [this document](./capture-value.en.md).
- **Root Type**: This refers to a set of special interfaces defined by Pluto in the Base SDK, with different interfaces having different meanings and effects. These root interfaces are the fundamental basis for Deducer to determine whether an object or method needs special attention. For example, in the example below, `base.IResource`, `base.IResourceClientApi`, `base.IResourceInfraApi`, and `base.IResourceCapturedProps` are all root types, where `base.IResource` is used to indicate that its subclasses or interfaces are cloud resource types; `base.IResourceClientApi` indicates that the methods in its subclasses or interfaces are functional methods of cloud resource instances, accessible at runtime; `base.IResourceInfraApi` is used to indicate that the methods in its subclasses or interfaces are methods that need to be executed during deployment, used to construct cloud resource instances and relationships; `base.IResourceCapturedProps` is used to indicate that the methods in its subclasses or interfaces are cloud resource properties, and the specific values of these properties are generated at deployment time. If interested, you can read [this document](./capture-value.en.mdx).
- **Special Type**: Refers to a class or interface that implements or extends a root type. For example, in the example below, `resource.Queue` extends the root type `base.IResource`, so `resource.Queue` is a special type.
- **Special Method**: Refers to the methods contained in a class or interface that implements or extends a root type. For example, in the example below, `resource.IQueueClientApi`, `resource.IQueueInfraApi`, and `resource.IQueueCapturedProps` each extend the root types `base.IResourceClientApi`, `base.IResourceInfraApi`, and `base.IResourceCapturedProps`, respectively, and the methods contained in these three interfaces are all special methods. It should be noted that a method is only considered a special method when it is invoked by a special type; otherwise, it is considered a normal method. For example, the `push`, `subscribe`, and `id` methods in the example are considered special methods only when they are called as methods of the `resource.Queue` type.
- **Special Object**: An instantiated object of a special type.
Expand All @@ -20,7 +20,7 @@ By implementing special types and special methods, platform capabilities can be

TypeScript example:

```typescript
```typescript filename="TypeScript Example"
// base package
interface IResource {}
interface IResourceClientApi {}
Expand All @@ -46,7 +46,7 @@ interface Queue extends base.IResource, IQueueClientApi, IQueueInfraApi, IQueueC

Python example:

```python
```python filename="Python Example"
# base module
class IResource(ABC):
pass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ date: 2024-02-05

Deducer 对一类特殊类型的实例化对象(下称特殊对象)予以特殊关注,关注特殊类型的实例化过程(即构造函数的调用),以及特殊类型的实例化对象(特殊对象)对特殊方法的调用。具体地,关注构造函数、特殊方法每一次调用时传入的参数信息,如果函数定义中对应的参数类型是函数类型,则需要将其提取成计算闭包,其他类型,则需要将其具体的值推导出来,推导或提取失败可报错。

- **根类型(Root Type)**:指 Pluto 在 Base SDK 中规定的一组特殊接口,不同接口的含义与效果不尽相同。这些根接口是 Deducer 判断某对象或方法是否需要被特殊关注的根本依据。例如,下方示例中的 `base.IResource`、`base.IResourceClientApi`、`base.IResourceInfraApi`、`base.IResourceCapturedProps` 都是根类型,其中 `base.IResource` 用于标识其子类或接口是云资源类型;`base.IResourceClientApi` 表示其子类或接口中的方法为云资源实例的功能方法,可被运行时访问;`base.IResourceInfraApi` 用于标识其子类或接口中的方法为部署时需执行的方法,用于构建云资源实例与关系;`base.IResourceCapturedProps` 用于标识其子类或接口中的方法为云资源属性,且该属性的具体值是在部署时才产生的,感兴趣可以阅读[这篇文档](./capture-value.zh-CN.md)。
- **根类型(Root Type)**:指 Pluto 在 Base SDK 中规定的一组特殊接口,不同接口的含义与效果不尽相同。这些根接口是 Deducer 判断某对象或方法是否需要被特殊关注的根本依据。例如,下方示例中的 `base.IResource`、`base.IResourceClientApi`、`base.IResourceInfraApi`、`base.IResourceCapturedProps` 都是根类型,其中 `base.IResource` 用于标识其子类或接口是云资源类型;`base.IResourceClientApi` 表示其子类或接口中的方法为云资源实例的功能方法,可被运行时访问;`base.IResourceInfraApi` 用于标识其子类或接口中的方法为部署时需执行的方法,用于构建云资源实例与关系;`base.IResourceCapturedProps` 用于标识其子类或接口中的方法为云资源属性,且该属性的具体值是在部署时才产生的,感兴趣可以阅读[这篇文档](./capture-value.zh-CN.mdx)。
- **特殊类型(Special Type)**:指实现或扩展了某个根类型的类或接口。例如,下方示例中 `resource.Queue` 扩展了 `base.IResource` 根类型,因此 `resource.Queue` 是一种特殊类型。
- **特殊方法(Special Method)**:实现或扩展了某个根类型的类或接口中包含的方法。例如,下方示例中 `resource.IQueueClientApi` 、`resource.IQueueInfraApi`、`resource.IQueueCapturedProps` 分别扩展了 `base.IResourceClientApi`、`base.IResourceInfraApi`、`base.IResourceCapturedProps` 三个根类型,这三个接口中包含的方法都属于特殊方法。需要注意的是,只有特殊方法的调用方是特殊类型时,才会被特殊关注,否则认为是普通方法。例如,示例中的 `push`、`subscribe`、`id` 方法只有被作为 `resource.Queue` 类型的方法被调用时,才被认为是特殊方法。
- **特殊对象(Special Object)**:特殊类型的实例化对象。
Expand All @@ -20,7 +20,7 @@ Deducer 对一类特殊类型的实例化对象(下称特殊对象)予以特

TypeScript 示例:

```typescript
```typescript filename="TypeScript 示例"
// base package
interface IResource {}
interface IResourceClientApi {}
Expand All @@ -46,7 +46,7 @@ interface Queue extends base.IResource, IQueueClientApi, IQueueInfraApi, IQueueC

Python 示例:

```python
```python filename="Python 示例"
# base module
class IResource(ABC):
pass
Expand Down