confluentinc / confluentinc/confluent-kafka-javascript

@confluentinc/schemaregistry performance optimisations: sync serialise function without fetching of new shema

Open
#315 0 comments 0 reactions 0 assignees View on GitHub
component:schema-registry
Dominant language
TypeScript
Stars
304
Forks
45
Avg merge
11h 47m
Merged PRs (30d)
5

Description

Instead of fetching schema in serialise and using async function for it, it's much better to keep that function sync and fetch schemas separately.

If that is not possible, having a separate sync serialise function with separate function for prefetching schemas will be great.

What we have right now:
```
serialize(topic: string, msg: any): Promise;
```

What I am proposing:
```
serialize(topic: string, msg: any): Buffer;

fetchSchemaFor(topic: string); // even if this method is not provided, we can simply use original method for prefetching
```

Contributor guide

Open the contributing guide

Research direction

Start by tracing the @confluentinc/schemaregistry serialize API and its schema-fetching path. Compare the current Promise contract with the proposed synchronous serialize and separate prefetching approach; done means the desired performance and API behavior are defined and covered by the relevant implementation tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.