`
guibin
  • 浏览: 366267 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

DataServer of AIOTrade

阅读更多
1. How to compare two DataServers?
If the Dataservers' displayNames are same and they have the same hashCode, then they are equal.

2. What the contract for this Dataserver?

3. What is the DataServer's core data structure?
There are three main data Map and a helper Map, the details are:
  a) contractToStorage: Map[C, ArrayList[V]], DataContract -> Storage
  b) subscribedContractToSer: Map[C, T], DataContract -> Tser
  c) serToChainSers: Map[Tser, List[Tser]], Tser -> ChainSers
The helper Map is:
  a) subscribedSymbolToContract: Map[String, DataContract]
It is used to quick search the contract, then to get the Storage or the Tser

All the method and logic are used to support these four Map.

4. What the event will the DataServer publish?
Totally two kinds of event,
the first one is HeartBeat(heartBeatInterval), it is published by a timer in the DataServer every `heartBeatInteval`. The default action when the DataServer received the HeartBeat is to loadFromSource(loadedTime) and postRefresh
loadFromSource will be overrided by the subclass.
The second kind of event is LoadHistory(afterTime). The default action when DataServer received the LoadHistory(afterTime) is also to loadFromSource(loadedTime) and postLoadHistory.

5. What does the postRefresh and postLoadHistory do?
Currently in the TickerServer, the postRefresh will firstly composeSer, then publish TSerEvent.Updated to the Tser. Tser also is a kind of publisher, TODO here.

6. What does the composeSer do?
composeSer will compose the ticker(new ticker copied from the tickerSnapshot) in the subscribedContracts's storage to Tser, that is to say the 1m quoteSer

7. What event  will the TickerServer observer?
TickerServer extends DataServer, that is to say Ticker is a Publisher which will publish the HeartBeat(heartBeatInterval) and LoadHistory(afterTime) event to itself.
TickerServer is a publisher and is also a Reactor, so it will listen to the Exchange.
Exchange will publish Opened(exchange: Exchange) and Closed(exchange: Exchange). TickerServer has not define the action when it received the Opened and Closed event.
TickerServer also implements the traits ChangeObserver, so it will observe the tickerSnapshot. When the tickerSnapshot notifies, the default action is TickerServer will create a new Ticker, copy the tickerSnapshot content to the new ticker, then save this new ticker into the storage(actually a ArrayList) of the DataServer. The tickerSnapshot is the latest tickerSnapshot, which means that it is always changing.
Question: how to track the new tickerSnapshot, observe it and unobserve it?

Ticker will subscribe a tickerContract, then it observe the tickerSnapshot <- Sec.lastData <- contract.symbol <- contract. 
And unsubscribe is vice verse. contract -> contract.symbol -> Sec -> sec.lastData.tickerSnapShot.






分享到:
评论

相关推荐

    IBM Data Server .NET Provider

    IBM Data Server .NET Provider,安装以后,使用.net添加引用。 安装后的目录一般是在: C:\Program Files\IBM\IBM DATA SERVER DRIVER\bin 下面 。添加引用以后就可以连接DB2了。 明细见: ...因网络不好,上传时可能...

    IBM Data Server Driver Package

    IBM Data Server Driver Package 是一套专为Python开发人员设计的数据库驱动程序,主要用于连接到IBM的DB2数据库系统。这个包特别适用于32位的Windows操作系统。在安装过程中,用户通常只需要按照默认设置进行,即可...

    IBM Data Server .NET Provider(.Net驱动)

    IBM Data Server .NET Provider是IBM为.NET开发者提供的一款数据库连接组件,主要用于在.NET环境中与IBM DB2数据库进行交互。这个驱动程序允许开发人员利用C#等.NET语言编写应用程序,实现对DB2数据服务器的访问、...

    IBM Data Server .NET Provider+DB2Helper

    安装IBM Data Server .NET Provider 程序,安装成功后引用对应版本的IBM.Data.DB2.dll ,文件路径:C:\Program Files\IBM\IBM DATA SERVER DRIVER\bin,具体数据库连接类见DB2Helper,实测成功读取数据

    DataServer_DataServer_muonline_

    《DataServer 在 MuOnline 中的角色与应用》 在网络游戏领域,服务器端的稳定性和效率是决定游戏体验的关键因素之一。MuOnline,一款深受玩家喜爱的大型多人在线角色扮演游戏(MMORPG),其背后的运行离不开高效的...

    IBM Data Server .NET Provider驱动C# .net 连接DB2数据库驱动以及帮助类

    安装IBM Data Server .NET Provider 程序,安装成功后引用对应版本的IBM.Data.DB2.dll 文件,安装完成之后,如果是默认路径安装的,一般是在C:\Program Files\IBM\IBM DATA SERVER DRIVER\bin下面,具体的连接DB2...

    IBM Data Server .NET Provider.zip

    IBM Data Server .NET Provider,安装以后,使用.net添加引用。 安装后的目录一般是在: C:\Program Files\IBM\IBM DATA SERVER DRIVER\bin 下面 。添加引用以后就可以连接DB2了。 明细见: ...

    ibm data server client winx64 v11.5

    db2 catalog tcpip node node_name remote dashDB_IP_address server port db2 catalog database databasename as db_alias at node node_name db2 connect to db_alias user user_id 说明databasename必须与服务器...

    IBM Data Server NET Provider 手册

    ### 一、IBM Data Server Provider for .NET 概览 **标题:** IBM Data Server NET Provider 手册 **描述:** 中文版手册,来源于IBM官网 **标签:** DB2 .NET Provider **部分内容:** 提供了关于 IBM Data Server ...

    IBM Data Server Runtime Client

    解决Toad for DB2无法创建连接的情况,次工具可解决。

    DataServer_0.72.00_SourceFull_Season6.2.rar_DataServer_WEBZEN

    《DataServer:Webzen的Season 6.2源代码解析》 在IT行业中,源代码是软件开发的核心,它揭示了程序的内部运作机制。当我们谈论"DataServer_0.72.00_SourceFull_Season6.2.rar_DataServer_WEBZEN"时,我们指的是...

    OpenEdge DataServer for Ms SQL Server

    ### OpenEdge DataServer for Microsoft SQL Server:关键技术知识点详解 #### 一、OpenEdge DataServer概述 **OpenEdge DataServer** 是Progress Software Corporation提供的一种数据管理解决方案,它专注于为...

    FANUC CNC Ethernet Board 和DATA Server Board操作手册63354EN_04.pdf

    FANUC CNC Ethernet Board 和DATA Server Board操作手册63354EN_04pdf,FANUC CNC Ethernet Board 和DATA Server Board操作手册63354EN_04

    IMB DB2 Data Server Driver

    IBM DB2 Data Server Driver是IBM公司为.NET开发者提供的一款用于连接和操作DB2数据库的驱动程序。这个驱动程序使得.NET应用程序能够无缝地与IBM DB2数据库进行交互,执行查询、事务处理和其他数据库操作。在标题和...

    IBM Data Server Driver

    DS Driver 支持开放源码和 Java™ 以及使用 ODBC、OLE DB 和 .NET Provider 的应用程序,version 9.7 ,windows x64平台,亲测可用。

    IBM Data Server

    IBM Data Server 提供者是IBM为了使得应用程序能够与DB2数据库进行交互而设计的一款关键组件。这个组件主要用于.NET环境,确保C#等编程语言能够顺利地建立和管理到DB2数据库的连接。在开发和运行依赖于DB2的.NET应用...

    IBM Data Server .NET Provider.rar

    IBM Data Server .NET Provider 是IBM为开发者提供的一个关键组件,主要用于连接.NET应用程序到IBM的数据服务器,如DB2。这个驱动包包含了多种数据访问接口,包括OLEDB、ODBC和JDBC,以及必要的DLL库,使得.NET开发...

    dataServer

    下载这个有利于你对水电软件开发有用的学习

Global site tag (gtag.js) - Google Analytics