Skip to content

Commit

Permalink
copy Develop changes to stable (#23812)
Browse files Browse the repository at this point in the history
  • Loading branch information
ddhodge authored Sep 7, 2024
1 parent bc28ee8 commit c40fff2
Show file tree
Hide file tree
Showing 32 changed files with 1,315 additions and 1,131 deletions.
2 changes: 1 addition & 1 deletion docs/content/preview/architecture/design-goals.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ YugabyteDB has been designed with operational simplicity in mind, providing feat

## Heterogeneous workload support

Depending on the use case, the database may need to support diverse workloads, such as [transactional processing](../../benchmark/tpcc/), [analytical queries](../../sample-data/retail-analytics/), [real-time data ingestion](../../tutorials/azure/azure-event-hubs/), [time-series](../../develop/data-modeling/common-patterns/timeseries/), and [key-value](../../benchmark/key-value-workload-ycql/) workloads.
Depending on the use case, the database may need to support diverse workloads, such as [transactional processing](../../benchmark/tpcc/), [analytical queries](../../sample-data/retail-analytics/), [real-time data ingestion](/preview/tutorials/azure/azure-event-hubs/), [time-series](../../develop/data-modeling/common-patterns/timeseries/), and [key-value](../../benchmark/key-value-workload-ycql/) workloads.

## Transaction isolation levels

Expand Down
2 changes: 1 addition & 1 deletion docs/content/preview/develop/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,5 @@ To learn more about how to use browser-based IDEs, see [Cloud-native development
Yugabyte provides multiple step-by-step guides for building scalable and fault-tolerant applications with YugabyteDB using your favorite programming language, services, and frameworks, including Kafka, Gen-AI, and more.

{{<lead link="../tutorials/">}}
For step-by-step guides for various frameworks, see [Tutorials](../tutorials/).
For step-by-step guides for various frameworks, see [Tutorials](/preview/tutorials/).
{{</lead>}}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ menu:
type: indexpage
---

Use the yb-master binary and its flags to configure the [YB-Master](../../../architecture/concepts/yb-master/) server. The yb-master executable file is located in the `bin` directory of YugabyteDB home. For more detailed information about flags commonly used for production deployments and instructions on using yb-master, refer to the [yb-master](../yb-master/) documentation.
Use the yb-master binary and its flags to configure the [YB-Master](../../../architecture/yb-master/) server. The yb-master executable file is located in the `bin` directory of YugabyteDB home. For more detailed information about flags commonly used for production deployments and instructions on using yb-master, refer to the [yb-master](../yb-master/) documentation.

For a list of all YB-TServer flags, see [All YB-TServer flags](../all-flags-yb-tserver/).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ menu:
type: indexpage
---

Use the yb-tserver binary and its flags to configure the [YB-TServer](../../../architecture/concepts/yb-tserver/) server. The yb-tserver executable file is located in the `bin` directory of YugabyteDB home. For more detailed information about flags commonly used for production deployments and instructions on using yb-tserver, refer to the [yb-tserver](../yb-tserver/) documentation.
Use the yb-tserver binary and its flags to configure the [YB-TServer](../../../architecture/yb-tserver/) server. The yb-tserver executable file is located in the `bin` directory of YugabyteDB home. For more detailed information about flags commonly used for production deployments and instructions on using yb-tserver, refer to the [yb-tserver](../yb-tserver/) documentation.

For a list of all YB-Master flags, see [All YB-Master flags](../all-flags-yb-master/).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ A full copy is done by first backing up the data to external storage, and then r

### YSQL tables

You can add databases containing colocated tables to the xCluster configuration as long as the underlying database is v2.18.1.0 or later. Colocated tables on the source and target should be created with the same colocation ID if they already exist on both the source and target prior to setup. Refer to [xCluster and colocation](../../../../architecture/docdb-sharding/colocated-tables/#xcluster-and-colocation).
You can add databases containing colocated tables to the xCluster configuration as long as the underlying database is v2.18.1.0 or later. Colocated tables on the source and target should be created with the same colocation ID if they already exist on both the source and target prior to setup. Refer to [xCluster and colocation](../../../../explore/colocation/#xcluster-and-colocation).

If a [full copy](#full-copy-during-xcluster-setup) is required, the entire database is recreated on the target universe from the current database on the source universe. Be sure to keep the set of tables the same at all times on both the source and target universes in these databases by following the steps in [Manage tables and indexes](../xcluster-replication-ddl/).

Expand Down
2 changes: 1 addition & 1 deletion docs/content/stable/api/ycql/type_jsonb.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,6 @@ Note that JSONB upsert only works for JSON objects and not for other data types

## See also

- [Explore JSON documents](../../../develop/learn/data-types-ycql/#jsonb)
- [Explore JSON documents](../../../explore/ycql-language/jsonb-ycql)
- [Data types](..#data-types)
- [Secondary indexes with JSONB](../../../explore/ycql-language/indexes-constraints/secondary-indexes-with-jsonb-ycql/)
2 changes: 1 addition & 1 deletion docs/content/stable/architecture/design-goals.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ YugabyteDB has been designed with operational simplicity in mind, providing feat

## Heterogeneous workload support

Depending on the use case, the database may need to support diverse workloads, such as [transactional processing](../../benchmark/tpcc/), [analytical queries](../../sample-data/retail-analytics/), [real-time data ingestion](/preview/tutorials/azure/azure-event-hubs/), [time-series](../../develop/common-patterns/timeseries/), and [key-value](../../benchmark/key-value-workload-ycql/) workloads.
Depending on the use case, the database may need to support diverse workloads, such as [transactional processing](../../benchmark/tpcc/), [analytical queries](../../sample-data/retail-analytics/), [real-time data ingestion](/preview/tutorials/azure/azure-event-hubs/), [time-series](../../develop/data-modeling/common-patterns/timeseries/), and [key-value](../../benchmark/key-value-workload-ycql/) workloads.

## Transaction isolation levels

Expand Down
128 changes: 71 additions & 57 deletions docs/content/stable/develop/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,60 +8,74 @@ image: /images/section_icons/index/develop.png
type: indexpage
---

{{<index/block>}}

{{<index/item
title="Build global applications"
body="Build globally distributed applications using design patterns."
href="build-global-apps/"
icon="/images/section_icons/explore/planet_scale.png">}}

{{<index/item
title="Build multi-cloud applications"
body="Build multi-cloud applications for YugabyteDB."
href="multi-cloud/"
icon="/images/section_icons/deploy/public-clouds.png">}}

{{<index/item
title="Common patterns"
body="Learn how to use multiple data models with YugabyteDB."
href="common-patterns/"
icon="/images/section_icons/architecture/distributed_acid.png">}}

{{<index/item
title="Learn app development"
body="Learn how to build cloud services and applications on YugabyteDB."
href="learn/"
icon="/images/section_icons/develop/learn.png">}}

{{<index/item
title="Best practices"
body="Best practices for data modeling and cluster configuration."
href="best-practices-ysql/"
icon="/images/section_icons/develop/real-world-apps.png">}}

{{<index/item
title="Drivers and ORMs"
body="Build applications using supported drivers and ORMs."
href="../drivers-orms/"
icon="/images/section_icons/explore/administer.png">}}

{{<index/item
title="Quality of service"
body="Handle scenarios with heavy load, and implement rate-limiting when running multi-tenant services."
href="quality-of-service/"
icon="/images/section_icons/explore/fault_tolerance.png">}}

{{<index/item
title="Cloud-native development"
body="Ready-to-code, fully-integrated, automated code workflows in the cloud."
href="gitdev/"
icon="/images/section_icons/deploy/public-clouds.png">}}

{{<index/item
title="Tutorials"
body="Try out sample applications built using AI, pg_vector, Kafka, and more."
href="/preview/tutorials/"
icon="fa-sharp fa-light fa-chalkboard-user">}}

{{</index/block>}}
## Data modeling

Although YugabyteDB is fully SQL compatible, modeling data for a distributed database is quite different from modeling for a monolithic database like MySQL or PostgreSQL. This is because the table data is distributed across different nodes. You must understand how to model your data for efficient storage and retrieval from a distributed system.

{{<lead link="./data-modeling/">}}
To understand how to model your data for YugabyteDB, see [Distributed data modeling](./data-modeling/).
{{</lead>}}

## Global applications

Today's applications have to cater to users distributed across the globe. Running applications across multiple data centers while providing the best user experience is no trivial task. Yugabyte provides some battle-tested design patterns for your global applications.

{{<lead link="./build-global-apps/">}}
To learn more about building global applications, see [Build global applications](./build-global-apps/).
{{</lead>}}

## Multi-cloud applications

A multi-cloud strategy provides the flexibility to use the optimal computing environment for each specific workload, helps avoid vendor lock-in, lets you place data close to the users, and can minimize cost by choosing optimal pricing and performance of various cloud providers. You can also opt for a hybrid model as your path to migration onto the cloud.

{{<lead link="./multi-cloud/">}}
To understand how to build a multi-cloud setup with YugabyteDB, see [Build multi-cloud applications](./multi-cloud/).
{{</lead>}}

## Application development

Although building scalable applications on top of YugabyteDB is straightforward, you need to understand certain fundamental concepts like transactions, search, and more to make the best use of them.

{{<lead link="./learn/">}}
To learn how to build applications on top of YugabyteDB, see [Learn app development](./learn/).
{{</lead>}}

## Best practices

Use these best practices to build distributed applications on top of YugabyteDB; this includes a list of techniques that you can adopt to make your application perform its best.

{{<lead link="./best-practices-ysql">}}
For more details, see [Best practices](./best-practices-ysql).
{{</lead>}}

## Drivers and ORMs

To communicate with YugabyteDB, applications need to use drivers. Applications can also be built using Object-Relational mappings, a technique used to communicate with the database using object-oriented techniques. We've tested various drivers and ORMs in multiple languages with the optimal configurations to get your applications up and running.

{{<lead link="../drivers-orms/">}}
For the list of drivers and ORMs with sample code, see [Drivers and ORMs](../drivers-orms/).
{{</lead>}}

## Quality of service

Although YugabyteDB can scale horizontally when needed, it also includes safety measures and settings such as rate-limiting, admission control, transaction priorities, and more, to ensure applications can maintain a high quality of service for all users when the systems comes under heavy load.

{{<lead link="./quality-of-service/">}}
To learn more about how to use rate-limiting and other features, see [Quality of service](./quality-of-service/).
{{</lead>}}

## Cloud-native development

Cloud-native development refers to building and running applications that fully exploit the advantages of cloud computing without needing to install any software on your development machine. Two prominent tools for cloud-native development environments are Gitpod and GitHub Codespaces. Both provide cloud-based development environments, but they have their own features and use cases.

{{<lead link="./gitdev/">}}
To learn more about how to use browser-based IDEs, see [Cloud-native development](./gitdev/).
{{</lead>}}

## Tutorials

Yugabyte provides multiple step-by-step guides for building scalable and fault-tolerant applications with YugabyteDB using your favorite programming language, services, and frameworks, including Kafka, Gen-AI, and more.

{{<lead link="../tutorials/">}}
For step-by-step guides for various frameworks, see [Tutorials](/preview/tutorials/).
{{</lead>}}
45 changes: 0 additions & 45 deletions docs/content/stable/develop/common-patterns/timeseries/_index.md

This file was deleted.

62 changes: 62 additions & 0 deletions docs/content/stable/develop/data-modeling/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
title: Distributed Data modeling
linkTitle: Data modeling
description: Learn to develop YugabyteDB applications
image: fa-sharp fa-light fa-objects-column
menu:
stable:
identifier: data-modeling
parent: develop
weight: 100
type: indexpage
---

Data modeling is the process of defining the structure, organization, and relationships of data in a database. In a distributed SQL database, this process becomes even more crucial due to the complexities introduced by data distribution, replication, and consistency. To fully leverage the benefits offered by YugabyteDB, you need to approach data modeling with a distributed mindset. Data modeling for distributed SQL databases requires a careful balance of theoretical principles and practical considerations.

## Organization

In YugabyteDB, data is stored as rows and columns in tables; tables are organized under schemas and databases.

{{<lead link="../../explore/ysql-language-features/databases-schemas-tables">}}
To understand how to create and manage tables, schemas, and databases, see [Schemas and tables](../../explore/ysql-language-features/databases-schemas-tables).
{{</lead>}}

## Sharding

In YugabyteDB, table data is split into tablets, and distributed across multiple nodes in the cluster. Applications can connect to any node for storing and retrieving data. Because reads and writes can span multiple nodes, it's crucial to consider how table data is sharded and distributed when modeling your data. To design your tables and indexes for fast retrieval and storage in YugabyteDB, you first need to understand the [data distribution](../../explore/going-beyond-sql/data-sharding) schemes: Hash and Range sharding.

{{<lead link="../../explore/going-beyond-sql/data-sharding">}}
To learn more about data distribution schemes, see [Configurable data sharding](../../explore/going-beyond-sql/data-sharding).
{{</lead>}}

## Primary keys

The primary key is the unique identifier for each row in the table. The distribution and ordering of table data depends on the primary key.

{{<lead link="./primary-keys-ysql">}}
To design optimal primary keys for your tables, see [Primary keys](./primary-keys-ysql).
{{</lead>}}

## Secondary indexes

Indexes provide alternate access patterns for queries not involving the primary key of the table. With the help of an index, you can improve the access operations of your queries.

{{<lead link="./secondary-indexes-ysql">}}
To design optimal indexes for faster lookup, see [Secondary indexes](./secondary-indexes-ysql).
{{</lead>}}

## Hot shards

In distributed systems, a hot-spot or hot-shard refers to a node that is overloaded with queries due to disproportionate traffic compared to other nodes in the cluster.

{{<lead link="./hot-shards-ysql">}}
To understand the hot-shard problem and solutions to overcome the issue, see [Hot shards](./hot-shards-ysql).
{{</lead>}}

## Table partitioning

When the data in tables keep growing, you can partition the tables for better performance and enhanced data management. Partitioning also makes it easier to drop older data by dropping partitions. In YugabyteDB, you can also use partitioning with Tablespaces to improve latency in multi-region scenarios and adhere to data residency laws like GDPR.

{{<lead link="./partitioning">}}
To understand partitioning in YugabyteDB, see [Table partitioning](./partitioning).
{{</lead>}}
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ image: /images/section_icons/architecture/distributed_acid.png
menu:
stable:
identifier: common-patterns
parent: develop
weight: 400
parent: data-modeling
weight: 600
type: indexpage
showRightNav: true
---
Expand All @@ -35,7 +35,9 @@ A good example would be the speed sensor in a car that tracks the speed of a car

An insurance company could use the data to investigate accidents or an automobile company could track various sensors and improve the performance of the car. This could amount to billions of data points.

{{<lead link="./timeseries">}}
For more information on storing and retrieving such vast amounts of ordered data in YugabyteDB, see [Time series data model](./timeseries).
{{</lead>}}

## Key-value

Expand All @@ -50,13 +52,17 @@ user2.name = "Harry Potter"
user2.country = "UK"
```

Key-value stores are expected to be some of the fastest storage data models. For more information on using YugabyteDB for key-value stores, see [Key-value data model](./keyvalue).
Key-value stores are expected to be some of the fastest storage data models.

{{<lead link="./keyvalue">}}
For more information on using YugabyteDB for key-value stores, see [Key-value data model](./keyvalue).
{{</lead>}}

## Wide-column

In a wide-column data model, the data is organized as rows and columns. Each row is identified by a row `id` or `name` and each column is identified by a column `id` or `name`. Each row can have any number of columns attached to it. You can visualize it as a table-like structure where some of the cells are empty. For example:

```sql{.nocopy}
```caddyfile{.nocopy}
| | col-1 | col-2 | col-3 |
| ----- | ----- | ----- | ----- |
| row-1 | a | | c |
Expand All @@ -66,7 +72,7 @@ In a wide-column data model, the data is organized as rows and columns. Each row

To retrieve specific cells, you can issue commands similar to the following:

```sql{.nocopy}
```python{.nocopy}
get(row-1, col-3) ==> c
get(row-3, col-2) ==> NULL
```
Loading

0 comments on commit c40fff2

Please sign in to comment.