HOME

TheInfoList



OR:

libt2n is a
free Free may refer to: Concept * Freedom, having the ability to do something, without having to obey anyone/anything * Freethought, a position that beliefs should be formed only on the basis of logic, reason, and empiricism * Emancipate, to procur ...
Inter-process communication (IPC)
library A library is a collection of materials, books or media that are accessible for use and not just for display purposes. A library provides physical (hard copies) or digital access (soft copies) materials, and may be a physical location or a vi ...
which offers a simple way for
C++ C++ (pronounced "C plus plus") is a high-level general-purpose programming language created by Danish computer scientist Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significa ...
applications to communicate with one another.


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 Boost, boosted or boosting may refer to: Science, technology and mathematics * Boost, positive manifold pressure in turbocharged engines * Boost (C++ libraries), a set of free peer-reviewed portable C++ libraries * Boost (material), a material b ...
. The goals of libt2n development are: * easy to use, minimum of code-lines needed to export and use methods * handles complex
C++ C++ (pronounced "C plus plus") is a high-level general-purpose programming language created by Danish computer scientist Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significa ...
structures like maps of vectors, etc. * passes exceptions from the server back to the caller * easy integration into
GNU Autotools The GNU Autotools, also known as the GNU Build System, is a suite of programming tools designed to assist in making source code packages portable to many Unix-like systems. It can be difficult to make a software program portable: the C compiler ...
and
Pkg-config pkg-config is a computer program that defines and supports a unified interface for querying installed libraries for the purpose of compiling software that depends on them. It allows programmers and installation scripts to work without explicit kn ...
The limitations of the current libt2n implementation: *
C++ C++ (pronounced "C plus plus") is a high-level general-purpose programming language created by Danish computer scientist Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significa ...
only * Synchronous, blocking, no callbacks * no server-side objects, just functions you can call * no
threads Thread may refer to: Objects * Thread (yarn), a kind of thin yarn used for sewing ** Thread (unit of measurement), a cotton yarn measure * Screw thread, a helical ridge on a cylindrical fastener Arts and entertainment * ''Thread'' (film), 2016 ...
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 A skeleton is the structural frame that supports the body of an animal. There are several types of skeletons, including the exoskeleton, which is the stable outer shell of an organism, the endoskeleton, which forms the support structure inside ...
The code generator does not use an
Interface description language interface description language or interface definition language (IDL), is a generic term for a language that lets a program or object written in one language communicate with another program written in an unknown language. IDLs describe an inter ...
(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 Boost, boosted or boosting may refer to: Science, technology and mathematics * Boost, positive manifold pressure in turbocharged engines * Boost (C++ libraries), a set of free peer-reviewed portable C++ libraries * Boost (material), a material b ...
serialization library and transferred to the server. Currently this can be done using
Unix domain socket A Unix domain socket aka UDS or IPC socket ( inter-process communication socket) is a data communications endpoint for exchanging data between processes executing on the same host operating system. It is also referred to by its address family AF_U ...
s or
TCP TCP may refer to: Science and technology * Transformer coupled plasma * Tool Center Point, see Robot end effector Computing * Transmission Control Protocol, a fundamental Internet standard * Telephony control protocol, a Bluetooth communication s ...
. 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


External links

{{Portal, Free and open-source software
Official libt2n website
Inter-process communication C++ C++ libraries Free software programmed in C++ Free computer libraries