See: Description
Interface | Description |
---|---|
ClusterFacade |
Represents a Couchbase Cluster.
|
OriginalMutationResult |
Represents mutation metadata which can be inspected after a mutation and during/after is respective observe poll cycles.
|
Class | Description |
---|---|
CoreContext |
The
CoreContext contains required assets which are shared on a per-core basis. |
CouchbaseCore |
The general implementation of a
ClusterFacade . |
RequestEvent |
A pre allocated event which carries a
CouchbaseRequest and associated information. |
RequestEventFactory |
A factory to preallocate
RequestEvent s. |
RequestHandler |
The
RequestHandler is responsible for adding and removing Node s as well as dispatching Service management operations. |
ResponseEvent |
A pre allocated event which carries a
CouchbaseResponse and associated information. |
ResponseEventFactory |
A factory to preallocate
ResponseEvent s. |
ResponseHandler |
Exception | Description |
---|---|
BackpressureException |
Identifies the need to back off on the supplier side when using a service, because the consumer is overloaded.
|
BucketClosedException |
A RuntimeException being thrown whenever an operation on a bucket that has been closed is attempted.
|
CouchbaseException |
Common parent exception to build a proper exception hierachy inside the driver.
|
DocumentConcurrentlyModifiedException |
Exception indicating that the document which is observed has been modified in the meantime.
|
DocumentMutationLostException |
The observed document was lost during a hard failover, because the document did not reach the replica in time.
|
ReplicaNotAvailableException |
This exception is thrown when the given operation targeting a specific replica is not fulfillable because the replica is not available (the node has been failed over or is marked as down).
|
ReplicaNotConfiguredException |
This exception is thrown when the given operation targeting a specific replica is not fulfillable because the replica is not configured (for example replica 2 is asked for, but only 1 is configured).
|
RequestCancelledException |
This exception is thrown when there is a problem in the underlying network I/O.
|
ServiceNotAvailableException |
Exception which states that the service is not available for the bucket.
|
This documentation describes the domain model of the core package, covers important architecture and design decisions and provides a solid introduction on the inner workings. For more detailed descriptions on the individual components, see the package documentation for the corresponding package.
The domain model of the application is inspired by DDD (Domain Driven Design) and is intended to clearly reflect the domain language of a database client library. There are a few crucial components which need proper definition, so here they are. Afterwards, they are discussed in context:
Channel
is the socket abstraction provided by the Netty framework. It handles all the underlying raw input and output communication.Endpoint
wraps a Channel and is, as far as the upper layers are concerned the most atomic receiver of a request. It eventually pushes the request into the channel if it is connected and able to serve it properly. Endpoints always serve a special purpose, for example they only handle view requests, query requests or binary requests.Service
contains 1 to N Endpoints. Its state is always a culmination of all owned Endpoint states. When it receives a request, it dispatches it - based on a strategy - into one Endpoint. As an endpoint, a Service only handles a special type of requests (view, query, binary,…).Node
is the logical equivalent of a Node in a Couchbase Server cluster. It has many Services attached to it, but not every node needs to have all the same Services.Here is a simplified diagram that shows the tree-like relations:
The actual implementation is a little more complicated since some parts have been left out in the simplified illustration. Especially the RingBuffers play an important role in the architecture. The following diagram shows a more complete picture, explanation afterwards.
Two dependencies are most crucial contributors to the current architecture:
Other runtime dependencies are:
Finally, we use the following dependencies for unit, integration and performance tests:
Copyright © 2018 Couchbase, Inc.. All rights reserved.