Giter Club home page Giter Club logo

Comments (5)

ArtemChekunov avatar ArtemChekunov commented on July 19, 2024

Maybe consul ?

from clickhouse_sinker.

yuzhichang avatar yuzhichang commented on July 19, 2024

@ArtemChekunov Unfortunately consul is unavailable in our product.

from clickhouse_sinker.

sundy-li avatar sundy-li commented on July 19, 2024

We can abstract the interface of configs, like IConfig, HttpConfig, LocalConfig, NacosConfig

from clickhouse_sinker.

yuzhichang avatar yuzhichang commented on July 19, 2024

This issue can be combined with #84 .

I suggest following Config structure which all clickhouse_sinker instances share(fetched from Nacos, Consul, ZK etc.):

type Config struct {
	Kafka      map[string]*KafkaConfig
	Clickhouse map[string]*ClickHouseConfig
	Tasks []*TaskConfig
	Common struct {
		FlushInterval     int
		BufferSize        int
		MinBufferSize     int
		MsgSizeHint       int
		ConcurrentParsers int
		LayoutDate        string
		LayoutDateTime    string
		LayoutDateTime64  string
		LogLevel          string
	}
    Assigns map[string][]string  //map instance_name to a list of task_name
}

Each instance can run multiple tasks.
Each task can be assigned to multiple instances. Each task declares how many instances it needs.

The coordinator

  • The coordinator (ckman, another project) provides API and/or webui to add/delete/modify tasks.
  • The coordinator watches (do service discovery) instance startup/disappear events, and assign tasks to instances (do publish config).

The schedule platform

The schedule platform(or maybe manually, outside my concern) start some clickhouse_sinker instances and start another one if a instance fail.

clickhouse_sinker

  • Every clickhouse_sinker instance register itself to a service manager (Nacos, Consul, ZK etc.).
  • clickhouse_sinker watches (do get config) cofig, compare its assignment with the current one, apply changes.
  • clickhouse_sinker shall try to recover a task in endless loop if the task fail. This ensures the tasks run on an instance match the coordinator assigned.

from clickhouse_sinker.

yuzhichang avatar yuzhichang commented on July 19, 2024

Implemented with #86.

from clickhouse_sinker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.