Skip to content

Commit

Permalink
replace FDK examples with SDK. Closes #363 (#368)
Browse files Browse the repository at this point in the history
  • Loading branch information
mthenw committed Feb 16, 2018
1 parent 76c0328 commit 3312967
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ curl --request POST \
}'
```

##### FDK example
##### SDK example

```javascript
const eventGateway = fdk.eventGateway({ url: 'http://localhost' })
const eventGateway = new EventGateway({ url: 'http://localhost' })
eventGateway.registerFunction({
functionId: "sendEmail"
provider: {
Expand All @@ -123,10 +123,10 @@ curl --request POST \
--data '{ "name": "Max" }'
```

##### FDK example
##### SDK example

```javascript
const eventGateway = fdk.eventGateway({ url: "http://localhost" });
const eventGateway = new EventGateway({ url: "http://localhost" });
eventGateway.invoke({
functionId: "createUser",
data: { name: "Max" }
Expand Down Expand Up @@ -160,10 +160,10 @@ curl --request POST \
}'
```

##### FDK example
##### SDK example

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

##### FDK example
##### SDK example

```javascript
const eventGateway = fdk.eventGateway({ url: "http://localhost" });
const eventGateway = new EventGateway({ url: "http://localhost" });
eventGateway.emit({
event: "user.created",
data: { name: "Max" }
Expand Down Expand Up @@ -217,10 +217,10 @@ curl --request POST \
}'
```

##### FDK example
##### SDK example

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

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

## Client Libraries
## SDK

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

## Versioning

Expand Down Expand Up @@ -841,7 +841,7 @@ The greatest benefit of serverless/FaaS is that it solves almost all of above pr
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)
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.
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).
5. sidecar: calling function is as simple as calling method from cloud provider fdk.
5. sidecar: calling function is as simple as calling method from cloud provider SDK.
6. in FaaS setting up persistent connection between two functions defeats the purpose as functions instances are ephemeral.

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.
Expand Down

0 comments on commit 3312967

Please sign in to comment.