GithubHelp home page GithubHelp logo

isabella232 / azure-cosmos-db-cassandra-change-feed Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azure-samples/azure-cosmos-db-cassandra-change-feed

0.0 0.0 0.0 15 KB

Azure Cosmos DB Cassandra API Change Feed Sample

License: MIT License

C# 100.00%

azure-cosmos-db-cassandra-change-feed's Introduction

page_type languages products description urlFragment
sample
csharp
azure
azure-cosmos-db
Azure Cosmos DB's API for Cassandra - Change Feed Sample
cassandra-change-feed

Using the Change Feed with Azure Cosmos DB's API for Cassandra

Azure Cosmos DB is Microsoft's globally distributed multi-model database service. You can quickly create and query document, table, key-value, and graph databases, all of which benefit from the global distribution and horizontal scale capabilities at the core of Azure Cosmos DB. This quick start demonstrates how to interact with the Change Feed API using Azure Cosmos DB's API for Cassandra

Running this sample

  1. Clone this repository using git clone https://github.com/azure-samples/azure-cosmos-db-cassandra-change-feed.git

  2. Open the CassandraChangeFeedSample.sln solution. This should automatically restore packages.

  3. Next, configure the endpoints in Program.cs for both DataGenerator and ChangeFeedSample projects:

private const string UserName = "<FILLME>"; 
private const string Password = "<FILLME>";
private const string CassandraContactPoint = "<FILLME>"; //  DnsName
  1. Compile the project.

  2. Set ChangeFeedSample as the startup project, run it. This will create Keyspace and table, and start querying the change feed (initially there will be zero documents returned).

  3. While ChangeFeedSample is running, open the solution file again in a new Visual Studio instance. This time set DataGenerator as the start up project, and run it.

  4. Go back to your open run window for ChangeFeedSample. In each iteration, the Change Feed resumes from the last point at which changes were read. This could be used in a streaming or event sourcing scenario.

About the code

The code included in this sample is intended to demonstrate how to interract with the Change Feed using Azure Cosmos DB's API for Cassandra. The sample shows the Change Feed being queried iteratively, using paging state. The idea of the demo is to show the sample running, while another application (DataGenerator) is writing records to the same Cassandra table.

More information

azure-cosmos-db-cassandra-change-feed's People

Contributors

microsoft-github-operations[bot] avatar microsoftopensource avatar theovankraay avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.