You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: features/README.md
+12-10
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,9 @@
4
4
5
5
### Specifying addresses of Cassandra nodes
6
6
7
-
[`withContactPoints()`](http://datastax.github.io/php-driver/api/class/Cassandra/Cluster/Builder/#with-contact-points) and [`withPort()`](http://datastax.github.io/php-driver/api/class/Cassandra/Cluster/Builder/#with-port) methods of the [`Cassandra\Cluster\Builder`](http://datastax.github.io/php-driver/api/class/Cassandra/Cluster/Builder/) are used to specify ip addresses or hostnames and port number of the nodes in a given Cassandra cluster.
7
+
[`withContactPoints()`](http://datastax.github.io/php-driver/api/class/Cassandra/Cluster/Builder/#with-contact-points) and [`withPort()`](http://datastax.github.io/php-driver/api/class/Cassandra/Cluster/Builder/#with-port) methods of the [`Cassandra\Cluster\Builder`](http://datastax.github.io/php-driver/api/class/Cassandra/Cluster/Builder/) are used to specify IP addresses or hostnames and port number of the nodes in a given Cassandra cluster.
8
8
9
-
Note that you don't have to specify the addresses of all hosts in your cluster. Once the driver has established a connection to any host, it will perform auto-discovery of and connect to all hosts in the cluster.
9
+
Note that you don't have to specify the addresses of all hosts in your cluster. Once the driver has established a connection to any host, it will perform auto-discovery and connect to all hosts in the cluster.
10
10
11
11
```php
12
12
<?php
@@ -20,7 +20,7 @@ $session = $cluster->connect();
20
20
21
21
### Discovering nodes in the cluster
22
22
23
-
After the initial connection to one of the hosts specified via `withContactPoints()`succeeded, the driver discovers the addresses and connects to all members of the cluster automatically. You can also see the nodes that the driver discovered by running `SELECT * FROM system.peers`.
23
+
After the initial connection to one of the hosts specified via `withContactPoints()`succeeds, the driver discovers the addresses and connects to all members of the cluster automatically. You can also see the nodes that the driver discovered by running `SELECT * FROM system.peers`.
24
24
25
25
### Persistent sessions
26
26
@@ -43,9 +43,9 @@ Persistent sessions stay alive for the duration of the parent process, typically
43
43
44
44
### Configuring load balancing policy
45
45
46
-
PHP Driver comes with a variety of load balancing policies. By default it uses a combination of token aware data center round robin.
46
+
The PHP Driver comes with a variety of load balancing policies. By default it uses a combination of token aware data center round robin.
47
47
48
-
The token aware load balancing policy uses the same hashing algorithms as the Apache Cassandra to route prepared statements execution directly to replica nodes, avoiding an additional network hop to/from the coordinator. You can toggle its usage with [`Cassandra\Cluster\Builder::withTokenAwareRouting()`](http://datastax.github.io/php-driver/api/class/Cassandra/Cluster/Builder/#with-token-aware-routing).
48
+
The token aware load balancing policy uses the same hashing algorithms as the Apache Cassandra to directly route the execution of prepared statements to the replica node, avoiding an additional network hop to/from the coordinator. You can toggle its usage with [`Cassandra\Cluster\Builder::withTokenAwareRouting()`](http://datastax.github.io/php-driver/api/class/Cassandra/Cluster/Builder/#with-token-aware-routing).
49
49
50
50
```php
51
51
<?php
@@ -141,9 +141,9 @@ $session->execute(
141
141
142
142
For frequently executed queries, it's strongly recommended to use prepared statements. As a rule of thumb, if your application is sending a request more than once, a prepared statement is almost always the right choice.
143
143
144
-
### Prepared Statements
144
+
### Prepared statements
145
145
146
-
The driver supports prepared statements. Use [`Cassandra\Session::prepare()`](http://datastax.github.io/php-driver/api/interface/Cassandra/Session/#prepare) to create a [`Cassandra\PreparedStatement` object](http://datastax.github.io/php-driver/api/class/Cassandra/PreparedStatement/), and then call [`Cassandra\Session::execute()`](http://datastax.github.io/php-driver/api/interface/Cassandra/Session/#execute).
146
+
The driver supports prepared statements. Use [`Cassandra\Session::prepare()`](http://datastax.github.io/php-driver/api/interface/Cassandra/Session/#prepare) to create a [`Cassandra\PreparedStatement`](http://datastax.github.io/php-driver/api/class/Cassandra/PreparedStatement/) object, and then call [`Cassandra\Session::execute()`](http://datastax.github.io/php-driver/api/interface/Cassandra/Session/#execute).
147
147
148
148
```php
149
149
<?php
@@ -159,7 +159,7 @@ A prepared statement can be run many times, but the CQL parsing will only be don
159
159
160
160
### Executing statements in parallel
161
161
162
-
With fully asynchronous api, it is very easy to run queries in parallel:
162
+
With fully asynchronous API, it is very easy to run queries in parallel:
163
163
164
164
```php
165
165
<?php
@@ -347,7 +347,9 @@ cassandra.log=syslog
347
347
cassandra.log_level=INFO
348
348
```
349
349
350
-
You can specify any file path as `cassandra.log`. The special value `syslog` can be used to for the driver to use syslog for logging.
350
+
You can specify any file path as `cassandra.log`.
351
+
352
+
The special value `syslog` can be used to for the driver to use syslog for logging. Syslog is only supported on \*nix systems.
351
353
352
354
The possible log levels are:
353
355
@@ -364,6 +366,6 @@ Most of the logging will be when the driver connects and discovers new nodes, wh
364
366
365
367
The PHP Driver follows the architecture of [the C/C++ Driver](http://datastax.github.io/cpp-driver/topics/#architecture) that it wraps.
366
368
367
-
### Persistent Sessions
369
+
### Persistent sessions
368
370
369
371
By default, the driver uses persistent sessions to prevent each request from creating completely new TCP connections to a Cassandra cluster. You can toggle this functionality using [`Cassandra\Cluster\Builder::withPersistentSessions`](http://datastax.github.io/php-driver/api/class/Cassandra/Cluster/Builder/#with-persistent-sessions)
0 commit comments