Runtime API Visibility Attributes for Controlled Dynamic Access
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing runtime environments allow dynamic access to both public and non-public APIs, leading to unnecessary computing resource consumption and potential breaking changes due to servicing or versioning issues, and lack of precise control over API visibility.
Innovation Solution
Implementing attributes to alter the default visibility of APIs in a runtime environment, allowing for controlled dynamic access based on API type, reducing visibility, and preventing dynamic access to non-public APIs when necessary.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If runtime environments permit dynamic calls to any API in a third party library, then code flexibility and adaptability are improved, but computing resource overhead increases and reliability decreases
Solution Approach 1:
The patent applies different visibility attributes to different APIs within the same library, allowing each API to have its own access control characteristics. Public APIs maintain full dynamic accessibility while private APIs have restricted access, creating local quality differences in access permissions that reduce unnecessary metadata overhead for uncalled APIs while preserving code flexibility for required APIs.
2Adaptability or versatility
If runtime environments permit dynamic calls to any API in a third party library, then code flexibility is improved, but versioning stability deteriorates
Solution Approach 1:
The patent applies visibility attributes to APIs during the compilation phase, before runtime execution. This preliminary action establishes clear access rules that prevent dynamic calls to private APIs, thereby preventing potential breaking changes from version updates. The attributes are embedded in the compiled code, ensuring that even as library versions evolve, the access control rules remain enforced and stable.
3Ease of operation
If default visibility is provided to all APIs, then ease of operation is improved, but device complexity increases
Solution Approach 1:
The patent extracts the visibility control mechanism from the complex runtime environment and implements it at compile time through attributes. This removes the burden of dynamic visibility management from the runtime system, simplifying its complexity while maintaining ease of operation for developers who can simply apply attributes during code writing without managing complex runtime permissions.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
The invention comprises, at a computer system, the computer system including a development environment for developing executable code that includes application programming interfaces (APIs), the executable code for running in a runtime environment that can dynamically request access to the application program interfaces (APIs), the runtime environment providing dynamic access requests with a default visibility into application program interfaces (APIs) based on application program interface (API) type, the API type being selected from a group comprising internal, private and public, a method for controlling runtime access to the application programming interfaces (APIs), the method comprising: accessing a set of application programming interfaces (APIs) combined in a library, the set of application programming interfaces (APIs) including one or more public application programming interfaces (APIs) and one or more non-public application programming interfaces (APIs); identifying an application programming interface (API) from among the set of application programming interfaces (APIs) for which the default visibility provided to dynamic access requests is to be altered; and altering the default visibility into the application programming interface (API) to an altered visibility by applying an attribute different from the API type, to the application programming interface (API), the attribute indicating to the runtime environment at runtime that dynamic access requests are to be provided the altered visibility into the application programming interface (API); wherein identifying an application programming interface (API) comprises identifying a public application programming interface (API), the default visibility for the public application programming interface (API) allowing dynamic access to the public application programming interface (API); and wherein altering the default visibility of the application programming interface (API) comprises applying an attribute different from the API type to the public application programming interface (API), the attribute altering the default visibility for the public application programming interface (API) to prevent dynamic access to the public application programming interface (API).