Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

16. Interfacing Erlang with Other Progra... > Library Support for Communication

Library Support for Communication

As the example in the preceding section shows, it is pretty tedious to encode and decode the data yourself. Of course, you have the flexibility to choose efficient communication protocols between your external program and an Erlang node, but reinventing an encoding for each program is not the best way to do things.

If you do not want to go down that route, Erlang comes with libraries to support communication with the outside world, and particularly with C and Java. We covered the Java library at the beginning of the chapter; we’ll discuss interfacing with Ruby in the remainder of the chapter.

Working in Ruby: erlectricity

erlectricity is a Ruby library—a “gem”—that you can download and use with Ruby. It is available as source code from http://github.com/mojombo/erlectricity, and you can install it in Ruby using:


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint