<?xml version="1.0"?>
<rss version="2.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:yt="http://gdata.youtube.com/schemas/2007" xmlns:atom="http://www.w3.org/2005/Atom">
   <channel>
      <title>VT Alumni Blog Aggregator</title>
      <description>Aggregates the Valtech consultants blogs and filters out the dupes amongst them. Fixes author tags.</description>
      <link>http://pipes.yahoo.com/pipes/pipe.info?_id=64fcc1c0b35f28f9f3b42e1a7635a470</link>
      <atom:link rel="next" href="http://pipes.yahoo.com/pipes/pipe.run?_id=64fcc1c0b35f28f9f3b42e1a7635a470&amp;_render=rss&amp;page=2"/>
      <pubDate>Thu, 01 Oct 2015 21:38:23 +0000</pubDate>
      <generator>http://pipes.yahoo.com/pipes/</generator>
      <item>
         <title>My bitcoin wallet</title>
         <link>http://feedproxy.google.com/~r/Oogifu/~3/gpMC2sSorCo/my-bitcoin-wallet.html</link>
         <description>&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://www.coinbase.com/tj2015&quot;&gt;tj2015&lt;/a&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/Oogifu/~4/gpMC2sSorCo&quot; height=&quot;1&quot; width=&quot;1&quot; alt=&quot;&quot;/&gt;</description>
         <author>Thierry Janaudy</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-1436098877388372574.post-5362460838434798618</guid>
         <pubDate>Sun, 27 Sep 2015 02:06:00 +0000</pubDate>
      </item>
      <item>
         <title>The rise and rise of bitcoin</title>
         <link>http://feedproxy.google.com/~r/Oogifu/~3/k9bSxkjtBP0/the-rise-and-rise-of-bitcoin.html</link>
         <description>&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://play.google.com/store/movies/details/The_Rise_and_Rise_of_Bitcoin?id=ObgpfKWPTwQ&quot;&gt;The Rise and Rise of Bitcoin&lt;/a&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/Oogifu/~4/k9bSxkjtBP0&quot; height=&quot;1&quot; width=&quot;1&quot; alt=&quot;&quot;/&gt;</description>
         <author>Thierry Janaudy</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-1436098877388372574.post-5013419184933687944</guid>
         <pubDate>Fri, 18 Sep 2015 10:54:00 +0000</pubDate>
      </item>
      <item>
         <title>Travis CI on a Java project with Docker support</title>
         <link>http://feedproxy.google.com/~r/javabien/blog/~3/RrDPXxC59ZA/</link>
         <description>I maintain a couple of Java projects that use Travis CI for automated CI. It&amp;#8217;s great! I&amp;#8217;m also working with SonarSource to migrate most of their internal Jenkins to Travis. That&amp;#8217;s quite a few projects&amp;#8230; Java build stack on Travis CI Most of these projects use the standard language: java travis.yml configuration. And it works &amp;#8230; &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://blog.javabien.net/2015/08/21/travis-ci-on-a-java-project-with-docker-support/&quot; class=&quot;more-link&quot;&gt;Continue reading &lt;span class=&quot;screen-reader-text&quot;&gt;Travis CI on a Java project with Docker support&lt;/span&gt;&lt;/a&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/javabien/blog/~4/RrDPXxC59ZA&quot; height=&quot;1&quot; width=&quot;1&quot; alt=&quot;&quot;/&gt;</description>
         <author>David GageotDavid GageotDavid Gageot</author>
         <guid isPermaLink="false">http://blog.javabien.net/?p=1557</guid>
         <pubDate>Fri, 21 Aug 2015 16:42:01 +0000</pubDate>
      </item>
      <item>
         <title>Better Docker on OSX with docker-machine, boot2docker and VMware</title>
         <link>http://feedproxy.google.com/~r/javabien/blog/~3/OkFech3Exto/</link>
         <description>I&amp;#8217;m on OSX and work a lot with Docker. I&amp;#8217;ve always found boot2docker on VirtualBox OK enough to the extent that it was not worth spending time making Docker run on VMware Fusion instead. Even if performances are better. Specially on shared folders. Well, until now. Docker Machine to the rescue! The new preferred way &amp;#8230; &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://blog.javabien.net/2015/08/20/better-docker-on-osx-with-docker-machine-boot2docker-and-vmware/&quot; class=&quot;more-link&quot;&gt;Continue reading &lt;span class=&quot;screen-reader-text&quot;&gt;Better Docker on OSX with docker-machine, boot2docker and VMware&lt;/span&gt;&lt;/a&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/javabien/blog/~4/OkFech3Exto&quot; height=&quot;1&quot; width=&quot;1&quot; alt=&quot;&quot;/&gt;</description>
         <author>David GageotDavid GageotDavid Gageot</author>
         <guid isPermaLink="false">http://blog.javabien.net/?p=1540</guid>
         <pubDate>Thu, 20 Aug 2015 19:23:10 +0000</pubDate>
      </item>
      <item>
         <title>Easily generate SSL certificates and htpasswd files with Docker</title>
         <link>http://blog.dahanne.net/2015/08/17/easily-generate-ssl-certificates-and-htpasswd-files-with-docker/</link>
         <description>So you don&amp;#8217;t have installed OpenSSL or apache2-utils on your laptop, but you have Docker installed and you want to generate SSL (self-signed or not) certificates and an htpasswd file for basic authentication ? Follow those easy steps ! Generate SSL certificates from a Docker container I gathered those steps from this nice article from &amp;#8230; &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://blog.dahanne.net/2015/08/17/easily-generate-ssl-certificates-and-htpasswd-files-with-docker/&quot; class=&quot;more-link&quot;&gt;Continuer la lecture de &lt;span class=&quot;screen-reader-text&quot;&gt;Easily generate SSL certificates and htpasswd files with Docker&lt;/span&gt; &lt;span class=&quot;meta-nav&quot;&gt;&amp;#8594;&lt;/span&gt;&lt;/a&gt;</description>
         <author>Anthony Dahanne</author>
         <guid isPermaLink="false">http://blog.dahanne.net/?p=1616</guid>
         <pubDate>Mon, 17 Aug 2015 04:04:17 +0000</pubDate>
      </item>
      <item>
         <title>Bitcoins for the impatient (and for my mum)</title>
         <link>http://feedproxy.google.com/~r/Oogifu/~3/jj_9mT-ChQs/bitcoins-for-impatient-and-for-my-mum.html</link>
         <description>&lt;h2&gt;Bitcoins for the impatient and for my mum&lt;/h2&gt; You can find all sorts of explanation on Internet with regards to Bitcoins (A bitcoin is a virtual or crypto currency) technologies and protocols. &lt;br/&gt;However, I have not found a reference where I could point my mum to - a simple page explaining what is Bitcoins, how it works, in layman terms. &lt;br/&gt;This is my attempt at explaining bitcoins. Mum, be patient. Read through it and then we will talk. Let’s start with some cryptography concepts. &lt;br/&gt;&lt;br/&gt; &lt;h3&gt;Cryptography concepts&lt;/h3&gt;It is quite unfortunate - but to understand bitcoins and the fancy distributed ledger concept you have to understand a little bit of cryptography. &lt;br/&gt;Do not be scared. &lt;br/&gt;Behind the mathematical complexity of asymmetric encryption lies a very simple concept: it is easy to multiply, but very hard to factorize. &lt;br/&gt;This is the concept behind asymmetric cryptosystems such as RSA (Rivest Shamir Adleman) and ECC (Elliptic Curve Cryptography), where the public key is known to everyone, but the private key only known to you.&lt;br/&gt;Throughout the years, the best way I have found to explain this is to take the following example.&lt;br/&gt;There is an inherent relationship between the public key and the private key, but what is it?&lt;br/&gt;Take the following number, &lt;b&gt;221&lt;/b&gt;, and treat it as my public key. Everyone knows I am the owner of a public key of value 221.&lt;br/&gt;My public key is the product of two prime numbers (a natural number greater than 1 that has no positive divisors other than 1 and itself.).&lt;br/&gt;It would probably take two 1 or 2 minutes to figure out what those numbers are.&lt;br/&gt;You will find that &lt;b&gt;221 = 13 * 17&lt;/b&gt;.&lt;br/&gt;My private key is the pair (13, 17), supposedly only known to me.&lt;br/&gt;&lt;br/&gt; It is very easy to compute the public key (221) knowing the private key (13, 17) but a lot more difficult to factorize 221 to find (13, 17). Whereas the multiplication would take you 5 seconds to do, it would take you 60 seconds or more to find the factors.&lt;br/&gt;&lt;br/&gt; That’s it. You got it. RSA, ECC the most two famous asymmetric crypto systems are simply based on that principle!&lt;br/&gt;&lt;br/&gt; &lt;h3&gt;RSA or ECC?&lt;/h3&gt;Bitcoins uses &lt;b&gt;ECC&lt;/b&gt;, not RSA, mainly because the key sizes are much shorter in ECC than in RSA for the same cryptography strength.&lt;br/&gt;An ECC key size of 160 bits is equivalent to a RSA key size of 1024, ECC 256 to RSA 3072, etc.&lt;br/&gt;Shorter size usually means less space to take, and less computing power needed.&lt;br/&gt;&lt;br/&gt; &lt;h3&gt;Hold on son, bits, what are bits?&lt;/h3&gt;Mum, a bit is either 1 or 0. Computers work like that.. yeah sorry.&lt;br/&gt;So anything we deal with, like I am typing this, is translated at some point into a series of 1 and 0, “base 2”, or binary representation.&lt;br/&gt;For example, the sentence, “Les sanglots longs des violons de l'automne” translates into:&lt;br/&gt;1001100, 1100101, 1110011, 100000, 1110011, 1100001, 1101110, 1100111, 1101100, 1101111, 1110100, 1110011, 100000, 1101100, 1101111, 1101110, 1100111, 1110011, 100000, 1100100, 1100101, 1110011, 100000, 1110110, 1101001, 1101111, 1101100, 1101111, 1101110, 1110011, 100000, 1100100, 1100101, 100000, 1101100, 100111, 1100001, 1110101, 1110100, 1101111, 1101101, 1101110, 1100101&lt;br/&gt;&lt;br/&gt;I am sure you are quite happy to know that!?&lt;br/&gt;&lt;br/&gt; &lt;h3&gt;Bitcoins uses key lengths of 256 bits&lt;/h3&gt;This is a large number, quite large.&lt;br/&gt;2^256 = 115792089237316195423570985008687907853269984665640564039457584007913129639936&lt;br/&gt;There are 78 digits in the above number. It is slightly less than 10^77&lt;br/&gt;FYI, the number of atoms in the observable universe is 10^80&lt;br/&gt;You now see how hard it can be to factorize a number as big as this!&lt;br/&gt;&lt;br/&gt; &lt;h3&gt;Alright, so what? I have large numbers, a public key and a private key&lt;/h3&gt;Each transaction (to send or receive money) of bitcoins is made public. How do we know the transaction comes from you, the public key owner?&lt;br/&gt;By digitally signing it.&lt;br/&gt;Digital signatures use your private key and the resulting computation can be checked or verified using your public key!&lt;br/&gt;Bitcoins uses SHA256 - a secure hash function. (They are actually hashing twice, using two different algorithms, but we want to keep this simple, right!)&lt;br/&gt;Behind the barbaric term hash function, or one-way hash function, lies another simple concept, “collision resistance”, i.e., it is hard to find two different inputs to the function that would produce the same output or hash.&lt;br/&gt;&lt;br/&gt; &lt;h3&gt;I am a bit confused: how does SHA (hash function) relate to public/private keys?&lt;/h3&gt;They are both needed to digitally sign an electronic document, or bitcoin transaction.&lt;br/&gt;SHA produces a fingerprint. The private keys signs the fingerprint, producing an electronic signature.&lt;br/&gt;This electronic signature can be verified by anyone using your public key.&lt;br/&gt;&lt;br/&gt; Standards exist so that implementors of cryptographic systems can talk to each other. Bitcoins relies on &lt;b&gt;ECDSA&lt;/b&gt; (Elliptic Curve Digital Signature Algorithm).&lt;br/&gt;&lt;br/&gt; &lt;h3&gt;Ok, I think I get it&lt;/h3&gt;Each transaction in the Bitcoins network is checked using cryptographic concepts such as ECC, SHA, ECDSA - those transactions are made public and inserted into a public ledger.&lt;br/&gt;The public ledger is composed of block chains - and the key principle of Bitcoins’ implementation is that there is no central authority.&lt;br/&gt;If there is no central authority, how do they avoid double spending or duplicate transactions? &lt;br/&gt;&lt;br/&gt;This is what the Double-Spending link says: &lt;br/&gt;“&lt;i&gt;Bitcoin protects against double spending by verifying each transaction added to the block chain to ensure that the inputs for the transaction had not previously already been spent.&lt;/i&gt;”&lt;br/&gt;A transaction is considered valid when confirmation takes place: meaning that is has been mined with a depth of one, then, the transaction is inserted into the a block chain.&lt;br/&gt;&lt;br/&gt; &lt;h3&gt;How confirmation works is very innovative. How does it work?&lt;/h3&gt;Block chains? Confirmation?&lt;br/&gt;A block chain is a set of transaction that potentially contains all transactions ever executed up to the genesis block (The first block ever created).&lt;br/&gt;Each block contains a hash (now you know what it is) of the previous block and so forth.&lt;br/&gt;This is the most important part of Bitcoins, the innovation, how do transactions get validated without a central authority and how to stop double-spending.&lt;br/&gt;The original paper introduces the concept of timestamps, via a timestamp server.&lt;br/&gt;The idea to avoid double-spending is to detect if an owner did not sign an earlier transaction. If there is an attempt to sign a later transaction, it would be ignored.&lt;br/&gt;&lt;br/&gt; The timestamp server (I am quoting the paper here) “&lt;i&gt;works by taking a hash of a block of items to be timestamped and widely publishing the hash, such as in a newspaper (...). The timestamp proves that the data must have existed at the time, obviously, in order to get into the hash. Each timestamp includes the previous timestamp in its hash, forming a chain, with each additional timestamp reinforcing the ones before it&lt;/i&gt;”. (See Section 3 of the original paper from Satoshi Nakamoto).&lt;br/&gt;&lt;br/&gt; Now it makes sense. The brain (or set of brains) behind Bitcoins, Satoshi Nakamoto, introduces a timestamp server that creates a set of hashes that are broadcasted to the network, proving the existence of data.&lt;br/&gt;Also, as stated before, each block having a reference to the hash of the previous block makes difficult to modify one block as it would imply modifying all the blocks before it in the chain.&lt;br/&gt;By difficult, I mean computationally difficult or very hard to do.&lt;br/&gt;&lt;br/&gt; This block chain concept is actively used by startups in FinTech. Check the reference for &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.smh.com.au/business/banking-and-finance/ripple-plans-to-wash-away-currency-exchange-20150506-1myyo1.html&quot;&gt;Ripple Labs&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt; &lt;h3&gt;Are we done? I am falling asleep. Hold on, no central authority?&lt;/h3&gt;Yes, no central authority. The use of a single timestamps server would makes things easier… but as Bitcoins is designed to work on a peer-to-peer network (P2P: a bunch of computers collaborating to achieve some common goal), this timestamp server needs to work on a P2P basis.&lt;br/&gt;This concept took me a short while to get - what Satoshi Nakamoto refers to as “&lt;b&gt;proof of work&lt;/b&gt;”.&lt;br/&gt;The idea, at least as I understand it, is that you do not want to give the decision to (in)validate a set of transactions to a unique entity or to a set of individuals, this would defeat the purpose of “no central authority”.&lt;br/&gt;&lt;br/&gt; How do you achieve fairness in the decision process on a distributed peer-to-peer network? This part is key and is the true innovation of Bitcoins.&lt;br/&gt;&lt;br/&gt; Think about it.&lt;br/&gt;&lt;br/&gt; Bitcoins uses a concept called “&lt;b&gt;hashcash&lt;/b&gt;” invented by the cryptographer &lt;b&gt;Adam Back&lt;/b&gt;.&lt;br/&gt;All “miners” (the people validating the transaction for a small fee) compete by trying to find a solution to a problem (they receive the transactions to validate). The winner inserts the transactions into a block chain, etc., and the start competing again to validate the next set of transactions.&lt;br/&gt;What is this problem? It is about finding a hash that satisfies a pattern. There is a difficulty target that is automatically adjusted every two weeks by the Bitcoins network.&lt;br/&gt;&lt;br/&gt; Ok, it is still a little bit cryptic.It is a beauty. Let me try to explain a little bit better.&lt;br/&gt;&lt;br/&gt; Imagine a network of “&lt;b&gt;miners&lt;/b&gt;” - people/computers validating transactions for acceptance by the whole network. Let’s say we have 10.&lt;br/&gt;We do not want one computer, or a set of computers to take over the control of blocks generation.&lt;br/&gt;Those 10 miners constantly compete by computing a hash tied to the data of the block being mined. The winner is the one who finds a hash that matches a dynamically adjusted pattern.&lt;br/&gt;&lt;br/&gt; More details please.&lt;br/&gt;&lt;br/&gt; The idea is to calculate the &lt;b&gt;SHA256 &lt;/b&gt;for example on a data block until the resulting hash would match a pattern. (In reality, it is a bit more complex, you need to worry about Merkel trees, longest chains, mining depth, etc.).&lt;br/&gt;What is this pattern? It can be as simple as finding a hash whose prefix contains a specific number of 0s. The more 0s to find, the more time-consuming for the miner, the more difficult.&lt;br/&gt;&lt;br/&gt; Nothing beats an example. (Code is below).&lt;br/&gt;&lt;br/&gt; Let’s take this block of data, the string “Les sanglots longs des violons de l'automne”.&lt;br/&gt;To find the SHA256 with 3 0s takes 27,228 iterations in 20 milliseconds, with the resulting hash: &lt;b&gt;000&lt;/b&gt;NL9xhiJT093++6ai2tyUm0SiDvvakO4RyI86zzTw= &lt;br/&gt; To find the SHA256 with 4 0s takes 17,770,201 iterations in 14 seconds, with the resulting hash: &lt;b&gt;0000&lt;/b&gt;i0Myy+PtP8FFu11+20UDVRaS0WJyPz+dZI6dWGY= &lt;br/&gt; It is a crypto lottery process.&lt;br/&gt;&lt;br/&gt; As mentioned by Satoshi Nakamoto, “&lt;b&gt;proof-of-work&lt;/b&gt;” is essentially &quot;&lt;b&gt;one-CPU-one-vote&lt;/b&gt;”.&lt;br/&gt;&lt;br/&gt; &lt;h3&gt;Summary&lt;/h3&gt;Tried my best to conceptualize Bitcoins. This is it in small nutshell. There is obviously a lot more to it: wallets, addresses, what is a transaction, etc. &lt;br/&gt;At least now I hope that you have the appetite to go and learn more. Lots of links below. &lt;br/&gt;I highly recommend this &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.amazon.co.uk/gp/product/B00QJDYKJO&quot;&gt;Mastering Bitcoin: Unlocking Digital Cryptocurrencies&lt;/a&gt; from Andreas M. Antonopoulos &lt;br/&gt;&lt;br/&gt; Thanks&lt;br/&gt;&lt;br/&gt; &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://www.linkedin.com/in/janaudy&quot;&gt;TJ&lt;/a&gt;&lt;br/&gt;&lt;br/&gt; &lt;h3&gt;Links&lt;/h3&gt;RSA: https://en.wikipedia.org/wiki/RSA_(cryptosystem)&lt;br/&gt;ECC: https://en.wikipedia.org/wiki/Elliptic_curve_cryptography&lt;br/&gt;ECC Key Sizes: https://www.nsa.gov/business/programs/elliptic_curve.shtml&lt;br/&gt;Atoms in universe: http://www.universetoday.com/36302/atoms-in-the-universe/ &lt;br/&gt;Collision resistance: https://en.wikipedia.org/wiki/Collision_resistance &lt;br/&gt;ECDSA: https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm &lt;br/&gt;EC Domain parameters: https://tools.ietf.org/html/draft-ietf-pkix-ecc-nist-recommended-curves-00 &lt;br/&gt;Double spending: https://en.bitcoin.it/wiki/Double-spending &lt;br/&gt;Confirmation: https://en.bitcoin.it/wiki/Confirmation &lt;br/&gt;Original Bitcoin Paper: https://bitcoin.org/bitcoin.pdf &lt;br/&gt;Block Chains: https://en.bitcoin.it/wiki/Block_chain &lt;br/&gt;Ripple Labs: http://www.smh.com.au/business/banking-and-finance/ripple-plans-to-wash-away-currency-exchange-20150506-1myyo1.html &lt;br/&gt;Adam Back: http://www.cypherspace.org/adam/ &lt;br/&gt;Hashcash: http://www.hashcash.org/ &lt;br/&gt;Merkle Tree: https://en.wikipedia.org/wiki/Merkle_tree &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;  &lt;h4&gt;String to bits&lt;/h4&gt;&lt;pre class=&quot;prettyprint&quot;&gt;&lt;br /&gt;&quot;Les sanglots longs des violons de l'automne&quot;.map(c =&amp;gt; Integer.toBinaryString(c))&lt;br /&gt;&lt;/pre&gt; &lt;h4&gt;2^256&lt;/h4&gt;Use bc or  &lt;pre class=&quot;prettyprint&quot;&gt;&lt;br /&gt;new java.math.BigInteger(&quot;2&quot;).pow(256) = 115792089237316195423570985008687907853269984665640564039457584007913129639936&lt;br /&gt;&lt;/pre&gt; &lt;h4&gt;Digital signature and verification&lt;/h4&gt;&lt;pre class=&quot;prettyprint&quot;&gt;&lt;br /&gt;package org.tj.ecc&lt;br /&gt;&lt;br /&gt;import java.security.KeyPairGenerator&lt;br /&gt;import java.security.spec.ECGenParameterSpec&lt;br /&gt;import java.security.Signature&lt;br /&gt;import java.util.Base64&lt;br /&gt;&lt;br /&gt;object ECCTests {&lt;br /&gt;  val eccKpg = KeyPairGenerator.getInstance(&quot;EC&quot;, &quot;SunEC&quot;)&lt;br /&gt;  val ecsp = new ECGenParameterSpec(&quot;secp256r1&quot;)&lt;br /&gt;  eccKpg.initialize(ecsp)&lt;br /&gt;&lt;br /&gt;  val kp = eccKpg.genKeyPair&lt;br /&gt;  &lt;br /&gt;  val text2sign = &quot;Les sanglots longs des violons de l'automne&quot;&lt;br /&gt;  val ecdsa = Signature.getInstance(&quot;SHA256withECDSA&quot;, &quot;SunEC&quot;)&lt;br /&gt;  val privKey = kp.getPrivate&lt;br /&gt;  &amp;lt;&amp;lt;(s&quot;Private Key $privKey&quot;)&lt;br /&gt;  ecdsa.initSign(privKey)&lt;br /&gt;  ecdsa.update(text2sign.getBytes)&lt;br /&gt;  val sig = ecdsa.sign&lt;br /&gt;  val signatureb64 = new String(Base64.getEncoder.encode(sig))&lt;br /&gt;  &amp;lt;&amp;lt;(s&quot;Signature for text: $signatureb64&quot;)&lt;br /&gt;  &lt;br /&gt;  val signature = Signature.getInstance(&quot;SHA256withECDSA&quot;, &quot;SunEC&quot;)&lt;br /&gt;  val pubKey = kp.getPublic&lt;br /&gt;  &amp;lt;&amp;lt;(s&quot;Public Key $pubKey&quot;)&lt;br /&gt;  signature.initVerify(pubKey)&lt;br /&gt;  signature.update(text2sign.getBytes)&lt;br /&gt;  val result = signature.verify(sig)&lt;br /&gt;  &amp;lt;&amp;lt;(s&quot;Verified signature: $result&quot;)&lt;br /&gt;  &lt;br /&gt;  def main(args: Array[String]): Unit = {&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  def &amp;lt;&amp;lt;(any: AnyRef) = println(any)&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;Output is &lt;pre class=&quot;prettyprint&quot;&gt;&lt;br /&gt;Private Key sun.security.ec.ECPrivateKeyImpl@9364&lt;br /&gt;Signature for text: MEUCIHCss5744CdiTZB6NbjmS/KUoYij62g4MyNbzaLxDmOiAiEAjD41Rjcy91IdBGvrexRc4eFhxd884FIMQmRPCUhA2+4=&lt;br /&gt;Public Key Sun EC public key, 256 bits&lt;br /&gt;  public x coord: 65479953046212531738762935537232089915367280178473139038566429069872218746437&lt;br /&gt;  public y coord: 54888950959211905102812252682418929722745382700581796025271727271177672920890&lt;br /&gt;  parameters: secp256r1 [NIST P-256, X9.62 prime256v1] (1.2.840.10045.3.1.7)&lt;br /&gt;Verified signature: true&lt;br /&gt;&lt;/pre&gt; &lt;h4&gt;Hashcash competition&lt;/h4&gt;&lt;pre class=&quot;prettyprint&quot;&gt;&lt;br /&gt;package org.tj.ecc&lt;br /&gt;&lt;br /&gt;import java.security.MessageDigest&lt;br /&gt;import java.util.Base64&lt;br /&gt;import scala.annotation.tailrec&lt;br /&gt;&lt;br /&gt;object HashCash {&lt;br /&gt;  def proofOfWork(data: String, pattern: String, maxIter: Int): Option[Int] = {&lt;br /&gt;    val md = MessageDigest.getInstance(&quot;SHA-256&quot;)&lt;br /&gt;    val encoder = Base64.getEncoder&lt;br /&gt;    &lt;br /&gt;    @tailrec&lt;br /&gt;    def helper(nonce: Int, iter: Int): Option[Int] = {&lt;br /&gt;      if (iter &amp;gt; maxIter) None&lt;br /&gt;      else {&lt;br /&gt;        val datum = data + nonce&lt;br /&gt;        md.reset&lt;br /&gt;        md.update(datum.getBytes)&lt;br /&gt;        val digest = new String(encoder.encode(md.digest))&lt;br /&gt;        if (digest.startsWith(pattern)) Some(nonce)&lt;br /&gt;        else helper(nonce + 1, iter + 1)&lt;br /&gt;      }&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    helper(0, 0)&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  def main(args: Array[String]): Unit = {&lt;br /&gt;    val t0 = System.currentTimeMillis&lt;br /&gt;    val result = proofOfWork(&quot;Les sanglots longs des violons de l'automne&quot;, &quot;0000&quot;, 100000000)&lt;br /&gt;    val tf = (System.currentTimeMillis() - t0)&lt;br /&gt;    println(s&quot;Result $result in $tf millis&quot;)&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/Oogifu/~4/jj_9mT-ChQs&quot; height=&quot;1&quot; width=&quot;1&quot; alt=&quot;&quot;/&gt;</description>
         <author>Thierry Janaudy</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-1436098877388372574.post-1855061865171402883</guid>
         <pubDate>Sun, 28 Jun 2015 01:32:00 +0000</pubDate>
      </item>
      <item>
         <title>Ripple plans to wash away currency exchange</title>
         <link>http://feedproxy.google.com/~r/Oogifu/~3/zbFc4gAJTKk/ripple-plans-to-wash-away-currency.html</link>
         <description>A very nice application for distributed ledgers! &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.smh.com.au/business/banking-and-finance/ripple-plans-to-wash-away-currency-exchange-20150506-1myyo1&quot;&gt;Ripple plans to wash away currency exchange&lt;/a&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/Oogifu/~4/zbFc4gAJTKk&quot; height=&quot;1&quot; width=&quot;1&quot; alt=&quot;&quot;/&gt;</description>
         <author>Thierry Janaudy</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-1436098877388372574.post-3169895802899507678</guid>
         <pubDate>Thu, 25 Jun 2015 12:04:00 +0000</pubDate>
      </item>
      <item>
         <title>La fin des banques?</title>
         <link>http://feedproxy.google.com/~r/Oogifu/~3/pjHIRyBi2iw/la-fin-des-banques.html</link>
         <description>A very good book to read (in French) about bank digitization and the impact of new technologies, and how it will (how it does!) affect your wallet. &lt;br/&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.amazon.fr/Apple-Bitcoin-Paypal-Google-technologie/dp/2212561148/&quot;&gt;Apple, Bitcoin, Paypal, Google : la fin des banques ? : Comment la technologie va changer votre argent&lt;/a&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/Oogifu/~4/pjHIRyBi2iw&quot; height=&quot;1&quot; width=&quot;1&quot; alt=&quot;&quot;/&gt;</description>
         <author>Thierry Janaudy</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-1436098877388372574.post-857497809460941981</guid>
         <pubDate>Fri, 19 Jun 2015 03:15:00 +0000</pubDate>
      </item>
      <item>
         <title>Abstracting JMS over lambdas: Scala vs Java 8</title>
         <link>http://feedproxy.google.com/~r/Oogifu/~3/RtD6xrXkYis/abstracting-jms-over-lambdas-scala-vs.html</link>
         <description>Follows two implementations of a JMS abstraction layer using functional interfaces in Java 8 and Scala 2.11. &lt;br/&gt;&lt;br/&gt; Let's start with &lt;b&gt;Java 8&lt;/b&gt;. &lt;br/&gt;First the definition of two functional interfaces:  &lt;pre class=&quot;prettyprint&quot;&gt;&lt;br /&gt;import javax.jms.Session;&lt;br /&gt;&lt;br /&gt;@FunctionalInterface&lt;br /&gt;public interface MessagingSession {&lt;br /&gt;  void withSession(final Session session);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt; and  import javax.jms.MessageProducer;  &lt;pre class=&quot;prettyprint&quot;&gt;&lt;br /&gt;@FunctionalInterface&lt;br /&gt;public interface MessagingProducer {&lt;br /&gt;  void produce(final MessageProducer producer);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt; The main class:  &lt;pre class=&quot;prettyprint&quot;&gt;&lt;br /&gt;import javax.jms.Connection;&lt;br /&gt;import javax.jms.ConnectionFactory;&lt;br /&gt;import javax.jms.Destination;&lt;br /&gt;import javax.jms.Session;&lt;br /&gt;import javax.jms.TextMessage;&lt;br /&gt;&lt;br /&gt;import org.apache.activemq.ActiveMQConnectionFactory;&lt;br /&gt;&lt;br /&gt;public class Messaging {&lt;br /&gt;  private final boolean transacted = false;&lt;br /&gt;  private final int ackMode = Session.AUTO_ACKNOWLEDGE;&lt;br /&gt; &lt;br /&gt;  private final ConnectionFactory connectionFactory;&lt;br /&gt;  private final Connection connection;&lt;br /&gt; &lt;br /&gt;  private Session session = null;&lt;br /&gt; &lt;br /&gt;  public Messaging() throws Exception {&lt;br /&gt;    this.connectionFactory = new ActiveMQConnectionFactory(&quot;vm://localhost&quot;);&lt;br /&gt;    this.connection = connectionFactory.createConnection();&lt;br /&gt;    connection.start();&lt;br /&gt;  }&lt;br /&gt; &lt;br /&gt;  public Destination createQueue(final String qn) throws Exception {&lt;br /&gt;    return session.createQueue(qn);&lt;br /&gt;  }&lt;br /&gt; &lt;br /&gt;  public TextMessage createTextMessage(final String text) throws Exception {&lt;br /&gt;    return session.createTextMessage(text);&lt;br /&gt;  }&lt;br /&gt; &lt;br /&gt;  public void withSession(final MessagingSession messagingSession) throws Exception {&lt;br /&gt;    session = connection.createSession(transacted, ackMode);&lt;br /&gt;    messagingSession.withSession(session);&lt;br /&gt;  }&lt;br /&gt; &lt;br /&gt;  public void withProducer(final Destination destination, final MessagingProducer messagingProducer) throws Exception {&lt;br /&gt;    messagingProducer.produce(session.createProducer(destination));&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt; And a demo class - how to use the above:  &lt;pre class=&quot;prettyprint&quot;&gt;&lt;br /&gt;import javax.jms.Destination;&lt;br /&gt;import javax.jms.TextMessage;&lt;br /&gt;&lt;br /&gt;public class JavaMessagingDemo {&lt;br /&gt;  public static void main(String[] args) throws Exception {&lt;br /&gt;    final Messaging messaging = new Messaging();&lt;br /&gt;  &lt;br /&gt;    messaging.withSession((session) -&amp;gt; {&lt;br /&gt;      try {&lt;br /&gt;        final Destination destination = messaging.createQueue(&quot;ANOTHER.QUEUE&quot;);&lt;br /&gt;        messaging.withProducer(destination, (producer) -&amp;gt; {&lt;br /&gt;          try {&lt;br /&gt;            final TextMessage message = messaging.createTextMessage(&quot;MY.MESSAGE&quot;);&lt;br /&gt;            producer.send(message);&lt;br /&gt;          } catch (Exception e) {&lt;br /&gt;            e.printStackTrace();&lt;br /&gt;          }&lt;br /&gt;        });&lt;br /&gt;      } catch (Exception e) {&lt;br /&gt;        e.printStackTrace();&lt;br /&gt;      }&lt;br /&gt;    });&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt; &lt;br/&gt; In &lt;b&gt;Scala 2.11&lt;/b&gt;:  &lt;pre class=&quot;prettyprint&quot;&gt;&lt;br /&gt;import javax.jms.Session&lt;br /&gt;import org.apache.activemq.ActiveMQConnectionFactory&lt;br /&gt;import javax.jms.Destination&lt;br /&gt;import javax.jms.MessageProducer&lt;br /&gt;&lt;br /&gt;object Messaging {&lt;br /&gt;  val transacted = false&lt;br /&gt;  val ackMode = Session.AUTO_ACKNOWLEDGE&lt;br /&gt;  val connectionFactory = new ActiveMQConnectionFactory(&quot;vm://localhost&quot;)&lt;br /&gt;  val connection = connectionFactory.createConnection&lt;br /&gt;  connection.start&lt;br /&gt;  &lt;br /&gt;  implicit def jms2richsession(session: Session) = new EnrichedJMSSession(session)&lt;br /&gt;  &lt;br /&gt;  def withSession(f: Session =&amp;gt; Unit) = f(connection.createSession(transacted, ackMode))&lt;br /&gt;  &lt;br /&gt;  class EnrichedJMSSession(val session: Session) {&lt;br /&gt;    def withProducer(dest: Destination)(f: MessageProducer =&amp;gt; Unit) = f(session.createProducer(dest))&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;object ScalaDemo {&lt;br /&gt;  import Messaging._&lt;br /&gt;  &lt;br /&gt;  def main(args: Array[String]): Unit = {&lt;br /&gt;    withSession { session =&amp;gt;  &lt;br /&gt;      val dest = session.createQueue(&quot;MY.QUEUE&quot;)&lt;br /&gt;      session.withProducer(dest) { producer =&amp;gt;&lt;br /&gt;        val message = session.createTextMessage(&quot;Some message&quot;)&lt;br /&gt;        producer.send(message)&lt;br /&gt;      }&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/Oogifu/~4/RtD6xrXkYis&quot; height=&quot;1&quot; width=&quot;1&quot; alt=&quot;&quot;/&gt;</description>
         <author>Thierry Janaudy</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-1436098877388372574.post-3763987265109397125</guid>
         <pubDate>Sat, 28 Mar 2015 08:36:00 +0000</pubDate>
      </item>
      <item>
         <title>Group By Sum Scala 2.11 vs Java 8</title>
         <link>http://feedproxy.google.com/~r/Oogifu/~3/BAwVdEPtJH0/group-by-sum-scala-211-vs-java-8.html</link>
         <description>I had to recently implement an aggregate function in Scala 2.11 and Java 8... Which one do you prefer?  &lt;br/&gt;&lt;br/&gt;&lt;b&gt;Scala 2.11&lt;/b&gt;&lt;pre class=&quot;prettyprint&quot;&gt;&lt;br /&gt;case class Datum(val id: String, val count: Int)&lt;br /&gt;&lt;br /&gt;object GroupBySumScalaDemo {&lt;br /&gt;  val list = List(Datum(&quot;a&quot;, 1), Datum(&quot;a&quot;, 2), Datum(&quot;a&quot;, 3),&lt;br /&gt;                  Datum(&quot;b&quot;, 4), Datum(&quot;b&quot;, 5),&lt;br /&gt;                  Datum(&quot;c&quot;, 6))&lt;br /&gt;                  &lt;br /&gt;  // Want to group by 'id' and sum all values&lt;br /&gt;  val map = list.groupBy(_.id).mapValues(_.map(_.count).sum)   &lt;br /&gt;  &lt;br /&gt;  println(map)&lt;br /&gt;  &lt;br /&gt;  def main(args: Array[String]): Unit = {&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt; &lt;b&gt;Java 8&lt;/b&gt;&lt;pre class=&quot;prettyprint&quot;&gt;&lt;br /&gt;class MyDatum {&lt;br /&gt;  private final String id;&lt;br /&gt;  private final int count;&lt;br /&gt; &lt;br /&gt;  public MyDatum(final String id, final int count) {&lt;br /&gt;    this.id = id;&lt;br /&gt;    this.count = count;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;  public String getId() {&lt;br /&gt;    return id;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public int getCount() {&lt;br /&gt;    return count;&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public class GroupBySumJava8Demo {&lt;br /&gt;  public GroupBySumJava8Demo() {&lt;br /&gt;    final List list = Arrays.asList(&lt;br /&gt;      new MyDatum(&quot;a&quot;, 1), new MyDatum(&quot;a&quot;, 2), new MyDatum(&quot;a&quot;, 3),&lt;br /&gt;      new MyDatum(&quot;b&quot;, 4), new MyDatum(&quot;b&quot;, 5),&lt;br /&gt;      new MyDatum(&quot;c&quot;, 6));&lt;br /&gt;    final Map map = list.stream()&lt;br /&gt;      .collect(Collectors.groupingBy(MyDatum::getId, Collectors.summingInt(MyDatum::getCount)));&lt;br /&gt;    System.out.println(map);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public static void main(String[] args) {&lt;br /&gt;    new GroupBySumJava8Demo();&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt; I know which one I like ;-)&lt;img src=&quot;http://feeds.feedburner.com/~r/Oogifu/~4/BAwVdEPtJH0&quot; height=&quot;1&quot; width=&quot;1&quot; alt=&quot;&quot;/&gt;</description>
         <author>Thierry Janaudy</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-1436098877388372574.post-1871392049361364742</guid>
         <pubDate>Thu, 26 Mar 2015 05:38:00 +0000</pubDate>
      </item>
      <item>
         <title>Monadic behaviour</title>
         <link>http://feedproxy.google.com/~r/Oogifu/~3/8vRPA--cKLg/monadic-behaviour.html</link>
         <description>Today, home-sick, read and found a bunch of nice links on Scala and Monads. For future reference, I paste those links here.  &lt;br/&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://scabl.blogspot.sg/2013/02/monads-in-scala-1.html&quot;&gt;Monads in Scala I&lt;/a&gt;&lt;br/&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://en.wikibooks.org/wiki/Haskell/Understanding_monads#Definition&quot;&gt;Haskell Monads&lt;/a&gt;&lt;br/&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://en.wikipedia.org/wiki/Category_theory&quot;&gt;Category Theory&lt;/a&gt;&lt;br/&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://james-iry.blogspot.sg/2007/09/monads-are-elephants-part-1.html&quot;&gt;Monads are elephant I&lt;/a&gt;, &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://james-iry.blogspot.sg/2007/10/monads-are-elephants-part-2.html&quot;&gt;Monads are elephant II&lt;/a&gt;, &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://james-iry.blogspot.sg/2007/10/monads-are-elephants-part-3.html&quot;&gt;Monads are elephant III&lt;/a&gt;, &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://james-iry.blogspot.sg/2007/11/monads-are-elephants-part-4.html&quot;&gt;Monads are elephant IV&lt;/a&gt;&lt;br/&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://eed3si9n.com/learning-scalaz/Monad.html&quot;&gt;Scalaz Monads&lt;/a&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/Oogifu/~4/8vRPA--cKLg&quot; height=&quot;1&quot; width=&quot;1&quot; alt=&quot;&quot;/&gt;</description>
         <author>Thierry Janaudy</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-1436098877388372574.post-8917597453209781201</guid>
         <pubDate>Sat, 07 Mar 2015 03:22:00 +0000</pubDate>
      </item>
      <item>
         <title>Adventures in financial and software engineering</title>
         <link>http://feedproxy.google.com/~r/Oogifu/~3/2h2T-G_c_Vc/adventures-in-financial-and-software.html</link>
         <description>&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://falconair.github.io/2015/01/30/composingcontracts.html&quot;&gt;Worth a read&lt;/a&gt;&lt;img src=&quot;http://feeds.feedburner.com/~r/Oogifu/~4/2h2T-G_c_Vc&quot; height=&quot;1&quot; width=&quot;1&quot; alt=&quot;&quot;/&gt;</description>
         <author>Thierry Janaudy</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-1436098877388372574.post-1135027924323828612</guid>
         <pubDate>Fri, 06 Mar 2015 00:57:00 +0000</pubDate>
      </item>
      <item>
         <title>RPC, Protobuf, Scala</title>
         <link>http://feedproxy.google.com/~r/Oogifu/~3/nZ1IsLE8iDo/rpc-protobuf-scala.html</link>
         <description>Seen too many custom frameworks for RPC, asynchronous callbacks, custom serialization, etc...... There are great frameworks out there to handle this. Let's have a look at a simple Search service, asynchronous request, using &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://developers.google.com/protocol-buffers/&quot;&gt;protobuf&lt;/a&gt; and &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.scala-lang.org/&quot;&gt;Scala&lt;/a&gt;.  Some *.proto def where the services are defined, and the data to marshall in and out.  &lt;pre class=&quot;prettyprint&quot;&gt;&lt;br /&gt;syntax = &quot;proto2&quot;;&lt;br /&gt;&lt;br /&gt;package myprotocol;&lt;br /&gt;&lt;br /&gt;message SearchRequest {&lt;br /&gt; required int32 requestid = 1;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;message SearchResponse {&lt;br /&gt; required int32 requestid = 1;&lt;br /&gt; required int32 responseid = 2;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt; A simple RPC call definition:  &lt;pre class=&quot;prettyprint&quot;&gt;&lt;br /&gt;syntax = &quot;proto2&quot;;&lt;br /&gt;option java_generic_services = true;&lt;br /&gt;&lt;br /&gt;package myprotocol;&lt;br /&gt;&lt;br /&gt;import &quot;Search.proto&quot;;&lt;br /&gt;&lt;br /&gt;service SearchService {&lt;br /&gt;  rpc Search (SearchRequest) returns (SearchResponse);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt; Then you define two classes...the one that implements your RpcChannel is the one where you plugin your underlying messaging system, such as JMS, Solace, Tibco RV, or sockets...  &lt;pre class=&quot;prettyprint&quot;&gt;&lt;br /&gt;package demo&lt;br /&gt;&lt;br /&gt;import java.util.logging.Logger&lt;br /&gt;&lt;br /&gt;import com.google.protobuf.Descriptors.MethodDescriptor&lt;br /&gt;import com.google.protobuf.Message&lt;br /&gt;import com.google.protobuf.RpcCallback&lt;br /&gt;import com.google.protobuf.RpcChannel&lt;br /&gt;import com.google.protobuf.RpcController&lt;br /&gt;&lt;br /&gt;import myprotocol.Search.SearchRequest&lt;br /&gt;import myprotocol.Search.SearchResponse&lt;br /&gt;&lt;br /&gt;class SChannel extends RpcChannel {&lt;br /&gt;  val logger = Logger.getLogger(&quot;SChannel&quot;)&lt;br /&gt;  &lt;br /&gt;  override def callMethod(methodDescriptor: MethodDescriptor , &lt;br /&gt;                          rpcController: RpcController , &lt;br /&gt;                          m1: Message, &lt;br /&gt;                          m2: Message, &lt;br /&gt;                          rpcCallback: RpcCallback[Message] ) {&lt;br /&gt;    m1 match {&lt;br /&gt;      case sr: SearchRequest =&amp;gt; {&lt;br /&gt;        val response = SearchResponse.newBuilder.setRequestid(sr.getRequestid).setResponseid(2).build&lt;br /&gt;        rpcCallback.run(response)&lt;br /&gt;      }&lt;br /&gt;      case _ =&amp;gt; logger.warning(s&quot;Not handling message type $m1 yet&quot;)&lt;br /&gt;    }&lt;br /&gt;  } //  override def callMethod&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;class SController extends RpcController {&lt;br /&gt;  val logger = Logger.getLogger(&quot;SController&quot;)&lt;br /&gt;  &lt;br /&gt;  override def reset() {&lt;br /&gt;    logger.info(&quot;reset()&quot;)&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  override def failed(): Boolean = {&lt;br /&gt;    logger.info(&quot;failed()&quot;)&lt;br /&gt;    false&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  override def errorText(): String = {&lt;br /&gt;    logger.info(&quot;errorText()&quot;)&lt;br /&gt;    null&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  override def startCancel() {&lt;br /&gt;    logger.info(&quot;startCancel()&quot;)&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  override def setFailed(s: String) {&lt;br /&gt;    logger.info(s&quot;setFailed($s&quot;)&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  override def isCanceled():Boolean = {&lt;br /&gt;    logger.info(&quot;isCanceled()&quot;)&lt;br /&gt;    false&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  override def notifyOnCancel(rpccallback: RpcCallback[Object]) {&lt;br /&gt;    logger.info(s&quot;notifyOnCancel($rpccallback)&quot;)&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt; &lt;b&gt;Edited I&lt;/b&gt; Forgot the code to actually use those classes :-)  &lt;pre class=&quot;prettyprint&quot;&gt;&lt;br /&gt;package demo&lt;br /&gt;&lt;br /&gt;import java.util.logging.Logger&lt;br /&gt;&lt;br /&gt;import com.google.protobuf.RpcCallback&lt;br /&gt;&lt;br /&gt;import myprotocol.Search.SearchRequest&lt;br /&gt;import myprotocol.Search.SearchResponse&lt;br /&gt;import myprotocol.Services&lt;br /&gt;&lt;br /&gt;object RPCDemo {&lt;br /&gt;  val logger = Logger.getLogger(&quot;RPCDemo&quot;)&lt;br /&gt;  &lt;br /&gt;  def main(args: Array[String]): Unit = {&lt;br /&gt;    val channel = new SChannel&lt;br /&gt;    val controller = new SController&lt;br /&gt;    val services = Services.SearchService.newStub(channel)&lt;br /&gt;    val request = SearchRequest.newBuilder().setRequestid(1).build&lt;br /&gt;    val callback = new RpcCallback[SearchResponse] {&lt;br /&gt;      override def run(obj: SearchResponse) = logger.info(s&quot;Received on RpcCallback $obj&quot;)&lt;br /&gt;    }&lt;br /&gt;    services.search(controller, request, callback)&lt;br /&gt;    &lt;br /&gt;    logger.info(&quot;Sleeping 5 seconds&quot;)&lt;br /&gt;    Thread.sleep(5000)&lt;br /&gt;    logger.info(&quot;Ciao&quot;)&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt; For example, if you are looking for a pre-built TCP/IP socket implementation on top of protobuf, check out &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://code.google.com/p/protobuf-socket-rpc/&quot;&gt;protobuf-socket-rpc&lt;/a&gt;A detailed view of a custom channel can be seen there: &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://code.google.com/p/protobuf-socket-rpc/source/browse/trunk/java/src/main/java/com/googlecode/protobuf/socketrpc/RpcChannelImpl.java&quot;&gt;RpcChannelImpl.java&lt;/a&gt; &lt;br/&gt; &lt;b&gt;Edited II&lt;/b&gt; You can obviously define an implict instead of this callback a la Java:  &lt;pre class=&quot;prettyprint&quot;&gt;&lt;br /&gt;  import scala.language.implicitConversions&lt;br /&gt;  implicit def f2cb(f: (SearchResponse) =&amp;gt; Unit) = new RpcCallback[SearchResponse] {&lt;br /&gt;    override def run(sr: SearchResponse) = f(sr)&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  services.search(controller, request, (resp: SearchResponse) =&amp;gt; {&lt;br /&gt;    logger.info(s&quot;Received on RpcCallback $resp&quot;)&lt;br /&gt;  })&lt;br /&gt;&lt;/pre&gt; ... Voila.&lt;img src=&quot;http://feeds.feedburner.com/~r/Oogifu/~4/nZ1IsLE8iDo&quot; height=&quot;1&quot; width=&quot;1&quot; alt=&quot;&quot;/&gt;</description>
         <author>Thierry Janaudy</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-1436098877388372574.post-224378061242627045</guid>
         <pubDate>Sat, 21 Feb 2015 04:01:00 +0000</pubDate>
      </item>
      <item>
         <title>Stop installing postgres on your laptop : use Docker instead</title>
         <link>http://blog.dahanne.net/2015/01/19/stop-installing-postgres-on-your-laptop-use-docker-instead/</link>
         <description>Tired of managing a full-blown DB server on your development machine ? Let&amp;#8217;s give Docker a try ! Getting started with Docker First, if your development machine is not running Linux (ie if you&amp;#8217;re running windows or mac os x), it&amp;#8217;s easier to use boot2docker to get started, since it will take care of installing: &amp;#8230; &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://blog.dahanne.net/2015/01/19/stop-installing-postgres-on-your-laptop-use-docker-instead/&quot; class=&quot;more-link&quot;&gt;Continuer la lecture de &lt;span class=&quot;screen-reader-text&quot;&gt;Stop installing postgres on your laptop : use Docker instead&lt;/span&gt; &lt;span class=&quot;meta-nav&quot;&gt;&amp;#8594;&lt;/span&gt;&lt;/a&gt;</description>
         <author>Anthony Dahanne</author>
         <guid isPermaLink="false">http://blog.dahanne.net/?p=1496</guid>
         <pubDate>Mon, 19 Jan 2015 16:06:05 +0000</pubDate>
      </item>
      <item>
         <title>Ouray! Just completed my Machine Learning Course!</title>
         <link>http://feedproxy.google.com/~r/Oogifu/~3/TuiNW0fHPxE/ouray-just-completed-my-machine.html</link>
         <description>Completed my &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://www.coursera.org/course/ml&quot;&gt;ML course from Coursera&lt;/a&gt;! Lots of work!&lt;img src=&quot;http://feeds.feedburner.com/~r/Oogifu/~4/TuiNW0fHPxE&quot; height=&quot;1&quot; width=&quot;1&quot; alt=&quot;&quot;/&gt;</description>
         <author>Thierry Janaudy</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-1436098877388372574.post-8531882432213081753</guid>
         <pubDate>Sun, 11 Jan 2015 06:21:00 +0000</pubDate>
      </item>
   </channel>
</rss>
<!-- fe8.yql.bf1.yahoo.com compressed/chunked Thu Oct  1 21:38:13 UTC 2015 -->
