Publish/Subscribe -- collect data and distribute to subscribers.

Tickerplant does not store data. The real-time database does that.

Tickerplant can have direct subscribers or users can query the real time 
database.

Tickerplant also stores data to a log file but purges in-memory tables.

Real-time database on start-up requests data from tickerplant by
reading it from the log file.

Real-time subscriber can ask for all data or just some of it.
Subscription is on a table and list of symbols.

Tickerplant communicates with subscribers on a timer loop so subscribers
may encounter a delay before they get the data.

Chained tickerplant may be used if there can be ad hoc queries.


When the real time database first talks, it makes a synchronous
call and asks for the schemas of all the tables in
the tickerplant.
RTD gets the location of the log and the number of messages
logged so far.
So the tickerplant client must define an upd function.

It keeps receiving until .u.end which means all the ata has been given.
Update messages are of the form:
(`upd;`table_name;table_data)
to indicate end of day.
Typically the client will save to disk, transfer data to hdb and perhaps discard
its tables.


Understand this as follows.


To run this, cd wx/tick
and run

q ticker.q -p 5010 / tickerplant at port 5010
Each subscription specifies a table a list of symbols and where it comes from
That happens at cx.q:
{h("sub";x;s)} each t;
where t and s are specified elsewhere in cx.q


q cx.q rdb / client wants a real time database


q cx.q hlcv / client wants high low close volume

For example, if we specify hlcv, then t becomes trade s is `all meaning
all symbols (but that could be changed).

q feed.q / generates data and sends to ticker

feed produces data and then stops.
So, to show what is going on, shut down feed.q and then start it 
again.
If you don't want so much time to go to the screen, take away the show hlcv
in the "hlcv" client.


Information note: In the kdb+/tick package,

tick.k -- tickerplant itself
r.k -- real time database
u.k -- contains the definitions for the publisher/subscriber functions.
ssl.q -- receives raw data from the feed

tables:
taq: trade and quote data
sym: simplified trad and quote data
fx: foreign exchange data
lvl2: level 2 data

May not need the above.

c.q -- easily configured sample tickerplant subscribers

