Thanks for the details. It makes sense to me. Look forward your pull request about this refactor.
> 在 2019年5月13日,下午10:19,peng-yongsheng <[email protected]> 写道: > > Hi, Wu. > > 1. Yes, the stream kind your guess is correct. Contains: Inventory, Record, > TopN, Metrics. > 2. Stream process loader flow is: > Scan stream annotation -> get and parse the storage annotation -> process > create (InventoryProcess, RecordProcess, TopNProcess, MetricsProcess) > > Sheng Wu <[email protected]> 于2019年5月13日周一 下午8:46写道: > >> Hi >> >> From my understanding, all streaming models are going to base on `@Stream( >> kind= xx)`, >> Could you show, how many kinds of `@Stream`will we plan to use? >> My guess >> 1. Metrics >> 2. Inventory >> 3. Record >> 4. TopN >> >> Please correct me if I am wrong. >> >> Sheng Wu 吴晟 >> >> Apache SkyWalking, ShardingSphere, Zipkin >> Twitter, wusheng1108 >> >> >> peng-yongsheng <[email protected]> 于2019年5月13日周一 下午3:07写道: >> >>> This is the most common metrics entity definition with the stream >>> annotations. >>> >>> @MetricsType >>> @StreamData >>> @StorageEntity(name = ServiceRelationClientSideMetrics.INDEX_NAME, >> builder >>> = >>> ServiceRelationClientSideMetrics.Builder.class, sourceScopeId = >>> DefaultScopeDefine.SERVICE_RELATION) >>> >>> @MetricsType: What model is streaming processing use? Other types are >>> @RecordType, @InventoryType, @TopNType. >>> @StreamData: Register this entity class into the remote module that makes >>> this entity could transfer between OAP server's nodes. >>> @StorageEntity: Identify the storage entity name, builder class for >>> serialization or deserialization this entity between memory and database. >>> >>> Those three annotations look like having clear responsibilities, but if >> you >>> spend time to reflect on them, you will find that the @XXType's level is >>> higher than others. >>> - @MetricsType and @InventoryType are must include @StreamData and >>> @StorageEntity. >>> - @RecordType and @TopNType are must exclude @StreamData. >>> >>> So, I suggest that let the @StreamData and @StorageEntity to be the >>> parameter of the @XXType. >>> >>> For example: >>> >>> @Stream(name = ServiceRelationClientSideMetrics.INDEX_NAME, scopeId = >>> DefaultScopeDefine.SERVICE_RELATION, storage = @Storage(builder = >>> ServiceRelationClientSideMetrics.Builder.class), kind = >> StreamKind.Metrics) >>> public class ServiceRelationClientSideMetrics extends Metrics { >>> >>
