API Wrappers for Independently Compiled JavaScript Binaries

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing technologies face challenges in interfacing independently compiled JAVASCRIPT binary files due to non-deterministic renaming of objects, leading to compatibility issues and increased code redundancy, which hinders optimization and execution speed.

Innovation Solution

Implementing API wrappers in both compiled codes to proxy calls between them, allowing the second compiled code to predict and call the renamed objects in the first compiled code, thereby establishing a compatible interface and reducing redundancy.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If JAVASCRIPT code is compiled with non-deterministic renaming for optimization, then download and execution speed is improved, but compatibility between independently compiled codes deteriorates

Engineering Contradiction:
Improvedownload and execution speedVSAvoidcompatibility between compiled codes
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent introduces an intermediary mechanism (interface specification or contract) that mediates between independently compiled code modules. This interface acts as a mediator that defines stable, deterministic naming conventions and calling conventions that both compiled modules must adhere to, allowing them to interact correctly despite non-deterministic internal renaming. The interface specification serves as the intermediary layer that resolves the compatibility issue while preserving the performance benefits of compilation.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent changes the parameters of the compilation process by introducing configurable options for naming conventions. Specifically, it allows the compiler to use deterministic naming for interface elements (functions, classes, variables that interact between modules) while maintaining non-deterministic renaming for internal implementation details. This parameter change enables compatibility at the interface level while preserving optimization benefits internally.

Inventive Principle:
Principle #35Parameter changes

2Productivity

If JAVASCRIPT code is compiled independently for faster execution, then execution speed is improved, but code redundancy increases

Engineering Contradiction:
Improveexecution speedVSAvoidcode redundancy
Core Design Contradiction:
ProductivityVSQuantity of substance

Solution Approach 1:

The patent uses copying by generating interface specification templates that can be reused across multiple independently compiled modules. Instead of each module containing redundant interface definitions, the interface specification is copied and adapted to each module's context, reducing overall code redundancy while maintaining the ability to compile independently for performance.

Inventive Principle:
Principle #26Copying

3Quantity of substance

If non-deterministic renaming is used during compilation for optimization, then code size is reduced, but interface prediction between modules becomes difficult

Engineering Contradiction:
Improvecode sizeVSAvoidinterface prediction between modules
Core Design Contradiction:
Quantity of substanceVSDifficulty of detecting and measuring

Solution Approach 1:

The patent applies preliminary action by generating interface specifications during the compilation process before the actual module implementation is finalized. These interface specifications are created in advance and serve as a guide for how modules should interact, allowing the compiler to optimize internal naming while maintaining predictable external interfaces. The interface specification is prepared beforehand to guide the compilation and linking process.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS8584105B1Javascript application programming interfaces for independently compiled javascript binaries
Publication Date: 2013.11.12 GOOGLE LLC
  • US8584105B1 patent drawing
  • US8584105B1 patent drawing
  • US8584105B1 patent drawing

AI summary

Systems, servers, methods, and media for interfacing first compiled code of first code with second compiled code of second code are provided. The first compiled code includes a first compiled object that corresponds to an original object in the first code, and includes a first API wrapper that associates the first compiled object with the original object. The second compiled code includes a second compiled object that corresponds to a reference in the second code to the original object, and includes a second API wrapper that associates the second compiled object with the reference. When the second compiled object in the second compiled code is executed, the second compiled code calls the second API wrapper, the second API wrapper proxies the call to the first API wrapper, and the first API wrapper proxies the call to the first compiled object in the first compiled code.