btSearch

command module
v0.0.0-...-e0770a4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

README

btSearch A torrent search engine implemented in golang

PkgGoDev Go Report Card


1.Web Interface

image image image

2.Program Architecture

Name Usage
server Collect torrent data
worker Collect hash information
web Data Display
Tool tools

image

Notice:

1.The project uses the reuseport system feature to monitor the port, please keep your server runing the newest linux kernel (version above 4.9)

2.The docker one-click installation is only for development testing and demonstration program features, and should not be used in the production environment.

3.To use this program in production environment, the author assumes that all users know how to use Golang, please Fork any version of the master branch code for development, and do not merge the subsequent master branch code. The master branch code does not guarantee that incompatible changes will not be made.

Installation (docker one-click single server installation):

git clone https://github.com/Bmixo/btSearch.git && cd btSearch/docker && docker-compose up 

After waiting for a while for the system to initialize, start collecting data. The program web interface is available at http://127.0.0.1:8080

hardware and network recommend

  • Make sure the server running the program is reachable by hosts outside the Internet
  • Recommended hardware configuration for single server installation: 8 cores 3.8Ghz 32G memory
  • Recommended hardware configuration for k8s HA installation:
torrent-es-cluster-01: 8 cores 3.8Ghz 32G memory
torrent-es-cluster-02: 8 cores 3.8Ghz 32G memory
torrent-es-cluster-03: 8 cores 3.8Ghz 32G memory
worker-01: 1-16 cores 1G memory
worker-02: 1-16 cores 1G memory
worker-03: 1-16 cores 1G memory
btsearch-01: 8 cores 3.8Ghz 32G memory
btsearch-02: 8 cores 3.8Ghz 32G memory
server:  8 cores 3.8Ghz 32G memory

Dependencies Install:

apt update
apt install curl git docker.io -y

Set Elasticsearch default tokenizer to ik tokenizer (optional)

curl --user elastic:changeme -XPUT http://localhost:9200/bavbt -H 'Content-Type: application/json'
curl --user elastic:changeme -XPOST 'localhost:9200/bavbt/_close'
curl --user elastic:changeme -XPUT localhost:9200/bavbt/_settings?pretty -d '{
"index":{
"analysis" : {
            "analyzer" : {
                "default" : {
                    "type" : "ik_max_word"
                }
            },
			"search_analyzer" : {
                "default" : {
                    "type" : "ik_max_word"
                }
            }
        }
    }
}'
curl --user elastic:changeme -XPOST 'localhost:9200/bavbt/_open'

TODO

  • impl admin BI data dashboard
  • provide docker image
  • Provide k8s high availability deployment solution (mongodb sharding + stateless load balancing master + etcd)
  • gin migrate to iris
  • Switch to the official mongodb driver
  • support postgres and mysql

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
cmd
db
pkg
pongo2gin
Package pongo2gin is a template renderer that can be used with the Gin web framework https://github.com/gin-gonic/gin it uses the Pongo2 template library https://github.com/flosch/pongo2
Package pongo2gin is a template renderer that can be used with the Gin web framework https://github.com/gin-gonic/gin it uses the Pongo2 template library https://github.com/flosch/pongo2

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL