Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
* [lttng-dev] Machine Interface
@ 2014-02-13 18:00 Olivier Cotte
  2014-02-13 18:26 ` Simon Marchi
  0 siblings, 1 reply; 15+ messages in thread
From: Olivier Cotte @ 2014-02-13 18:00 UTC (permalink / raw)


At first, we wanted thank you for your quick and constructive feedback!

After reflection on the nature of the problem and consideration of your feedback, we've arrived with the following solution.

The technology that will be use is XML. The integration of the machine interface to LTTng will be done in the most modular manner to facilitate the support multiples outputs format. This option will most likely be available at configure time.

For the moment, we will focus our effort into adding the XML feature only. If many outputs languages is still a viable feature, it will be possible to investigate.

Our main goal is of course to promote extensibility, ease of development for new tools and establish a standards for the communication control flow. Here are our primary requirement concerning the machine interface:

   * Fit the tree structure of LTTng commands structures.
   * It can be parse from bash/shell script with no external helpers.
   * The new format must not introduce any dependencies to LTTng.
   * [Optional] Still human readable, but fit to be parse.This is not a
      priority since we are talking about a machine interface.

Here are the reason why we think XML should be used for the machine interface:

   * The expression of LTTng hierarchy really fit a XML tree structure.
   * Since Jgalar add a load-save feature that depend on libxml2, we are
     not introducing any dependencies. Choosing another format would
     most likely introduce new dependency.
   * XML is robust and easily extensible. It will also be easy to
     maintains (add new commands, modify existing commands etc.)
   * There are tools that allow you to evaluate XPath expressions from
     the bash.
   * XML is an established standard

That's why we consider XML format as a suitable solution.

Now for the machine interface syntax:

   * Since we are aware that multiple output could be supported, we want an
     unify flag for all machine interface command.
		The flag --xml would be used to output xml from LTTng (we could add similar
		options like --json, --yaml etc.). This would be similar to svn
		machine interface and speak for itself.
   * Also, to avoid confusion we will use a different primary command for input and
     output machine interface.
		Ex: lttng machine <input>
		Ex: lttng --xml <output>

Any points we are missing?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20140213/694aa217/attachment-0001.html>


^ permalink raw reply	[flat|nested] 15+ messages in thread
* [lttng-dev] Machine Interface
@ 2014-02-13 20:05 Thibault, Daniel
  2014-02-13 20:36 ` Jonathan Rajotte
  0 siblings, 1 reply; 15+ messages in thread
From: Thibault, Daniel @ 2014-02-13 20:05 UTC (permalink / raw)


----------------------------------------------------------------------
Date: Thu, 13 Feb 2014 13:00:17 -0500
From: Olivier Cotte <olivier.cotte@polymtl.ca>

> Now for the machine interface syntax:
>
>   * Also, to avoid confusion we will use a different primary command for input and
>     output machine interface.
>		Ex: lttng machine <input>
>		Ex: lttng --xml <output>

   I have a problem with the broken symmetry here.  If you have a command (e.g. 'machine') for input, why is it you have none for output?  What happens if, for instance, I type 'lttng --xml list -k'?  Am I going to get an xml-formatted list of kernel tracepoints to stdout?

Daniel U. Thibault
Protection des syst?mes et contremesures (PSC) | Systems Protection & Countermeasures (SPC)
Cyber s?curit? pour les missions essentielles (CME) | Mission Critical Cyber Security (MCCS)
R & D pour la d?fense Canada - Valcartier (RDDC Valcartier) | Defence R&D Canada - Valcartier (DRDC Valcartier)
2459 route de la Bravoure
Qu?bec QC  G3J 1X5
CANADA
Vox : (418) 844-4000 x4245
Fax : (418) 844-4538
NAC : 918V QSDJ <http://www.travelgis.com/map.asp?addr=918V%20QSDJ>
Gouvernement du Canada | Government of Canada
<http://www.valcartier.drdc-rddc.gc.ca/>



^ permalink raw reply	[flat|nested] 15+ messages in thread
* [lttng-dev] Machine Interface
@ 2014-02-06 13:51 Thibault, Daniel
  0 siblings, 0 replies; 15+ messages in thread
From: Thibault, Daniel @ 2014-02-06 13:51 UTC (permalink / raw)


----------------------------------------------------------------------
Date: Wed, 5 Feb 2014 21:42:19 -0500
From: Jonathan Rajotte <jonathan.r.julien@gmail.com>

> Machine interface output would be generated only with --mi option and could contain additional information than regular output.
>
> We are focusing on output right now but we may eventually add a 'mi' command for input if necessary.

   I have one recommendation: do not use the same mnemonic for "generate machine interface output" (--mi) and "accept machine interface input" (mi command).  It is bound to create endless user confusion and attendant errors.  Maybe '--machine-interface' and 'machine', respectively, instead?

Daniel U. Thibault
Protection des syst?mes et contremesures (PSC) | Systems Protection & Countermeasures (SPC)
Cyber s?curit? pour les missions essentielles (CME) | Mission Critical Cyber Security (MCCS)
R & D pour la d?fense Canada - Valcartier (RDDC Valcartier) | Defence R&D Canada - Valcartier (DRDC Valcartier)
2459 route de la Bravoure
Qu?bec QC  G3J 1X5
CANADA
Vox : (418) 844-4000 x4245
Fax : (418) 844-4538
NAC : 918V QSDJ <http://www.travelgis.com/map.asp?addr=918V%20QSDJ>
Gouvernement du Canada | Government of Canada
<http://www.valcartier.drdc-rddc.gc.ca/>



^ permalink raw reply	[flat|nested] 15+ messages in thread
* [lttng-dev] Machine Interface
@ 2014-02-06  2:42 Jonathan Rajotte
  2014-02-06  7:41 ` Woegerer, Paul
  2014-02-06 16:11 ` Christian Babeux
  0 siblings, 2 replies; 15+ messages in thread
From: Jonathan Rajotte @ 2014-02-06  2:42 UTC (permalink / raw)


Hello all,

After speaking with Michel Dagenais, Genevi?ve Bastien, folks over at EfficiOs
and Ericsson, a machine interface for lttng-tool would be a nice feature
to have. Olivier Cotte and me will be working on MI for the
next few weeks.

The main objective would be to reduce parsing complexity
in control tools.
ex:Regex used in TMF control service.
(org.eclipse.linuxtools.internal.lttng2.ui.views.control.service.LTTngControlService.java)

Multiples solutions come to mind:
-XML
-JSON
-YAML
-Custom syntax (like GDB Machine interface* as proposed by Alexandre
				Montplaisir)

XML/JSON/YAML promote extensibility and ease of development for new tools
dependant on lttng-tools by being established standards.
On the other hand, they add dependencies to lttng-tools where a custom syntax
would not.

Machine interface output would be generated only with --mi option and
could contain additional information than regular output.

We are focusing on output right now but we may eventually add a 'mi'
command for input if necessary.

What do you think ?

Thanks


*https://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI.html

-- 
Jonathan Rajotte Julien
Charg? de laboratoire INF1995
Membre MD6
Polytechnique Montr?al



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2014-02-13 20:41 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-13 18:00 [lttng-dev] Machine Interface Olivier Cotte
2014-02-13 18:26 ` Simon Marchi
2014-02-13 19:16   ` Jonathan Rajotte
  -- strict thread matches above, loose matches on Subject: below --
2014-02-13 20:05 Thibault, Daniel
2014-02-13 20:36 ` Jonathan Rajotte
2014-02-13 20:41   ` Thibault, Daniel
2014-02-06 13:51 Thibault, Daniel
2014-02-06  2:42 Jonathan Rajotte
2014-02-06  7:41 ` Woegerer, Paul
2014-02-06 13:32   ` Simon Marchi
2014-02-06 17:07     ` Woegerer, Paul
2014-02-06 18:40       ` Simon Marchi
2014-02-06 16:11 ` Christian Babeux
2014-02-06 17:00   ` Jonathan Rajotte
2014-02-06 18:21     ` Christian Babeux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox