Create FuzeWorks::DeepThought #7

Open
opened 2019-12-29 14:58:00 +00:00 by abelhooge · 0 comments
Owner

XDebug has the ability to track all activity of a PHP application. DeepThought is an application that integrates into the Tracy Toolbar, and provides the ability to restart the application with a detailed application history.

DeepThought creates this ability by creating a socket connection, which launches another FuzeWorks instance, which will do the tracking. The process is as follows;

  • FuzeWorks receives a request that the user wants a DeepThought analysis of the program.
  • FuzeWorks pauses all activity after coreStartEvent and starts the DeepThought client library
  • The client library generates a secret token for communication with the DeepThought server, and saves this in a shared file.
  • The client starts a socket using the secret token, and launches another FuzeWorks instance which will serve as the Deepthought Server
  • The DeepThought server connects with xDebug Remote, and writes the GO command to the shared file. The Server now tracks every step of the client program.
  • The client program continues its program upon receiving the GO command
  • Upon finishing the client program, the DeepThought Server generates a report and writes it to the shared file.
  • The client will refresh without connecting to the DeepThought Server, and will read the report in the shared file, and present it to the user.
  • The client will destroy the shared file

In order for this to work, xDebug needs to be installed and PHP sockets need to be available. Write permissions are also presumed.

XDebug has the ability to track all activity of a PHP application. DeepThought is an application that integrates into the Tracy Toolbar, and provides the ability to restart the application with a detailed application history. DeepThought creates this ability by creating a socket connection, which launches another FuzeWorks instance, which will do the tracking. The process is as follows; - FuzeWorks receives a request that the user wants a DeepThought analysis of the program. - FuzeWorks pauses all activity after ``coreStartEvent`` and starts the DeepThought client library - The client library generates a secret token for communication with the DeepThought server, and saves this in a shared file. - The client starts a socket using the secret token, and launches another FuzeWorks instance which will serve as the Deepthought Server - The DeepThought server connects with xDebug Remote, and writes the GO command to the shared file. The Server now tracks every step of the client program. - The client program continues its program upon receiving the GO command - Upon finishing the client program, the DeepThought Server generates a report and writes it to the shared file. - The client will refresh without connecting to the DeepThought Server, and will read the report in the shared file, and present it to the user. - The client will destroy the shared file In order for this to work, xDebug needs to be installed and PHP sockets need to be available. Write permissions are also presumed.
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: FuzeWorks/Core#7
No description provided.