<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hardening consulting (Articles sur thrift)</title><link>https://www.hardening-consulting.com/</link><description></description><atom:link href="https://www.hardening-consulting.com/categories/thrift.xml" rel="self" type="application/rss+xml"></atom:link><language>fr</language><lastBuildDate>Tue, 18 Feb 2025 22:51:03 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Utiliser Thrift avec Twisted</title><link>https://www.hardening-consulting.com/posts/20140506thrift-avec-twisted.html</link><dc:creator>David FORT</dc:creator><description>&lt;div&gt;&lt;p&gt;&lt;img class="alignright" src="https://www.hardening-consulting.com/images/binary.jpg"&gt;
En travaillant autour du sessionManager de FreeRds, j'ai eu l'occasion de travailler
avec le binding python de Thrift.&lt;/p&gt;
&lt;h2&gt;Thrift&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://thrift.apache.org/"&gt;Thrift&lt;/a&gt; est un nième framework de serialization de données. L'avantage pour
notre projet est qu'il fournit directement une couche de transport avec un style RPC. &lt;/p&gt;
&lt;p&gt;Comme avec protobuf, on a un fichier IDL qui décrit les messages et les méthodes. Ensuite le compilateur 
génère ce qu'il faut pour gérer ces messages. Pour Python, dans mon cas, ça ressemble à ça:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="gp"&gt;# &lt;/span&gt;thrift&lt;span class="w"&gt; &lt;/span&gt;--gen&lt;span class="w"&gt; &lt;/span&gt;py:twisted&lt;span class="w"&gt; &lt;/span&gt;moninterface.thrift
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Le résultat est dans le répertoire &lt;em&gt;gen-py.twisted&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.hardening-consulting.com/posts/20140506thrift-avec-twisted.html"&gt;Lire la suite…&lt;/a&gt; (Il reste encore 4 min. de lecture)&lt;/p&gt;&lt;/div&gt;</description><category>freerds</category><category>python</category><category>thrift</category><category>twisted</category><guid>https://www.hardening-consulting.com/posts/20140506thrift-avec-twisted.html</guid><pubDate>Sun, 04 May 2014 21:03:19 GMT</pubDate></item></channel></rss>