Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Porting Scaleout sample from C# to JavaScript #3968

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gandiddi
Copy link
Collaborator

Porting Scaleout sample from C# to JavaScript

@gandiddi gandiddi requested a review from a team as a code owner April 24, 2024 13:11
@gandiddi gandiddi linked an issue Apr 24, 2024 that may be closed by this pull request
Copy link
Member

@tracyboehrer tracyboehrer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See inline comments. Also, not at all obivous, but there is a README in the samples folder that has a table of samples for each language. Likely need to update that table to include this.

const memoryStorage = new MemoryStore();

// Create conversation and user state with in-memory storage provider.
const conversationState = new ConversationState(memoryStorage);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think these are used in this sample?

samples/javascript_nodejs/42.scale-out/index.js Outdated Show resolved Hide resolved
@@ -0,0 +1,27 @@

class MemoryStore {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Subclass Store


const { BlobServiceClient, StorageSharedKeyCredential } = require('@azure/storage-blob');

class BlobStore {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Subclass Store

// Create the storage key for this conversation.
const key = `${ context.activity.channelId }/conversations/${ context.activity.conversation?.id }`;

var store = new MemoryStore();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Store is passed via construction. See also index.js

samples/javascript_nodejs/42.scale-out/package.json Outdated Show resolved Hide resolved
@tracyboehrer
Copy link
Member

@gandiddi There are some unresolved comments.

@gandiddi
Copy link
Collaborator Author

gandiddi commented May 6, 2024

See inline comments. Also, not at all obivous, but there is a README in the samples folder that has a table of samples for each language. Likely need to update that table to include this.

Updated the table in README for JS scaleout sample

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JavaScript version of the Scaleout sample is missing
2 participants