Skip to content

Commit 9d200bc

Browse files
author
Bulat Shakirzyanov
committed
update docs based on feedback
1 parent 803a324 commit 9d200bc

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

features/README.md

+12-10
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
### Specifying addresses of Cassandra nodes
66

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.
88

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.
1010

1111
```php
1212
<?php
@@ -20,7 +20,7 @@ $session = $cluster->connect();
2020

2121
### Discovering nodes in the cluster
2222

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`.
2424

2525
### Persistent sessions
2626

@@ -43,9 +43,9 @@ Persistent sessions stay alive for the duration of the parent process, typically
4343

4444
### Configuring load balancing policy
4545

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.
4747

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).
4949

5050
```php
5151
<?php
@@ -141,9 +141,9 @@ $session->execute(
141141

142142
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.
143143

144-
### Prepared Statements
144+
### Prepared statements
145145

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).
147147

148148
```php
149149
<?php
@@ -159,7 +159,7 @@ A prepared statement can be run many times, but the CQL parsing will only be don
159159

160160
### Executing statements in parallel
161161

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:
163163

164164
```php
165165
<?php
@@ -347,7 +347,9 @@ cassandra.log=syslog
347347
cassandra.log_level=INFO
348348
```
349349

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.
351353

352354
The possible log levels are:
353355

@@ -364,6 +366,6 @@ Most of the logging will be when the driver connects and discovers new nodes, wh
364366

365367
The PHP Driver follows the architecture of [the C/C++ Driver](http://datastax.github.io/cpp-driver/topics/#architecture) that it wraps.
366368

367-
### Persistent Sessions
369+
### Persistent sessions
368370

369371
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

Comments
 (0)