Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up the benefits/overview docs to be more to the point #1358

Merged
merged 4 commits into from
Sep 3, 2024
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
48 changes: 37 additions & 11 deletions docs/go/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,57 @@ toc: false
lang: go
---

Modern backend applications rely on a common set of infrastructure primitives for most of the behavior. To improve your development workflow, Encore.go enables you to declare these primitives as type-safe objects in application code. Encore.go then takes care of running your local environments, provides observability and documentation, and helps you [integrate with cloud infrastructure](/docs/deploy/infra). Encore also offers a [Cloud Platform](/use-cases/devops-automation) which fully automates infrastructure and DevOps for your cloud on AWS/GCP.
Encore.go simplifies backend development by providing an application-centric way of using most common infrastructure primitives, things like: databases, queues, cron jobs, and APIs.
It lets you define these primitives as type-safe objects directly in your application code. This approach streamlines your development process in several ways:

1. Local Environment Management: Encore.go automatically handles the setup and running of your local development environments.

2. Enhanced Observability: It provides [built-in tools](/docs/observability/dev-dash) for monitoring and understanding your application's behavior.

3. Automatic Documentation: Encore.go generates and maintains [up-to-date documentation](/docs/develop/api-docs) for your APIs and services.

4. Cloud Integration: It simplifies and facilitates [integrating with cloud infrastructure](/docs/how-to/self-host), making deployment and scaling easier.

5. DevOps Automation: For those seeking a fully automated solution, Encore offers an optional [Cloud Platform](/use-cases/devops-automation) that automates infrastructure provisioning, IAM management, and DevOps processes on AWS and GCP.

By combining these features, Encore.go enables you to focus on writing your application logic while it automates much of the complexities of modern backend development.

### See how to use each primitive

**See how to use each primitive:**
- [Services and APIs](/docs/primitives/services-and-apis)
- [Databases](/docs/primitives/databases)
- [Cron Jobs](/docs/primitives/cron-jobs)
- [Pub/Sub & Queues](/docs/primitives/pubsub)
- [Caching](/docs/primitives/caching)
- [Secrets](/docs/primitives/secrets)

### Tutorials

Check out the [Tutorials](/docs/tutorials) section for examples of complete Encore applications.

<img src="/assets/docs/primitives.png" title="Cloud Primitives" className="noshadow mx-auto d:w-1/2"/>

## Benefits of using Encore
## Benefits of using Encore.go

Using Encore.go to declare infrastructure in application code helps unlock these benefits:

- **Local development with instant infrastructure**: Encore.go automatically sets up necessary infrastructure as you develop.
- **Rapid feedback**: Catch issues early with type-safe infrastructure, avoiding slow deployment cycles.
- **No manual configuration required**: No need for Infrastrucutre-as-Code. Your code is the single source of truth.
- **Unified codebase**: One codebase for all environments; local, preview, and cloud.
- **Cloud-agnostic by default**: Encore.go provides an abstraction layer on top of the cloud provider's APIs, so you avoid becoming locked in to a single cloud.
- **Evolve infrastructure without code changes**: As requirements evolve, you can change the provisioned infrastructure without making code changes, either using the Open Source [self-hosting tools](/docs/deploy/self-hosting) or fully-automated in your AWS/GCP account using [Encore's Cloud Platform](https://encore.dev/use-cases/devops-automation).
cloud provider's console.

## No DevOps experience required

Encore provides open source tools to help you integrate with your cloud infrastructure, enabling you to self-host your application anywhere to supports Docker containers.
Learn more in the [self-host documentation](/docs/deploy/self-hosting).

Using the Go Backend Framework to declare infrastructure in application code helps unlock these benefits:
You can also use [Encore's Cloud Platform](https://encore.dev/use-cases/devops-automation), which fully automates provisioning and managing infrastructure in your own cloud on AWS and GCP.

- **Develop new features locally as if the infrastructure is already set up**: Encore automatically compiles your app and sets up the necessary infrastructure on the fly.
- **Faster feedback loops:** With type-safe infrastructure you can identify problems as early as in your code editor, instead of learning about issues via the — much slower — deployment cycle.
- **No manual maintenance required**: There is no need to manually write [IaC](/resources/infrastructure-as-code) configuration, like Terraform. Encore uses your application code as the source of truth and automatically keeps all environments in sync.
- **One codebase for all environments**: Encore [automatically provisions](/docs/deploy/infra) your local, [preview](/docs/deploy/preview-environments), and cloud environments (using [your own cloud account](/docs/deploy/own-cloud)) on AWS/GCP.
- **Cloud-agnostic by default**: The Backend Framework is an abstraction layer on top of the cloud provider's APIs, so you avoid becoming locked in to a single cloud.
- **Evolve infrastructure without code changes**: As your requirements evolve, you can change and configure the provisioned infrastructure by using Encore's Cloud Dashboard or your cloud provider's console.
This approach dramatically reduces the level of DevOps expertise required to use scalable, production-ready, cloud services like Kubernetes and Pub/Sub. And because your application code is the source of truth for infrastructure requirements, it ensures the infrastructure in all your environments are always in sync with the application's requirements.

## Simplicity without giving up flexibility

While most requirements are met by a common set of infrastructure primitives, sooner or later you will likely need something highly specific to your problem domain. Encore is designed to ensure you can use any cloud infrastructure, even if it's not built into Encore's Backend Framework. This works seamlessly since Encore [provisions infrastructure](/docs/deploy/infra) in your own cloud account, so you can use any of your cloud provider's services as you traditionally would.
Encore.go provides integrations for common infrastructure primitives, but also allows for flexibility. You can always use any cloud infrastructure, even if it's not built into Encore.go. If you use Encore's [Cloud Platform](https://encore.dev/use-cases/devops-automation), it [automates infrastructure](/docs/deploy/infra) using your own cloud account, so you always have full access to your services from the cloud provider's console.
64 changes: 38 additions & 26 deletions docs/ts/concepts/benefits.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,48 +6,60 @@ toc: false
lang: ts
---

## Integrated developer experience for empowering productivity

- **Develop new features locally as if the infrastructure is already set up**: Encore automatically compiles your app and sets up the necessary infrastructure on the fly.
- **Faster feedback loops:** With type-safe infrastructure you can identify problems as early as in your code editor, instead of learning about issues via the — much slower — deployment cycle.
- **No manual config required**: There is no need to manually write [IaC](/resources/infrastructure-as-code) configuration, like Terraform, and no need to maintain configuration for multiple environments manually. Encore uses your application code as the source of truth and automatically keeps all environments in sync.
- **One codebase for all environments**: Encore [automatically provisions](/docs/deploy/infra) your local, [preview](/docs/deploy/preview-environments), and cloud environments (using [your own cloud account](/docs/deploy/own-cloud)) on AWS/GCP.
- **Cloud-agnostic by default**: The Backend Framework is an abstraction layer on top of the cloud provider's APIs, so you avoid becoming locked in to a single cloud.
- **Evolve infrastructure without code changes**: As your requirements evolve, you can change and configure the provisioned infrastructure by using Encore's Cloud Dashboard or your cloud provider's console.
## Integrated developer experience for enhanced productivity

- **Local development with instant infrastructure**: Encore automatically sets up necessary infrastructure as you develop.
- **Rapid feedback**: Catch issues early with type-safe infrastructure, avoiding slow deployment cycles.
- **No manual configuration required**: No need for Infrastrucutre-as-Code. Your code is the single source of truth.
- **Unified codebase**: One codebase for all environments; local, preview, and cloud.
- **Cloud-agnostic by default**: Encore.ts provides an abstraction layer on top of the cloud provider's APIs, so you avoid becoming locked in to a single cloud.
- **Evolve infrastructure without code changes**: As requirements evolve, you can change the provisioned infrastructure without making code changes, either using the Open Source [self-hosting tools](/docs/deploy/self-hosting) or fully-automated in your AWS/GCP account using [Encore's Cloud Platform](https://encore.dev/use-cases/devops-automation).
cloud provider's console.

## Incredible performance powered by a custom Rust runtime
## High-performance Rust runtime

To enable Encore's functionality in TypeScript, we’ve created a high-performance distributed systems runtime in Rust.
It integrates with the standard Node.js runtime for excecuting JavaScript code, ensuring **100% compatability with the Node.js ecosystem**.

The Rust runtime does everything from handling incoming requests and making API calls, to querying databases and using Pub/Sub.
It even handles all application observability, like distributed tracing, structured logging, and metrics.
It also provides a number of benefits over standard Node.js:
- **Handles requests, API calls, databases, Pub/Sub, and observability**
- **9x increased throughput and 85% reduced latency** compared to standard Node.js/Express.js [See benchmarks](https://encore.dev/blog/event-loops)
- **Zero NPM dependencies** for improved security and faster builds

Using Rust leads to a **massive performance increase** over standard Node.js, **increasing throughput by 7x** and **reducing response latency by 85%**.
### How it works

What’s really cool: **Encore has zero NPM dependencies**, improving security and speeding up builds and application startup times.
Encore.ts is designed to let the Node.js event loop —which is single-threaded — focus on executing your business logic, while everything else happens in Encore’s multi-threaded Rust runtime. Here's a high-level overview of how this works:

### How it works
**1. Node.js starts up and initializes the Encore Rust runtime. The Rust runtime then:**
- Begins accepting incoming requests
- Parses and validates these requests against the API schema

1. Node.js starts up, and initializes the Encore Rust runtime, which begins accepting incoming requests, parsing and validating them against the API schema.
2. The Encore Runtime then passes on the request to your application code, and waits for the response, before sending it back out over the wire.
3. When your application uses infrastructure resources, like querying databases or publishing PubSub messages, it hands that over to the Rust runtime for faster execution.
**2. For each request, the Encore Runtime:**
- Passes the request to your application code
- Waits for your code to process the request
- Sends the response back to the client

This means that the Node.js event loop — which is single-threaded — can focus on executing your business logic. Everything else happens in Encore’s multi-threaded Rust runtime.
**3. When your application needs to interact with infrastructure (like databases or PubSub):**
- It delegates these tasks to the Rust runtime
- The Rust runtime handles these operations more efficiently than Node.js would, providing faster execution and lower latency

## Enhanced type-safety for distributed systems

Encore uses static code analysis to parse and analyze the TypeScript types you define.
This powers Encore’s built-in [local development dashboard](/docs/observability/dev-dash), which provides an API Explorer for making API calls, automatic API documentation, local tracing, and much more.

Normally with TypeScript, the type information is lost at runtime. But Encore is different.
Encore uses the API schema to automatically validate incoming requests, guaranteeing complete type-safety, even at runtime.
No more confusing exceptions because a required field is missing.
Encore leverages static code analysis to parse the API schema and TypeScript types you define. This enables a number of features:
- Built-in [local development dashboard](/docs/observability/dev-dash)
- API Explorer, automatic documentation, and local tracing
- Runtime type-safety, automatically validating incoming requests against the API schema
- Eliminating runtime errors due to missing required fields

## No DevOps experience required

Because Encore orchestrates setting up and configuring cloud services in your cloud on AWS or GCP, it dramatically reduces the level of DevOps expertise required to use scalable, production-ready, cloud services like Kubernetes and Pub/Sub. And because your application code is the source of truth for infrastructure requirements, it ensures the infrastructure in all your environments are always in sync with the application's requirements.
Encore provides open source tools to help you integrate with your cloud infrastructure, enabling you to self-host your application anywhere to supports Docker containers.
Learn more in the [self-host documentation](/docs/deploy/self-hosting).

You can also use [Encore's Cloud Platform](https://encore.dev/use-cases/devops-automation), which fully automates provisioning and managing infrastructure in your own cloud on AWS and GCP.

This approach dramatically reduces the level of DevOps expertise required to use scalable, production-ready, cloud services like Kubernetes and Pub/Sub. And because your application code is the source of truth for infrastructure requirements, it ensures the infrastructure in all your environments are always in sync with the application's requirements.

## Simplicity without giving up flexibility

While most requirements are met by a common set of infrastructure primitives, sooner or later you will likely need something highly specific to your problem domain. Encore is designed to ensure you can use any cloud infrastructure, even if it's not built into Encore's Backend Framework. This works seamlessly since Encore [provisions infrastructure](/docs/deploy/infra) in your own cloud account, so you can use any of your cloud provider's services as you traditionally would.
Encore.ts provides integrations for common infrastructure primitives, but also allows for flexibility. You can always use any cloud infrastructure, even if it's not built into Encore.ts. If you use Encore's [Cloud Platform](https://encore.dev/use-cases/devops-automation), it [automates infrastructure](/docs/deploy/infra) using your own cloud account, so you always have full access to your services from the cloud provider's console.
24 changes: 18 additions & 6 deletions docs/ts/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,27 @@
seotitle: Start building backends using Encore.ts
seodesc: Learn how Encore.ts works, and get to know the powerful features that help you build cloud backend applications easier than ever before.
title: Encore.ts
subtitle: Learn how to use Encore to build production-ready TypeScript backend applications and distributed systems
subtitle: Use Encore.ts to build production-ready TypeScript backend applications and distributed systems
toc: false
lang: ts
---

Modern backend applications rely on a common set of infrastructure primitives for most of the behavior. To improve your development workflow, Encore.ts enables you to declare these primitives as type-safe objects in application code. Encore.ts then takes care of running your local environments, provides observability and documentation, and helps you [integrate with cloud infrastructure](/docs/deploy/infra). Encore also offers a [Cloud Platform](/use-cases/devops-automation) which fully automates infrastructure and DevOps for your cloud on AWS/GCP.
Encore.ts simplifies backend development by providing an application-centric way of using most common infrastructure primitives, things like: databases, queues, cron jobs, and APIs.
It lets you define these primitives as type-safe objects directly in your application code. This approach streamlines your development process in several ways:

### Intro video
1. Local Environment Management: Encore.ts automatically handles the setup and running of your local development environments.

Get to know the core concepts of Encore.ts in this intro video.
2. Enhanced Observability: It provides [built-in tools](/docs/observability/dev-dash) for monitoring and understanding your application's behavior.

<iframe width="360" height="202" src="https://www.youtube.com/embed/vvqTGfoXVsw?si=TliVv2VAT0YtNuYk" title="Encore Intro Video" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
3. Automatic Documentation: Encore.ts generates and maintains [up-to-date documentation](/docs/develop/api-docs) for your APIs and services.

4. Cloud Integration: It simplifies and facilitates [integrating with cloud infrastructure](/docs/how-to/self-host), making deployment and scaling easier.

### Explore how to use each backend primitive
5. DevOps Automation: For those seeking a fully automated solution, Encore offers an optional [Cloud Platform](/use-cases/devops-automation) that automates infrastructure provisioning, IAM management, and DevOps processes on AWS and GCP.

By combining these features, Encore.ts enables you to focus on writing your application logic while it automates much of the complexities of modern backend development.

### See how to use each primitive

- [Services and APIs](/docs/ts/primitives/services-and-apis)
- [Streaming APIs](/docs/ts/primitives/streaming-apis)
Expand All @@ -25,6 +31,12 @@ Get to know the core concepts of Encore.ts in this intro video.
- [Pub/Sub & Queues](/docs/ts/primitives/pubsub)
- [Secrets](/docs/ts/primitives/secrets)

### Intro video

Get to know the core concepts of Encore.ts in this intro video.

<iframe width="360" height="202" src="https://www.youtube.com/embed/vvqTGfoXVsw?si=TliVv2VAT0YtNuYk" title="Encore Intro Video" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>

### Tutorials

Check out the [Tutorials](/docs/tutorials) section for guided examples of how to build complete Encore applications.
Loading