Mobile data made easy.

One NoSQL database for everything mobile.

Start Building

What's Couchbase Mobile?

Couchbase Mobile is the complete NoSQL database solution for all data storage, access, sync and security across the entire application stack. It includes:
  • Embedded Database

    Couchbase Lite, our embedded database, manages and stores data locally on the device. It has full CRUD and query functionality, and supports all major platforms including iOS, OS X, tvOS, Android, Linux, Windows, Xamarin and more.

  • Synchronization

    Couchbase Mobile includes synchronization between Couchbase Lite and Couchbase Server, and peer-to-peer synchronization between Couchbase Lite instances. Synchronization is orchestrated by Sync Gateway, our secure web gateway.

  • Security

    Built-in enterprise level security includes user authentication, user and role based data access control (RBAC), secure transport over TLS, and 256-bit AES full database encryption.

  • Events

    Couchbase Mobile raises events when data changes in the database. These events can be subscribed to on both the device and server.

  • REST API

    REST APIs provide full programmatic access for reading and writing data over the web. Input and output is JSON, and it's easy to integrate with existing apps and REST architectures.

  • Stream & Batch API

    Stream and Batch APIs enable low latency access to streams of data changes and bulk get and put operations. These APIs balance latency, throughput and fault-tolerance, providing comprehensive management of batch data while using stream processing to provide real-time access to data changes.

  • JSON

    Couchbase Mobile uses JSON as its lightweight and flexible data modeling language. All data is stored and transmitted as JSON, including the embedded database, the database server, REST APIs, stream APIs, and batch APIs.

  • Database Server

    Couchbase Server, our database server, manages and stores data in the cloud. It scales easily to billions of records and terabytes of data, supports millions of concurrent users, and provides 24x365 uptime.

What does it look like to use?

// Get the database (and create it if it doesn't exist)
var database = new Database("mydb");

// Create a new document (i.e. a record) in the database
string id = null;
using (var mutableDoc = new MutableDocument()) {
    mutableDoc.SetFloat("version", 2.0f)
        .SetString("type", "SDK");

    // Save it to the database
    database.Save(mutableDoc);
    id = mutableDoc.Id;
}

// Update a document
using (var doc = database.GetDocument(id))
using (var mutableDoc = doc.ToMutable()) {
    mutableDoc.SetString("language", "C#");
    database.Save(mutableDoc);
    using (var docAgain = database.GetDocument(id)) {
        Console.WriteLine($"Document ID :: {docAgain.Id}");
        Console.WriteLine($"Learning {docAgain.GetString("language")}");
    }
}

// Create a query to fetch documents of type SDK
// i.e. SELECT * FROM database WHERE type = "SDK"
using (var query = QueryBuilder.Select(SelectResult.All())
    .From(DataSource.Database(database))
    .Where(Expression.Property("type").EqualTo(Expression.String("SDK")))) {
    // Run the query
    var result = query.Execute();
    Console.WriteLine($"Number of rows :: {result.Count()}");
}

// Create replicator to push and pull changes to and from the cloud
var targetEndpoint = new URLEndpoint(new Uri("ws://localhost:4984/example_sg_db"));
var replConfig = new ReplicatorConfiguration(database, targetEndpoint);

// Add authentication
replConfig.Authenticator = new BasicAuthenticator("john", "pass");

// Create replicator
var replicator = new Replicator(replConfig);
replicator.AddChangeListener((sender, args) =>
{
    if (args.Status.Error != null) {
        Console.WriteLine($"Error :: {args.Status.Error}");
    }
});

replicator.Start();

// Later, stop and dispose the replicator *before* closing/disposing the database
// Get the database (and create it if it doesn’t exist).
NSError *error;
CBLDatabase *database = [[CBLDatabase alloc] initWithName:@"mydb" error:&error];

// Create a new document (i.e. a record) in the database.
CBLMutableDocument *mutableDoc = [[CBLMutableDocument alloc] init];
[mutableDoc setFloat:2.0 forKey:@"version"];
[mutableDoc setString:@"SDK" forKey:@"type"];

// Save it to the database.
[database saveDocument:mutableDoc error:&error];

// Update a document.
CBLMutableDocument *mutableDoc2 = [[database documentWithID:mutableDoc.id] toMutable];
[mutableDoc2 setString:@"Swift" forKey:@"language"];
[database saveDocument:mutableDoc2 error:&error];
CBLDocument *document = [database documentWithID:mutableDoc2.id];

// Log the document ID (generated by the database)
// and properties
NSLog(@"Document ID :: %@", document.id);
NSLog(@"Learning %@", [document stringForKey:@"language"]);

// Create a query to fetch documents of type SDK.
CBLQueryExpression *type = [[CBLQueryExpression property:@"type"] equalTo:[CBLQueryExpression string:@"SDK"]];
CBLQuery *query = [CBLQueryBuilder select:@[[CBLQuerySelectResult all]]
                                      from:[CBLQueryDataSource database:database]
                                     where:type];

// Run the query
CBLQueryResultSet *result = [query execute:&error];
NSLog(@"Number of rows :: %lu", (unsigned long)[[result allResults] count]);

// Create replicators to push and pull changes to and from the cloud.
NSURL *url = [[NSURL alloc] initWithString:@"ws://localhost:4984/example_sg_db"];
CBLURLEndpoint *targetEndpoint = [[CBLURLEndpoint alloc] initWithURL:url];
CBLReplicatorConfiguration *replConfig = [[CBLReplicatorConfiguration alloc] initWithDatabase:database target:targetEndpoint];
replConfig.replicatorType = kCBLReplicatorTypePushAndPull;

// Add authentication.
replConfig.authenticator = [[CBLBasicAuthenticator alloc] initWithUsername:@"john" password:@"pass"];

// Create replicator.
CBLReplicator *replicator = [[CBLReplicator alloc] initWithConfig:replConfig];

// Listen to replicator change events.
[replicator addChangeListener:^(CBLReplicatorChange *change) {
    if (change.status.error) {
        NSLog(@"Error code: %ld", change.status.error.code);
    }
}];

// Start replication
[replicator start];
// Get the database (and create it if it doesn’t exist).
let database: Database
do {
    database = try Database(name: "mydb")
} catch {
    fatalError("Error opening database")
}

// Create a new document (i.e. a record) in the database.
let mutableDoc = MutableDocument()
    .setFloat(2.0, forKey: "version")
    .setString("SDK", forKey: "type")

// Save it to the database.
do {
    try database.saveDocument(mutableDoc)
} catch {
    fatalError("Error saving document")
}

// Update a document.
if let mutableDoc = database.document(withID: mutableDoc.id)?.toMutable() {
    mutableDoc.setString("Swift", forKey: "language")
    do {
        try database.saveDocument(mutableDoc)
       
        let document = database.document(withID: mutableDoc.id)!
        // Log the document ID (generated by the database)
        // and properties
        print("Document ID :: \(document.id)")
        print("Learning \(document.string(forKey: "language"))")
    } catch {
        fatalError("Error updating document")
    }
}

// Create a query to fetch documents of type SDK.
let query = QueryBuilder
    .select(SelectResult.all())
    .from(DataSource.database(database))
    .where(Expression.property("type").equalTo(Expression.string("SDK")))

// Run the query.
do {
    let result = try query.execute()
    print("Number of rows :: \(result.allResults().count)")
} catch {
    fatalError("Error running the query")
}

// Create replicators to push and pull changes to and from the cloud.
let targetEndpoint = URLEndpoint(url: URL(string: "ws://localhost:4984/example_sg_db")!)
let replConfig = ReplicatorConfiguration(database: database, target: targetEndpoint)
replConfig.replicatorType = .pushAndPull

// Add authentication.
replConfig.authenticator = BasicAuthenticator(username: "john", password: "pass")

// Create replicator.
let replicator = Replicator(config: replConfig)

// Listen to replicator change events.
replicator.addChangeListener { (change) in
    if let error = change.status.error as NSError? {
        print("Error code :: \(error.code)")
    }
}

// Start replication.
replicator.start()
    }
}
// Get the database (and create it if it doesn’t exist).
DatabaseConfiguration config = new DatabaseConfiguration(/* Android Context*/ context);
Database database = new Database("mydb", config);

// Create a new document (i.e. a record) in the database.
MutableDocument mutableDoc = new MutableDocument()
        .setFloat("version", 2.0F)
        .setString("type", "SDK");

// Save it to the database.
database.save(mutableDoc);

// Update a document.
mutableDoc = database.getDocument(mutableDoc.getId()).toMutable();
mutableDoc.setString("language", "Java");
database.save(mutableDoc);
Document document = database.getDocument(mutableDoc.getId());

// Log the document ID (generated by the database) and properties
Log.i(TAG, "Document ID :: " + document.getId());
Log.i(TAG, "Learning " + document.getString("language"));

// Create a query to fetch documents of type SDK.
Query query = QueryBuilder.select(SelectResult.all())
        .from(DataSource.database(database))
        .where(Expression.property("type").equalTo(Expression.string("SDK")));
ResultSet result = query.execute();
Log.i(TAG, "Number of rows ::  " + result.allResults().size());

// Create replicators to push and pull changes to and from the cloud.
Endpoint targetEndpoint = new URLEndpoint(new URI("ws://localhost:4984/example_sg_db"));
ReplicatorConfiguration replConfig = new ReplicatorConfiguration(database, targetEndpoint);
replConfig.setReplicatorType(ReplicatorConfiguration.ReplicatorType.PUSH_AND_PULL);

// Add authentication.
replConfig.setAuthenticator(new BasicAuthenticator("john", "pass"));

// Create replicator.
Replicator replicator = new Replicator(replConfig);

// Listen to replicator change events.
replicator.addChangeListener(new ReplicatorChangeListener() {
    @Override
    public void changed(ReplicatorChange change) {
        if (change.getStatus().getError() != null)
            Log.i(TAG, "Error code ::  " + change.getStatus().getError().getCode());
    }
});

// Start replication.
replicator.start();

Who's using it?

(just a few of our customers building faster, more powerful apps with NoSQL)

  • Powering Predix

    Predix, GE’s software platform for the industrial internet, connects machines like turbines, railcars, wind farms, and more. GE field engineers work in environments where offline is the norm, so GE had to build a platform these remote workers could count on to work anywhere, at any time.

  • Results

    Needing a solution that would give Predix full offline support for these machines and the apps that manage them, GE turned to Couchbase Mobile. In less than 90 days, GE integrated Couchbase Mobile into the Predix platform and in the process, saved years of development time by not having to build their own offline solution and sync engine.

  • Redefining the mobile app user experience

    As one of Europe’s largest airlines, Ryanair’s 3 million+ mobile users rely on the mobile app to book their flights. Ryanair faced customer experience issues with their app. Bookings were taking over 5 minutes to complete and users were unhappy.

  • Results


    With Couchbase Mobile, Ryanair was able to overhaul their entire app experience without significant re-architecture to their existing app. As a result, booking times are 2.5x faster and data transfer is now 8x more efficient. 

Watch the before & after video of their app

  • The power of location-based data

    CrowdComfort’s app unlocks efficiencies in building and workplace management. Companies like DreamWorks and General Electric rely on CrowdComfort to enable their  employees to report, track and resolve site-specific building issues with their smartphones.

  • Use


    With its offline capabilities, scalability and schema-free design, CrowdComfort chose Couchbase Mobile to support a wide range of facilities. Couchbase Mobile ensures a consistently available and fast experience, regardless of network availability and performance.

Mobile data storage, access, sync and security made easy.

One NoSQL database for everything mobile.

Start Building