I gave a talk at Lambda Lounge Utah on “Programming and Math”.
Over the years I occasionally reimplemented my rdf-triple-browser, first in GWT, then Java/Swing and then last summer in Haskell using Threepenny-gui (which I will call ‘TPG’ for the rest of this article). The hardest part for me was understanding how to connect to external events.
The documentation says
newEvent :: IO (Event a, Handler a)“Create a new event. Also returns a function that triggers an event occurrence.” What is doesn’t say it that calling the returned
Handlercauses the specific returned
I got lost in the documentation about
Handler, going off on dead ends with
register. Even the TAs at last summer’s Utrecht Haskell Summer School could not figure it out (although, to be fair, they did not spend that much time on it, they were concentrating on course questions).
Fortunately, Max Taldykin, on stackoverflow, provided a small program that lead me to discover the “magic” of how to use what is returned via
newEvent. Below I show an even smaller program that shows how it is wired.
My talk at Java one on InfiniBand communication infrastructure.
The PEPT remoting architecture considers:
a transport to be something that moves bits from one location to another
a transport is something where the program does not manipulate header bits
e.g., most apps do not touch TCP/IP header bits, they just write/read from the TCP/IP streams
a remoting protocol is something where, besides moving bits, the program will manipulate the header bits
e.g., HTTP is a protocol for REST
e.g., HTTP is a transport for SOAP (in general)
a remoting format is
a serial encoding of the application data
a serial encoding of protocol and/or transport headers
e.g., JSON is a common application format for REST
e.g., XML is both the application format and the protocol format for SOAP
e.g., CDR is both the application format and the protocol format for CORBA IIOP
There are, of course, special cases, but the above taxonomy provides a useful separation of concerns.
One of the tools I use for drawing graphs is
dotfrom Graphviz. Recently I was drawing a series of diagrams that have mostly identical parts. It was error-prone and a pain to keep the identical parts in sync between the multiple
*.dotfiles. I found Haskell’s Data.GraphViz package to be the solution.
The documentation for that package is great, but it needs a few more examples. The purpose of this post is to add examples to the pool.
For writing articles on Haskell, rather than showing
Prelude> map (*2) [1..10] [2,4,6,8,10,12,14,16,18,20]
I do the following:
My presentation at JavaOne 2013.
The JAX-WS standard includes APIs for using POJOs or XML for remote messages. But it does not include APIs for letting the user control the transport. This BoF discusses adding pluggable transport APIs to the JAX-WS standard.
This BoF shows a candidate pluggable transport mechanism for JAX-WS that enables one to use other transports besides HTTP. In particular, it shows the benefits of using WebSockets and InfiniBand transports for SOAP message exchanges.
I have a large digitized music collection, primarily encoded in lossless FLAC. Great for listening at home. But lossy MP3 is best for mobile devices, in terms of size and the ability of players to handle encoding formats.
I gave my perspective of SOAP fading, REST dominant and WebSockets rising at JavaOne.
JavaOne talk on security (pdf). I find the diagrams we created to be useful.