Uploaded image for project: 'Couchbase Documentation'
  1. Couchbase Documentation
  2. DOC-2877

[guides] move walrus mode to getting started

    XMLWordPrintable

Details

    Description

      First comment:

          1. Using Walrus

      [Walrus](https://github.com/couchbaselabs/walrus), which is built into Sync Gateway, is a simple, limited, in-memory database that you can use in place of Couchbase Server for unit testing during development.

      Use the following command to start a Sync Gateway that connects to a single Walrus database called `sync_gateway` and listens on the default ports:

      ```bash
      sync_gateway -url walrus:
      ```

      To use a different database name, use the `-bucket` option. For example:

      ```bash
      sync_gateway -url walrus: -bucket mydb
      ```

      By default, Walrus does not persist data to disk. However, you can make your database persistent by specifying an existing directory to which Sync Gateway can periodically save its state. It saves the data to a file named `/<directory>/sync_gateway.walrus`. For example, the following command instructs Sync Gateway to save the data in a file named `/data/sync_gateway.walrus`.

      ```bash
      mkdir /data
      sync_gateway -url walrus:/data
      ```

      You can use a relative path when specifying the directory for persistent data storage.

      ```bash
      mkdir data
      sync_gateway -url walrus:data
      ```

      You can also specify the directory for persistent data storage in a configuration file. The *config.json* file would look similar to the following JSON fragment:

      ```bash
      {
      "databases": {
      "couchchat":

      { "server": "walrus:data" ... }

      ...
      }
      ...
      }
      ```

      Our own engineering team utilizes Walrus in place of a Couchbase Server installation to conveniently and quickly gain feedback during unit testing. Based on our experience, it is best to start with Walrus when developing with the Couchbase Mobile stack for the first time, but there are caveats to this prototyping model. In particular, the number of clients that Walrus can comfortably support generally is no more than one or two clients. For those doing advanced prototyping with larger datasets or more clients, we recommend using a true Couchbase Server database.

      see other comments: https://github.com/couchbaselabs/couchbase-mobile-portal/issues/587

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jamiltz James Nocentini
            jamiltz James Nocentini
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty