- from Zero to Hero series
- from Zero to Hero series
- Episode 1
- Episode 1
@kokkisajee
www.sajeetharan.dev
const profile = {
role: "Principal Product Manager",
experience: { total: 13, dev: 9, pm: 4 },
passion: ["developer tools", "DX", "databases","Web"],
community: {
stackOverflow: { countryRank: 1, globalTop10: ["Azure", "Javascript", "AzureCosmosDB"] },
titles: ["Google Developer Expert", "Microsoft MVP"],
contributions: ["open-source", "conference speaking"]
},
connect: () => console.log("Interested in web or cloud? Let's talk! π")
};
console.log(`π ${profile.role} | ${profile.experience.total}y experience | Dev β€οΈ PM`);
profile.connect();
π¨βπ¨ Front-End developers ?
π¨βπ» Back-End developers ?
π¦ΈββοΈ Something else ? something in between ?
βοΈ Cloud developers ?
πExplore Azure Cosmos DB JavaScript SDK
πMaster the fundamentals & get started
π Build your first app with the SDK
πBe ready to ask questions
We' all Have been there!
Slow Setup: Staring at a database that takes
forever to set up.
Performance Issues: Struggling with inconsistent
query performance.
Complex SDKs: Wrestling with SDKs that require
a PhD to understand.
Guranteed Performance
Flexibility && Security
Elastic scale out of
Storage & Throughput
Operational + Analytical
Fully Managed
Developer friendly
Automation
24/7 uptime
Native AI capability
Advanced features
"Build blazing-fast, planet-scale apps with familiar Node.js / Javascript experience"
Internal tools :
Community packages (OSS):
basic CRUD, Support consistency levels, query metrics etc
REST
API
Gateway
R
R
R
R
Replicas
HTTP
TCP
https://aka.ms/SDK-Connectivity-modes
Flexible CRUD Operations
- Works seamlessly in Node.js and browser environments
Efficient Bulk Operations
- Support migration scenarios, bulk ingestion
Changefeed Support
- Listen to document updates
Advanced Security
- Supports authentication via MI, RBAC
Seamless Integrations
- Works with Azure functions, Logic apps, other frameworks
Diagnostics Support
- Enhanced insights into your client operations,
1οΈβ£ Install the SDK:
npm install @azure/cosmos
2οΈβ£ Initialize Cosmos Client:
const { CosmosClient } = require("@azure/cosmos");
const client = new CosmosClient("YOUR_CONNECTION_STRING");
2οΈβ£ Initialize Cosmos Client:
const { CosmosClient } = require("@azure/cosmos");
const client = new CosmosClient("YOUR_CONNECTION_STRING");
3οΈβ£ Create a Database & Container:
const { database } = await client.databases.createIfNotExists({ id: "MyDatabase" });
const { container } = await database.containers.createIfNotExists({ id: "MyContainer" });
4οΈβ£ Insert Data:
await container.items.create({ id: "1", name: "Azure Rocks!" });
πMake sure to have the app in same region as azure cosmosdb account
πAlways use the latest version of SDK
πUse single instance of Cosmos Client /Singleton
πEnable diagnostic logging in case of failures/latency
Build apps with latest Javascript SDK and report issues with the tag cosmos
We value your feedback : https://aka.ms/azurecosmos-js
Join the next episode in this series to learn about Best practices with Javascript SDK
Feedback or Questions , reach out cosmosdb-js-sdk@microsoft.com