ArOZ Online System File Explorer - Freeze Script Execution Application, design for replacing those script that was freezing the system while file IO.

TC b4ee483026 更新 'LICENSE' před 5 roky
log 9deaa15041 init-commit před 5 roky
LICENSE b4ee483026 更新 'LICENSE' před 5 roky
README.md 0fef908022 Update 'README.md' před 5 roky
examples.txt 9deaa15041 init-commit před 5 roky
fsexec.exe c2e0199609 Updated binary for amd64,i386 and armv6l před 5 roky
fsexec_amd64.elf c2e0199609 Updated binary for amd64,i386 and armv6l před 5 roky
fsexec_arm64.elf 7679eed27c Added arm64 binary před 5 roky
fsexec_armv6l.elf c2e0199609 Updated binary for amd64,i386 and armv6l před 5 roky
fsexec_i386.elf c2e0199609 Updated binary for amd64,i386 and armv6l před 5 roky
main.go 4e67385396 update chmod settings před 5 roky
title.png 0862c7fb2b updated banner image před 5 roky
title.psd 0862c7fb2b updated banner image před 5 roky

README.md

fsexec

ArOZ Online System File Explorer - Freeze Script Execution Application, design for replacing those script that was freezing the system while file IO.

What is Freeze Script Execution Application?

Freeze Script Execution Application - Short for fsexec, is a binary written in golang to replace the old scripts in the ArOZ Online File System that would freeze the whole PHP server during file IO operations. This script make use of golang's super fast IO and processing ability and make file operation much faster on the new implementation.

The fsexec application will receive the command as two parts. In most case, you will be using these funcitons only.

./fsexec {uuid} {command}

where command is a string in base64 encoded JSON string.

So, how can I use this binary?

For example, you want to use the funciton [copy] with paramter {source} and {target}.

First, you need to convert the command into an array and parse it as JSON string.

For example, you have the following command array:

["copy","./test.txt","target/test.txt"]

Next, you would want to stringify it as JSON string.

"[\"copy\",\"./test.txt\",\"target/test.txt\"]"

Then, you can convert the string above into base64 representation. This is what you will get:

WyJjb3B5IiwiLi90ZXN0LnR4dCIsInRhcmdldC90ZXN0LnR4dCJd

Lastly, you call the fsexec with the following command. Assumeing the {uuid} is [123]

./fsexec 123 WyJjb3B5IiwiLi90ZXN0LnR4dCIsInRhcmdldC90ZXN0LnR4dCJd

Here are some examples:

# copy test.txt test/test.txt
./fsexec uuid_string WyJjb3B5IiwidGVzdC50eHQiLCJmb2xkZXIvdGVzdC50eHQiXQ==

# copy_folder test/ target/test/
./fsexec uuid_string WyJjb3B5X2ZvbGRlciIsInRlc3QvIiwidGFyZ2V0L3Rlc3QvIl0=

The fsexec application will create a folder named "log" if it doesn't exists. Inside the log folder, you would found "done" and "error" sub-folders. In simple words:

  • For all successfully finished file operation, its log will be stored in "done" directory.
  • For all failed file operation, its log will be stored in "error" directory.
  • For all processing file operation, its log will be stored under "log/" directory but not its subfolders.

What is UUID then?

As its name suggest, UUID is a unique string or interger that can be used to identify each file operations. You can use anything you want as soon as it is unique. Just to make sure don't use some wierd, not universal-supported characters.

License

CopyRight Author Toby Chui under ArOZ Online Project, 2019