Tango Archiving

I read that TANGO provides a number of databses:
  1. a historical database with an archiving frequency of up to 0.1 Hz
  2. a short-term database that provides a few hours of retention, but with higher archiving frequency (up to 10 HZ)
  3. a snapshot database

I have a number of questions:

Firstly, by "up to", does that mean that when setting up a polling mechanism for an attribute, I can vary the speed at which attribute change events are triggered?

Secondly, are the 0.1 Hz and 10 Hz hard limits? In other words, would I be able to monitor a particular set of devices (or attributes) more frequently? In some cases, I would like to have a historical (permanent) high frequency archive of some devices. Would I be able to do that with the provided MySQL database setup, or should I write a custom database interface to my own database setup for that?

Of course an alternative would be to write a sort of high-level client code that flushes the data in the short-term database to another database (my own custom historical database), which is much easier than writing custom database code at a device server level. Any thooughts?

Thanks for your help.
Dr Andrea DeMarco, BSc (Hons) (Melita), MSc (Melita), DPhil (UEA)
Lecturer | Researcher
Department of Physics
Institute of Space Sciences and Astronomy

Room 220, Maths and Physics Building
University of Malta, Msida MSD2080, MALTA
drea
I have a number of questions:

Firstly, by "up to", does that mean that when setting up a polling mechanism for an attribute, I can vary the speed at which attribute change events are triggered?

Dear Andrea,

The official Tango Historical database is not event-based.
We are currently working on a new version of this system which is event-based.
Basically, we have special Tango device servers which are subscribing to events coming from the attributes you are interested in. These event subscriber device servers are storing data in the database of your choice when they receive new events.Currently we are testing MySQL and Cassandra but the design allows you to use something else if you wish too, a bit of development will be needed of course to write the layer to connect, read and write to another database.

If you use an event-based Historical database, you will be limited by the number of events you can send, receive and handle.
Emmanuel Taurel kindly directed me to a paper from ICALEPCS 2013 where tests showed that the maximum event rate for a double scalar attribute is about 95 KHZ. For spectrum or image attributes, it will be much less. This doesn't mean you will be able on the event subscriber side (and database side) to cope with this high rate!
Your database will have to be able to handle a very high write load and the machine where your event subscriber is running will have to cope with all these events.

With the network bandwidth you were talking about in a previous post and with a database like Cassandra on SSD disks for instance, you might be able to reach very impressive performances. But it might be very expansive too to store so much data on SSDs! ;-) The advantage of SSDs is that you are no longer limited by the disk speed (but you might be with the size and price).

I think you should do some tests because Cassandra for instance is already able to achieve impressive write performances on spinning disks (but you will be limited by the disks speed).

Please be aware that there is the possibility to send events manually from your device servers too.

drea
Secondly, are the 0.1 Hz and 10 Hz hard limits? In other words, would I be able to monitor a particular set of devices (or attributes) more frequently? In some cases, I would like to have a historical (permanent) high frequency archive of some devices. Would I be able to do that with the provided MySQL database setup, or should I write a custom database interface to my own database setup for that?

With the official version of the Tango historical database, I don't know whether these numbers are hard limit…
Maybe someone from Soleil could answer to this question.
These limits are probably there to prevent the users from storing too much data in the database, in order to keep it manageable and not too big.
With the alternative version of the historical database we are working on, since it is event based, you should in theory be able to store at higher frequency, if you get the appropriate hardware (network, CPU, disks).

We haven't done performance tests yet but we are already storing some attributes permanently at 1 Hz very easily since several months, with MySQL or Cassandra, on spinning disks.

drea
Of course an alternative would be to write a sort of high-level client code that flushes the data in the short-term database to another database (my own custom historical database), which is much easier than writing custom database code at a device server level. Any thooughts?

Thanks for your help.

You could use the new event-based historical database (Tango HDB++) too. smile
But it is still a prototype for the moment and under development.
The advantage would be that you could benefit from all the configuration, diagnostics and extraction tools we are currently developing.
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new.
Reynald
drea
I have a number of questions:

Firstly, by "up to", does that mean that when setting up a polling mechanism for an attribute, I can vary the speed at which attribute change events are triggered?

Dear Andrea,

The official Tango Historical database is not event-based.
We are currently working on a new version of this system which is event-based.
Basically, we have special Tango device servers which are subscribing to events coming from the attributes you are interested in. These event subscriber device servers are storing data in the database of your choice when they receive new events.Currently we are testing MySQL and Cassandra but the design allows you to use something else if you wish too, a bit of development will be needed of course to write the layer to connect, read and write to another database.

If you use an event-based Historical database, you will be limited by the number of events you can send, receive and handle.
Emmanuel Taurel kindly directed me to a paper from ICALEPCS 2013 where tests showed that the maximum event rate for a double scalar attribute is about 95 KHZ. For spectrum or image attributes, it will be much less. This doesn't mean you will be able on the event subscriber side (and database side) to cope with this high rate!
Your database will have to be able to handle a very high write load and the machine where your event subscriber is running will have to cope with all these events.

With the network bandwidth you were talking about in a previous post and with a database like Cassandra on SSD disks for instance, you might be able to reach very impressive performances. But it might be very expansive too to store so much data on SSDs! ;-) The advantage of SSDs is that you are no longer limited by the disk speed (but you might be with the size and price).

I think you should do some tests because Cassandra for instance is already able to achieve impressive write performances on spinning disks (but you will be limited by the disks speed).

Please be aware that there is the possibility to send events manually from your device servers too.

drea
Secondly, are the 0.1 Hz and 10 Hz hard limits? In other words, would I be able to monitor a particular set of devices (or attributes) more frequently? In some cases, I would like to have a historical (permanent) high frequency archive of some devices. Would I be able to do that with the provided MySQL database setup, or should I write a custom database interface to my own database setup for that?

With the official version of the Tango historical database, I don't know whether these numbers are hard limit…
Maybe someone from Soleil could answer to this question.
These limits are probably there to prevent the users from storing too much data in the database, in order to keep it manageable and not too big.
With the alternative version of the historical database we are working on, since it is event based, you should in theory be able to store at higher frequency, if you get the appropriate hardware (network, CPU, disks).

We haven't done performance tests yet but we are already storing some attributes permanently at 1 Hz very easily since several months, with MySQL or Cassandra, on spinning disks.

Hi Andrea and Reynald,
we sometimes used the hdb++ to store data at higher frequency, up to 1KHz with MySQL. The architecture allows to do it,
then you have to setup your back-end to cope with the data…

drea
Of course an alternative would be to write a sort of high-level client code that flushes the data in the short-term database to another database (my own custom historical database), which is much easier than writing custom database code at a device server level. Any thooughts?

Thanks for your help.

You could use the new event-based historical database (Tango HDB++) too. smile
But it is still a prototype for the moment and under development.
The advantage would be that you could benefit from all the configuration, diagnostics and extraction tools we are currently developing.
Hello Drea,

I thought that the forum post are redirect to tango mailing list. So my boss told me yesterday only that there are few questions for SOLEIL… So sorry for my late answer.

drea
I read that TANGO provides a number of databses:
  1. a historical database with an archiving frequency of up to 0.1 Hz
  2. a short-term database that provides a few hours of retention, but with higher archiving frequency (up to 10 HZ)
  3. a snapshot database

I have a number of questions:

Firstly, by "up to", does that mean that when setting up a polling mechanism for an attribute, I can vary the speed at which attribute change events are triggered?

So as Reynald said, Soleil official Archiving system is based on the polling system. So the frequency depend on the device beside. In our system, you must not to defined a polling mechanism on your attribute.
The archiving configuration is saved in archiving database (in the AMD table Archiving Mode Definition) :
- HDB = historical data base
- TDB = temporary data base (short term database)

So you have nothing to do in Tango database through Jive, we provied Mambo GUI to configure the archiving mode.
As you can see in the following screen shot :
Your text to link here...
That's means at Soleil, it is our users (operator or beam line staff) that are in charge of the archiving configuration, and consequently there are autonomous.

drea
Secondly, are the 0.1 Hz and 10 Hz hard limits? In other words, would I be able to monitor a particular set of devices (or attributes) more frequently? In some cases, I would like to have a historical (permanent) high frequency archive of some devices. Would I be able to do that with the provided MySQL database setup, or should I write a custom database interface to my own database setup for that?

Yes, the limit is depend on your device so the hardware in your case. You can try as fast as possible, and see how your device can anwser to the reading request. At Soleil the soft limit is based on the experience.. :)
But this soft limit can be set to 0.1 Hz in HDB. It is just checked in Mambo GUI… so in the device Archiver you can go fastest.

Concerning define a Set of attributes at differents rates. At Soleil our system is based on Archiving configuration. This configuration is saved in XML file with ac extension. It is defined a set of attributes that you want to archive, the mode and the rate of the configuration. So our users have a lot of AC files defined for their equipements our for a domains. (Vacuum, Insertion, PowerSupply …).

drea
Of course an alternative would be to write a sort of high-level client code that flushes the data in the short-term database to another database (my own custom historical database), which is much easier than writing custom database code at a device server level. Any thooughts?

Thanks for your help.

At Soleil, we have beam lines have also a fast historical mode. This is the equivalent of Historical but at Short term frequency. For that you just have to set the HdbArchiver device property isHighRate=true

I wish that my answer is useful for you. The project leader of the Archiving is Raphael Girardot at SOLEIL.
So do not hesitate to contact him, or me for more informations.

Katy
Hi All

How to extract Tango Attributes from the Historical Database in Mambo? Whats the use of HdbExtractor ??
I can't find any documentation on HdbExtractor.
Any help will be appreciated

Thanks
Balkrishna
Edited 8 years ago
Hi All

I have several doubts:

1. I want to archive the tango attributes in Historical database at a period of 1 second. Whenever I create/modify AC, in the Attribute Properties section, I set period= 1 s but when i click on set, following message shows up:
The specified archiving mode is invalid: archiving period too low !!( 1000ms < 10000ms ) I have already set the default value of HDB period as 1 second in Tools —>Options—>AC. How do I achieve it ?

2. I have another GUI running on different system. I want to extract/retrieve Tango attributes from HDB? How do I achieve it ?

3. What's the use of HDBTDBArchivingWAtcher ?

4. How can I extract data from TDB and insert into HDB ?

5. Also till what period TDB stores the achived data ? Where can I configure it ?

Thanks
Balkrishna
Edited 8 years ago
bchitalia2
Hi All

How to extract Tango Attributes from the Historical Database in Mambo? Whats the use of HdbExtractor ??
I can't find any documentation on HdbExtractor.
Any help will be appreciated

Thanks
Balkrishna

In Mambo, if you have an AC already created, you can click on Transfer to VC button on the button of the application. Else, you should created a VC (visualization Configuration) to extract your date for Mambo.
So to do that, follow the instruction included in the doc Folder : Mambo_Manual_V2_1.

There is an other ways to extract your data :
- Via the HdbExtractor or TdbExtractor.Both device have the same interface, you don't need a VC files.
Use the command ExtractBetweenDates (click on description button in Jive ).
Argin description:
[attributeName,start date, end date]. dates format is DD-MM-YYYY HH24:MI:SS
Or use the command GetAttDataLastN (click on description button in Jive ).
Argin description:
The attribute's name and the number of wished data

- Via the DataBrowser application, you should configure the database informations in the script :
defined environnement -DHDB_USER=hdb -DHDB_PASSWORD=hdb and modify CDMADictionaries\mappings\MamboSoleil\cdma_mambosoleil_config.xml and read the DataBrowserUserManual.pdf included in the doc folder.

Best regards,

Katy

bchitalia2
Hi All

I have several doubts:

1. I want to archive the tango attributes in Historical database at a period of 1 second. Whenever I create/modify AC, in the Attribute Properties section, I set period= 1 s but when i click on set, following message shows up:
The specified archiving mode is invalid: archiving period too low !!( 1000ms < 10000ms ) I have already set the default value of HDB period as 1 second in Tools —>Options—>AC. How do I achieve it ?

I think that it is software securisation. In HDB you can go lower than 10 s. But I let my colleague answer to you for this part. Try to launch a archiving with TDB (let HDB unchecked at start of your AC creation).

bchitalia2
2. I have another GUI running on different system. I want to extract/retrieve Tango attributes from HDB? How do I achieve it ?

See my answer before.

bchitalia2
3. What's the use of HDBTDBArchivingWAtcher ?

This device is used at SOLEIL, to check that archiving system is working. For example if the database is down. The device will check frequently if the database is available every 3hours. And also, if there is some attributes that are not running.

bchitalia2
4. How can I extract data from TDB and insert into HDB ?

At Soleil, the TDB can be stored and never removed, (TDB long term). Because the data removing is done by our database adminstrator. It is manual. So in the reality your data will always there.
The scheme of both database HDB and TDB are exactly the same. So probably you can export data from TDB and import in TDB as it.

But, the solution for you, as I told you is to use HDB, but at hight rate see my answer to you last week.
Soleil should take in account this mode, in order to remove the software security in the GUI to go lower than 10s. You should ask this evolve to Raphaël Girardot.

bchitalia2
5. Also till what period TDB stores the achived data ? Where can I configure it ?

Thanks
Balkrishna

See my answer of last week, and check the user manual in the doc folder.
Hoping that it will help you.

Best regards.

Katy
Hi Katy

1. Could you please confirm from Raphael and guide me how to archive tango attributes in HDB at a rate of 1 second ?

2. I have read the Mambo manual and i am unable to find where it is written that "till what period TDB stores the archived data". So please could you confirm and tell.

3. VC is used for monitoring the values of an attributes after starting archiving. For the tango attributes i have archived in HDB, i can see the archived attributes list and it's value gets updated after every 10 seconds ( graphs etc ). But for TDB after starting archiving, I can see the archived attributes list in VC but its value doesn't get updated after clicking on refresh. So please could you tell whats the reason ?

4. As you said there are other ways to extract an data: They are
a.) You have to click on ExtractBetweenDates command in jive and write the argument.
but whenever i write the in the format mentioned by you in the above reply, it says wither attribute not found or the argument is invalid. Maybe somewhere i am doing mistake in writing argument. So could you please guide me. Suppose if attribute is Speed , Start date is : 26-05-2015 08:08:08 , End date is : 27-05:2015 15:30:30 How will you write the argument ?

b.) Facing same issue with GetAttDataLastN

5. DataBrowserUserManual.pdf is not mentioned in the doc folder of the Archiving Root. So could please provide me the link to download.

6. In different machine I have to extract the tango attributes from HDB. How could i achieve it ? You have given the reply above to this question but could you please elaborate as I am unable to do that.

7. Also in Bensikin tool, is there any way that snapshots can be uploaded to snapshot panel at regular interval rather than clicking on launch snapshot button again and again. I need snapshot to be uploaded to snapshot panel at a rate of 1 second. How can I achieve it here?
Thanks and Best Regards

Balkrishna
Hi Katy

Still waiting for the reply. Please guide as i am stuck longtime.

Thanks
Balkrishna
 
Register or login to create to post a reply.