66 Star 608 Fork 191

Old Apple / jarboot

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 5.58 KB
一键复制 编辑 原始数据 按行查看 历史

Jarboot server

主要功能(Major function)

  • Web服务器,实现http接口,及前端资源代理
  • 作为WebSocket服务端与其管理的其他Java进程客户端交互
  • 权限认证,部分命令和操作需要认证用户权限

架构(Architecture)

模块关系(Modules)

Modules 模块关系
┏━━━━━━━━━━━━━━━━━┓
┃    Browser      ┃          ┏━━━━━━━━━━━━━━━━━┓
┗━━━━━━━━┯━━━━━━━━┛    ╭─────┨ jarboot-agent   ┠──────────────╮
     http│websocket    │     ┗━━━━━━━━━━━━━━━━━┛              │JarbootClassLoader
         │             │                                      │
         ▼             ▼                                      ▼ core作为客户端反向连接jarboot-server
┏━━━━━━━━━━━━━━━━━┓ attach   ┏━━━━━━━━━━━━━━━━━┓      ┏━━━━━━━━━━━━━━━━━┓
┃ jarboot-server  ┠─────────>┃ target process  ┠─────>┃ jarboot-core    ┃<────╮
┗━━━━━━━━━━━━━━━━━┛          ┗━━━━━━━━━━━━━━━━━┛      ┗━━━━━━━━┯━━━━━━━━┛     │
         ▲                                                     │              │
         ╰─────────────────────────────────────────────────────╯              │ class loaded
              http and websocket connect to jarboot-server                    │
                                                      ┏━━━━━━━━━━━━━━━━━┓     │
                                                      ┃   jarboot-spy   ┠─────╯
                                                      ┗━━━━━━━━━━━━━━━━━┛ 


Command execute 命令执行
                                                 websocket
┏━━━━━━━━━━━━━━━━━┓  websocket ┏━━━━━━━━━━━━━━━━━┓ send   ┏━━━━━━━━━━━━━━━━━━━━━━━┓
┃    Browser      ┃<──────────>┃ jarboot-server  ┠───────>┃    target process     ┃
┗━━━━━━━━━━━━━━━━━┛ send/recv  ┗━━━━━━━━━━━━━━━━━┛        ┃   ╭──────────────╮    ┃
                                       ▲                  ┃   │  user code   │    ┃
                                       │                  ┃   ╰──────────────╯    ┃
                                  http │ websocket        ┃   ╭──────────────╮    ┃
                                       ╰──────────────────╂───┤ jarboot-core │    ┃
                                       result back        ┃   ╰──────────────╯    ┃
                                                          ┗━━━━━━━━━━━━━━━━━━━━━━━┛

序列图(Sequence)

Execute command Sequence:
╭──────────────╮       ╭────────────────╮      ╭───────────────╮
│    Browser   │       │ jarboot-server │      │ target server │
╰──────┬───────╯       ╰───────┬────────╯      ╰──────┬────────╯
       │     send command      │                      │
       ├─────────────────────>╭┴╮   send command      │
       │                      │ ├───────────────────>╭┴╮
       │                      ╰┬╯                    │ ├─╮ Execute command and
       │                       │    Large data http  │ │ │ Render result
       │                      ╭┴╮<───────────────────┤ │<╯
       │                      │ │                    │ │
       │                      │ │     WebSocket      │ │
       │        push          │ │<───────────────────┤ │
      ╭┴╮<────────────────────┤ │                    ╰┬╯ 
      │ ├─╮                   ╰┬╯                     │
      │ │ │Render UI           │                      │          
      │ │ │                    │                      │
      │ │<╯                    │                      │ 
      ╰┬╯                      │                      │
       │                       │                      │
       
       

编译,在项目根目录(Compile,in project root path)

$ mvn clean install

生产环境配置及使用(Configuration and use of production environment)

配置文件jarboot.properties在与jar包同级的目录下的conf目录,建议启动前修改jarboot.token.secret.key,启动后 修改默认的密码。

Java
1
https://gitee.com/majz0908/jarboot.git
git@gitee.com:majz0908/jarboot.git
majz0908
jarboot
jarboot
develop

搜索帮助