redpanda-data / redpanda-data/connect

Consider swapping Goja with Sobek for Javascript Processor

Open
#2,846 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement processors ux
Dominant language
Go
Stars
8.8k
Forks
969
Avg merge
1d 13h
Merged PRs (30d)
64

Description

The JavaScript Processor uses Goja, and you have these caveats in your docs.

The execution engine behind this processor provides full ECMAScript 5.1 support (including regex and strict mode). Most of the ECMAScript 6 spec is implemented but this is a work in progress.

Imports via require should work similarly to NodeJS, and access to the console is supported which will print via the Redpanda Connect logger. More caveats can be found on GitHub.

This processor is implemented using the github.com/dop251/goja library.

For these same reasons, the k6 team at Grafana recently forked Goja into Sobek, where they merged their long-outstanding PR for ES Module support. It also looks like they've been merging all other commits to Goja.

Given these advancements, and the deeper resources available at Grafana, it seems to me that it would be prudent to switch to Sobek.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the JavaScript Processor and its current github.com/dop251/goja dependency, then compare Sobek's supported features and compatibility with the processor's documented behavior. Verify whether switching engines preserves the existing require, console, and ECMAScript behavior; done means the processor works with Sobek without retaining the documented Goja limitations.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, javascript
Domain
stream-processing
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.