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

Proof of concept port to Fastly Compute@Edge #60

Closed
wants to merge 1 commit into from

Conversation

acme
Copy link

@acme acme commented May 24, 2023

This change is a proof of concept port to Fastly Compute@Edge.

It uses:

  • Service Worker rather than Express
  • Streams Standard rather than node:stream
  • Fetch Standard rather than Got
  • EventTarget and CustomEvent rather than EventEmitter
  • Crypto.js rather than node:crypto

The code has a number of limitations:

  • The performance has not been evaluated.
  • It does not contain an example.
  • It includes internal debugging.
  • It requires a custom version of atlas-html-stream
  • The host name and any extra HTTP headers have to be hard-coded into the source code.

Do not merge.

This change is a proof of concept port to Fastly Compute@Edge.

It uses:
  * Service Worker rather than Express
  * Streams Standard rather than node:stream
  * Fetch Standard rather than Got
  * EventTarget and CustomEvent rather than EventEmitter
  * Crypto.js rather than node:crypto

The code has a number of limitations:

* The performance has not been evaluated.
* It does not contain an example.
* It includes internal debugging.
* It requires a custom version of atlas-html-stream
* The host name and any extra HTTP headers have to be hard-coded into
  the source code.

/* eslint-disable-next-line new-cap */
const md5 = CryptoJS.MD5(string);

Choose a reason for hiding this comment

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

We can hopefully replace this dependency with our native implementation of MD5 digests crypto.subtle.digest('MD5', arraybuffer-or-typedarray)
https://js-compute-reference-docs.edgecompute.app/docs/globals/SubtleCrypto/prototype/digest#parameters

@markusn
Copy link
Contributor

markusn commented Nov 14, 2023

superseded by #70

@markusn markusn closed this Nov 14, 2023
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.

3 participants