Jump to content

Libt2n

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 141.206.171.2 (talk) at 22:48, 26 September 2013 (better infobox, refs). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Stable release
0.5 / 7 February 2009; 15 years ago (2009-02-07)
Written inC++
Operating systemUnix-like
TypeInter-process communication
LicenseLGPL
WebsiteOfficial libt2n website

libt2n is a free Inter-process communication (IPC) library which offers a simple way for C++ applications to communicate with one another.[1]

Introduction

libt2n is an inter-process communication (IPC) system which is focused on ease of use and a minimum of code-lines needed to export and use methods. This is achieved by reducing the feature-set and relying on the serialization library developed at Boost.[1][2]

The goals of libt2n development are:

  • easy to use, minimum of code-lines needed to export and use methods
  • handles complex C++ structures like maps of vectors, etc.
  • passes exceptions from the server back to the caller
  • easy integration into GNU Autotools and Pkg-config

The limitations of the current libt2n implementation:

  • C++ only
  • Synchronous, blocking, no callbacks
  • no server-side objects, just functions you can call
  • no threads or multiple server processes for handling multiple requests at once

Architecture

libt2n is divided in two parts:

  • The library which is linked to every client and server
  • The code generator used to create stubs and skeletons

The code generator does not use an Interface description language (IDL), but parses the source code of the server for special tags. It produces the code needed to handle the calls on the server and a ready-to-use library for the client.

If a remote function is called, the client library creates an object describing the call, including all parameters. This object is serialized using the Boost serialization library and transferred to the server. Currently this can be done using Unix domain sockets or TCP. The server deserializes the object and calls the corresponding method. The result (return value or exception) is again serialized and sent back to the client.

Trivia

t2n is an abbreviation for 'talk to neighbor'.

References

  1. ^ a b "libt2n website". Archived from the original on 20 Feb 2012. Retrieved 26 September 2013.
  2. ^ "Novell shareware". Retrieved 26 September 2013.