Transparent node runtime and management layer
Uloženo v:
| Název: | Transparent node runtime and management layer |
|---|---|
| Patent Number: | 10055,199 |
| Datum vydání: | August 21, 2018 |
| Appl. No: | 15/040309 |
| Application Filed: | February 10, 2016 |
| Abstrakt: | A server computer. The server computer comprises a processor, a non-transitory memory, a application comprising JavaScript instructions stored in the non-transitory memory, a runtime stored in the non-transitory memory, and a native agent module stored in the non-transitory memory. When executed by the processor, the runtime provides a JavaScript execution environment for executing the application and an instrumentation application programming interface (API). When executed by the processor outside of the runtime, the native agent module monitors memory buffers allocated to the application based on accessing the instrumentation API of the runtime, executes an event loop that sends an interrupt to the runtime, and provides reporting based on monitoring the memory buffers and the interrupt sent to the runtime to a management layer external to the server computer. |
| Inventors: | NodeSource, Inc. (Anaheim, CA, US) |
| Assignees: | NodeSource, Inc. (Anaheim, CA, US) |
| Claim: | 1. A server computer, comprising: a processor; a non-transitory memory, wherein the non-transitory memory stores a plurality of security rules; an application comprising JavaScript instructions stored in the non-transitory memory; a runtime stored in the non-transitory memory that, when executed by the processor, provides a JavaScript execution environment for executing the application and an instrumentation application programming interface (API), reads the security rules from the non-transitory memory, and provides the JavaScript execution environment for executing the application according to constraints defined by the security rules; and a native agent module stored in the non-transitory memory that, when executed by the processor outside of the runtime monitors memory buffers allocated to the application based on accessing the instrumentation API of the runtime, executes an event loop that sends an interrupt to the runtime, and provides reporting based on monitoring the memory buffers and the interrupt sent to the runtime to a management layer external to the server computer. |
| Claim: | 2. The server of claim 1 , wherein the runtime, when executed by the processor, creates memory buffer logs at the time of dynamic allocation of memory buffers to the application and wherein the native agent module monitors memory buffers by accessing the memory buffer logs via the instrumentation API of the runtime. |
| Claim: | 3. The server computer of claim 1 , wherein the native agent module comprises call back methods and wherein the application comprises an agent application programming interface that the application, when executed by the processor, invokes to cause the native agent module, when executed by the processor, to execute one of the call back methods of the agent. |
| Claim: | 4. The server computer of claim 1 , wherein the runtime, when executed by the processor, creates an include log that identifies the name of a module included by the application and wherein the native agent module, when executed by the processor, accesses the include log via the instrumentation API of the runtime and provides the include log in the reporting sent to the management layer external to the server computer. |
| Claim: | 5. The server computer of claim 1 , wherein the native agent module, when executed by the processor, registers with the management layer external to the server computer and sends a heartbeat message periodically to the management layer external to the server computer. |
| Claim: | 6. The server computer of claim 1 , wherein the runtime, when executed by the processor, creates event logs associated with events on a runtime event loop, wherein the event logs comprise an event handle, an identifier of a code file of the application that generated the event, and a line number in the code file that generated the event, and wherein the native agent module, when executed by the processor, accesses the event log via the instrumentation API of the runtime and provides the event log in the reporting sent to the management layer external to the server computer. |
| Claim: | 7. A method of executing a JavaScript application, comprising: initiating a process on a first computer, where the process comprises a runtime that provides a JavaScript execution environment for a JavaScript application and an instrumentation application programming interface (API) for a native agent module, the JavaScript application that executes in the runtime, and the native agent module that executes on the first computer outside of the runtime and accesses the instrumentation API of the runtime to monitor the runtime and the JavaScript application; monitoring, by the native agent module, memory buffers allocated to the Javascript application at a time of a dynamic allocation of the memory buffers based on accessing the instrumentation API of the runtime, wherein the memory buffers are outside of a heap memory; sending a request from a console application executing on a second computer to the native agent module, where the request identifies information monitored by the native agent module, wherein the information comprises information on the memory buffers; receiving the information from the native agent module by the console application; analyzing the received information by the console application to determine a current performance of the JavaScript application; based on the analysis of performance of the JavaScript application, sending a command to the native agent module by the console application; and providing a command input to the runtime by the native agent module based on the command sent by the console application, whereby the runtime and the JavaScript application are monitored and controlled by the console application. |
| Claim: | 8. The method of claim 7 , wherein analyzing the received information by the console application to determine the current performance of the JavaScript application further comprises comparing the current performance of the JavaScript application to a generalized performance of a set of peer JavaScript applications. |
| Claim: | 9. The method of claim 8 , further comprising depicting the performance of the JavaScript application compared to the generalized performance of the set of peer JavaScript applications on a user interface display provided by the console application. |
| Claim: | 10. The method of claim 9 , wherein the performance of the JavaScript application is presented on the user interface display as a point in a two-dimensional plane defined by a memory consumption axis and a CPU cycle consumption axis and the performance of the set of peer JavaScript applications are presented on the user interface display as points in the two-dimensional plane defined by the memory consumption axis and the CPU cycle consumption axis. |
| Claim: | 11. The method of claim 7 , further comprising sending a request to interrupt the runtime from the console application to the native agent module, whereby the native agent module causes the runtime to breakout of one of an infinite loop or a lengthy processing step. |
| Claim: | 12. The method of claim 7 , further comprising analyzing the received information by the console application to identify modules included by the JavaScript application; comparing the included modules to a list of black listed modules by the console application; and generating by the console application a notification that one of the included modules is a black listed module. |
| Claim: | 13. The method of claim 12 , further comprising: comparing by the console application a checksum associated with the included modules included in the received information to an authoritative checksum associated with the included modules; and generating by the console application a notification that the checksum associated with one of the included modules does not compare with the authoritative checksum associated with the included module. |
| Claim: | 14. A method of managing a plurality of JavaScript processes, comprising: initiating a plurality of processes on a first computer system, where each process comprises a runtime that provides a JavaScript execution environment for a JavaScript application and an instrumentation application programming interface (API) for a native agent module, the JavaScript application that executes in the runtime, and the native agent module that executes on the computer system outside of the runtime and accesses the instrumentation API of the runtime to monitor the runtime and the JavaScript application; receiving registrations of the native agent modules of the plurality of processes by a hub application that executes on a second computer system; in response to each native agent module registration, creating by the hub application an entry in a hub registry data store associated with the native agent module that identifies at least one identifier associated with the native agent module and a communication address of the native agent module; receiving heartbeat messages from native agent modules by the hub application; removing an entry from the hub registry data store in response to determining that a heartbeat message has not been received from a native agent module associated with an entry in the hub registry data store for at least a predefined length of time; identifying a cluster comprising a plurality of JavaScript applications, wherein each JavaScript application of the plurality of JavaScript applications share a common property; receiving a message from a management console by the hub application, where the message from the management console identifies the cluster; looking up, by the hub application, a communication address of the each native agent module associated with each JavaScript application of the plurality of JavaScript applications in the cluster based on the cluster identified in the message from the management console; and sending the message from the management console by the hub application to each identified native agent module at the looked-up communication address of each native agent module, whereby the processes on the first computer system are managed and monitored by the management console. |
| Claim: | 15. The method of claim 14 , wherein the communication address of the native agent modules identified in the entries in the hub registry data store comprises an internet protocol (IP) address. |
| Claim: | 16. The method of claim 15 , wherein the communication address of the native agent modules further comprises a protocol port number. |
| Claim: | 17. The method of claim 14 , wherein the plurality of processes on the first computer system implement a web server functionality. |
| Patent References Cited: | 6658453 December 2003 Dattatri 9183116 November 2015 Ajith Kumar 9516053 December 2016 Muddu 9746551 August 2017 Scholten 2003/0196136 October 2003 Haynes 2005/0039171 February 2005 Avakian 2005/0039187 February 2005 Avakian 2005/0216421 September 2005 Barry 2009/0119549 May 2009 Vertes 2010/0325474 December 2010 Gopinath 2012/0041638 February 2012 Johnson 2012/0144374 June 2012 Gallagher 2013/0268257 October 2013 Hu 2014/0095945 April 2014 Sankaran 2014/0281304 September 2014 Hoffman 2014/0298041 October 2014 Consalus 2014/0317603 October 2014 Gataullin 2015/0082283 March 2015 Smith 2015/0172151 June 2015 Bottalico 2015/0227362 August 2015 Dvinsky 2015/0281035 October 2015 Melikyan 2015/0378756 December 2015 Lensmar 2015/0378864 December 2015 Lensmar 2016/0078347 March 2016 Salajegheh 2016/0105328 April 2016 Cooper 2016/0112245 April 2016 Mankovskii 2016/0266998 September 2016 Gautallin 2016/0323160 November 2016 Melikyan 2017/0033980 February 2017 Naous 2017/0123818 May 2017 Roth 2017/0185424 June 2017 Cooper |
| Primary Examiner: | Brophy, Matthew J |
| Přístupové číslo: | edspgr.10055199 |
| Databáze: | USPTO Patent Grants |
| Abstrakt: | A server computer. The server computer comprises a processor, a non-transitory memory, a application comprising JavaScript instructions stored in the non-transitory memory, a runtime stored in the non-transitory memory, and a native agent module stored in the non-transitory memory. When executed by the processor, the runtime provides a JavaScript execution environment for executing the application and an instrumentation application programming interface (API). When executed by the processor outside of the runtime, the native agent module monitors memory buffers allocated to the application based on accessing the instrumentation API of the runtime, executes an event loop that sends an interrupt to the runtime, and provides reporting based on monitoring the memory buffers and the interrupt sent to the runtime to a management layer external to the server computer. |
|---|