Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

Commit 3312967

Browse files
authored
replace FDK examples with SDK. Closes #363 (#368)
1 parent 76c0328 commit 3312967

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,10 @@ curl --request POST \
9696
}'
9797
```
9898

99-
##### FDK example
99+
##### SDK example
100100

101101
```javascript
102-
const eventGateway = fdk.eventGateway({ url: 'http://localhost' })
102+
const eventGateway = new EventGateway({ url: 'http://localhost' })
103103
eventGateway.registerFunction({
104104
functionId: "sendEmail"
105105
provider: {
@@ -123,10 +123,10 @@ curl --request POST \
123123
--data '{ "name": "Max" }'
124124
```
125125

126-
##### FDK example
126+
##### SDK example
127127

128128
```javascript
129-
const eventGateway = fdk.eventGateway({ url: "http://localhost" });
129+
const eventGateway = new EventGateway({ url: "http://localhost" });
130130
eventGateway.invoke({
131131
functionId: "createUser",
132132
data: { name: "Max" }
@@ -160,10 +160,10 @@ curl --request POST \
160160
}'
161161
```
162162

163-
##### FDK example
163+
##### SDK example
164164

165165
```javascript
166-
const eventGateway = fdk.eventGateway({ url: "http://localhost" });
166+
const eventGateway = new EventGateway({ url: "http://localhost" });
167167
eventGateway.subscribe({
168168
event: "user.created",
169169
functionId: "sendEmail",
@@ -185,10 +185,10 @@ curl --request POST \
185185
--data '{ "name": "Max" }'
186186
```
187187

188-
##### FDK example
188+
##### SDK example
189189

190190
```javascript
191-
const eventGateway = fdk.eventGateway({ url: "http://localhost" });
191+
const eventGateway = new EventGateway({ url: "http://localhost" });
192192
eventGateway.emit({
193193
event: "user.created",
194194
data: { name: "Max" }
@@ -217,10 +217,10 @@ curl --request POST \
217217
}'
218218
```
219219

220-
##### FDK example
220+
##### SDK example
221221

222222
```javascript
223-
const eventGateway = fdk.eventGateway({ url: "http://localhost" });
223+
const eventGateway = new EventGateway({ url: "http://localhost" });
224224
eventGateway.subscribe({
225225
functionId: "listUsers",
226226
event: "http",
@@ -700,9 +700,9 @@ further processed by the Event Gateway.
700700

701701
For more details, see [the example plugin](plugin/example).
702702

703-
## Client Libraries
703+
## SDK
704704

705-
* [FDK for Node.js](https://github.com/serverless/fdk)
705+
* [SDK for Node.js](https://github.com/serverless/event-gateway-sdk)
706706

707707
## Versioning
708708

@@ -841,7 +841,7 @@ The greatest benefit of serverless/FaaS is that it solves almost all of above pr
841841
2. load balancing: I don't care! I know that there will be a function to handle my request (blue/green deployments still an issue though)
842842
3. retries: It's highly unusual that my request will not proceed as function instances are ephemeral and failing function is immediately replaced with a new instance. If it happens I can easily send another request. In case of failure, it's easy to understand what is the cause.
843843
4. circuit breaking: Functions are ephemeral and auto-scaled, low possibility of flooding/DoS & [cascading failures](https://landing.google.com/sre/book/chapters/addressing-cascading-failures.html).
844-
5. sidecar: calling function is as simple as calling method from cloud provider fdk.
844+
5. sidecar: calling function is as simple as calling method from cloud provider SDK.
845845
6. in FaaS setting up persistent connection between two functions defeats the purpose as functions instances are ephemeral.
846846

847847
Tools like Envoy/Linkerd solve different domain of technical problems that doesn't occur in serverless space. They have a lot of features that are unnecessary in the context of serverless computing.

0 commit comments

Comments
 (0)