# Core concepts



See a brief definition of the main items in Jitsu and how they related to each other.

<EmbeddedExcalidraw src="https://app.excalidraw.com/s/82iXP5ooHoR/9BVqnq2Ueas"  />


Core concepts are:

* [Site](#sites) (aka Push Sources, aka Steam),
* [Destination](#destinations)
    * [Cloud Destination](#cloud-destinations)
    * [Device Destination](#device-destinations)
    * [Data Warehouse](#data-warehouse-destinations)
* [Connections](#connections) - link between Site and Destination (many-to-many)
* [Function](#functions)
* [Connector](#connectors)
* [Sync](#syncs) - link between Connector and Destination (many-to-many)

## Sites

<Screenshot src="/docs/screenshots/core-concepts/sites.png" />

Also known as `Stream` or `Push Source` or `App`

*Site* indicates the source of incoming events. While typically the source is a website or web application,
it could be also mobile application, backend service, or any other source of events.

The site generates events and pushes them to Jitsu. Events are typically triggered by user actions such
as page views, screen views, conversions etc.

Each project can have multiple sites. There're number of ways to send data from the site:

* [HTML snippet](/docs/sending-data/html)
* [React Lib](/docs/sending-data/react)
* [JS Package](/docs/sending-data/npm)
* [HTTP API](/docs/sending-data/http)

See [Sending data](/docs/sending-data) for more details.

## Destinations

<Screenshot src="/docs/screenshots/core-concepts/destinations.png" />

Destination is a place where Jitsu sends events coming from Sites. Destination could be a database () or
external service (e.g.Product Analytics, or CRM). 

Before sending to destination Jitsu batches data if necessary and applies [functions](/docs/functions).

### Data Warehouse Destinations

Data warehouse destinations are used to store raw events in a data warehouse. Jitsu supports number of data warehouses:
[BigQuery](/docs/destinations/warehouse/bigquery), [ClickHouse](/docs/destinations/warehouse/bigquery), [Redshift](/docs/destinations/warehouse/bigquery),
[MySQL](/docs/destinations/warehouse/mysql), [Postgres](/docs/destinations/warehouse/mysql) and [more](https://jitsu.com/integrations/destinations).

Datawarehouse destinations support stream and batch modes:

 * Stream - events are sent to destination as soon as they are received by Jitsu
 * Batch - events are sent to destination in batches. Batch size is configurable

In most cases, batch mode is preferable. Most of the data warehouses (on the high volumes) either do not support streaming at all,
or significantly more expensive. The only exception is ClickHouse with [Async Inserts](https://clickhouse.com/blog/asynchronous-data-inserts-in-clickhouse)

### Cloud Destinations

Cloud destinations are external SaaS services that accept events via API. The most common examples are product analytics services and CRMs. See
a list of supported destinations [here](https://jitsu.com/integrations/destinations)

### Device Destinations

Device destinations are being executed on a client-side by exectuing JavaScript code (aka JS Tag, or JS Pixel) in the browser.
The main examples are [Google Analytics 4](/docs/destinations/ga4-tag) and [Tag](/docs/destinations/tag) — an arbitrary piece of JavaScript code

:::caution

[Functions](/docs/functions) are applied only to Datawarehouse destinations and Cloud Destinations, but not to Device destinations

:::


## Connections

<Screenshot src="/docs/screenshots/core-concepts/connections.png" />

Connection is a link between Site and Destination. Each connection has a set of rules that define how data is processed

`Site <-> Destination` is `many-to-many` relationship. It means that destination can receive data from multiple sites. And site can send
data to multiple destinations (it is call multiplexing)

## Functions

Function is a JavaScript code that is applied to tge events from site. The typical use-case is data filtering, enrichment and transformation.
[Read a detailed function guide to learn more](/docs/functions)


## Connectors

Connectors, or `Pull Sources` are pulling data from external services via API and store the data into Destinations. Connectors
mostly are wrappers around [Airbyte](https://github.com/airbytehq/airbyte/tree/master/airbyte-integrations/connectors/) connectors, but some connectors a "Native", they are maintained by Jitsu team.

See a full list of connectors [here](https://jitsu.com/integrations/connectors?showCatalog=true)


## Syncs

Sync is a link between a connector and a destination. You can create multiple syncs for the same connector, which makes `Connector <-> Destination`
`many-to-many` relationship.

The sync defines what data to pull from the connector, and how often

<Screenshot src="/docs/screenshots/core-concepts/sync.png" />




:::caution

[Functions](/docs/functions) can't be applied to data that comes from Connectors

:::