Skip to content

tiian/flom

Repository files navigation

 _____ _          __  __  
|  ___| |    ___ |  \/  |  FLoM
| |_  | |   / _ \| |\/| |  Free Lock Manager
|  _| | |__| (_) | |  | |  a free and open source lock manager
|_|   |_____\___/|_|  |_|

FLoM (Free Lock Manager) is an open source and free lock manager designed to
serialize and synchronize shell command execution and custom programs
developed in C, C++, Java, Perl, PHP, Python.
Official web site is http://www.tiian.org/flom/
Both GitHub https://github.com/tiian/flom and 
SourceForge https://sourceforge.net/projects/flom/ host FLoM source code.
Basic usage examples are in doc/examples directory (default installation path 
is /usr/local/share/doc/flom/examples/)
API documentation is distributed in directory doc/html/ (default installation
path is /usr/local/share/doc/flom/html/) and on the web at http://www.tiian.org/flom/API/C/globals_func.html
FLoM is implemented using state of the art reactive programming:
independent non blocking threads reach unparalleled scalability and C language
source code guarantee the best performance. The usage of mutexes is reduced to
trifling functions: FLoM can be considered a "lock free lock manager".

A list of implemented use cases is listed at this URL: 
http://www.tiian.org/flom/FLoM_by_examples/FLoM_by_examples.html
This is a brief list of the available features:
- synchronization of shell commands to avoid conflicts on files, directories,
  abstract resources
- enforcement of command order execution to avoid one command is executed
  before another one
- resource utilization leveling to avoid too many similar tasks run at the
  same time 
- all the synchronization features are available inside a single host or in
  a distributed environment using TCP/IP networking (both IPv4 and IPv6 are
  suppoted)
- an autodiscovery feature is available to reduce deployment complexity in a
  cloud environment (every node at any time may become a "server" for
  the others node)
- easy API (Application Programming Interface) to synchronize your own
  programs with shell executed flom commands. These languages have a ready
  to use binding: C, C++, Java, Perl, PHP, Python.
- TLS (Transport Layer Security) support to protect network communication and
  to supply peer to peer mutual authentication based on X.509 certificates
- a large spectrum of different resources:
  1. simple: basic locking using DLM semantic
  2. hierarchical: HFS like semantic
  3. numerical: pools of undifferentiated resources
  4. set: sets of differentiated resources
  5. sequence: arrays of transactional (or non transactional) sequences
  6. timestamp: arrays of unique timestamp sequences

FLoM central documentation site is hosted by SourceForge Wiki: 
	http://www.tiian.org/flom/

 * FLoM is free software: you can redistribute it and/or modify under the terms
 * of GNU General Public License version 2 as published by the Free Software
 * Foundation.
 *
 * FLoM is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

Download the tarball from SourceForge: https://sourceforge.net/projects/flom/
and install FLoM using standard GNU build chain: 
    tar xvzf flom-X.Y.Z.tar.gz
    cd flom-X.Y.Z
    ./configure
    make
    sudo make install

Python 3 support: if you want to compile the API for Python 3, use:
    PYTHON_VERSION=3 ./configure
    make
    sudo make install

If you are using a Red Hat derivative you will probably use
    su
    make install
    exit
instead of "sudo make install".

Take a look to file INSTALL for more details.

Use 
man flom 
to read man page and pick up Internet relevant URLs for FLOM project.

Use
make check
to perform package automatic tests.
NOTE: do *NOT* run tests on a system that's using flom because some tests
      need to kill all FLoM running instances and this is not acceptable if
      you are playing production workloads. DO USE A TEST SYSTEM!
NOTE: tests needs the system is NOT overloaded because they stick on timing
      and timing breaks if the system is overloaded.
NOTE: FLoM must be installed with "sudo make install" before tests can 
      proceed (this is a library path issue...)

NOTE: automatic tests require at least one properly configured network
      interface; if you need to build FLoM in entirely offline systems, use
      ./configure --disable-testcases
      to disable all the test cases and to remove the need for a network
      interface at build time.
      If you switch from "./configure" to "./configure --disable-testcases" or
      vice versa, you MUST clean th environment with "make clean" to force
      a new generation of test files.

NOTE: if you are not interested in C++ API library support, specify
      "--disable-cpp" at configure time; example:
      ./configure --disable-cpp
NOTE: if you are not interested in Java API library support, specify
      "--disable-java" at configure time; example:
      ./configure --disable-java
NOTE: if you are not interested in Perl API library support, specify
      "--disable-perl" at configure time; example:
      ./configure --disable-php
NOTE: if you are not interested in PHP API library support, specify
      "--disable-php" at configure time; example:
      ./configure --disable-php
NOTE: if you are not interested in Python API library support, specify
      "--disable-python" at configure time; example:
      ./configure --disable-python

One of the most frequent issues related to IPv4 multicast and IPv6 features of
FLoM depends on Linux firewalling; for the sake of testing, you can try to
temporarely disable the firewall in a test environment and to restore it
later on, with accurate configuration as required by your security needs.
A couple of procedures to disable it, depending on the operating system:
	systemctl stop firewalld 
	systemctl disable firewalld 
or alternatively
	service ipchains stop
	service iptables stop
	chkconfig ipchains off
	chkconfig iptables off
After you probed the environment, don't forget to secure it as required by your
security policies.

Issues related to FUSE Virtual File System activated with command option "-m"
or "--mount-point-vfs":
FLoM daemon umount by itself the FUSE VFS, but under some conditions the
daemon is not able to umount it, for example if the FUSE filesystem is used by
some users.
In that case the daemon will generate a syslog message FLM024W to warn about
the need of manual unmount with one of the following commands:
fusermount -u <mountpoint>
sudo umount -l <mountpoint>
Note: if you are using FUSE3, there's the chance you have to use the command
"fusermount3" instead of "fusermount".

If you need some help (usage tricks, hints, etc...) please post a message in
the forum: http://sourceforge.net/p/flom/discussion/
If you think you have discovered a bug, please open an issue here:
https://github.com/tiian/flom/issues

Dependencies report:
O.S.		Feature		Packages
Ubuntu		Basic		make gcc libglib2.0-dev dbus libdbus-1-dev libssl-dev pkg-config automake
Ubuntu	14.04	FUSE		fuse libfuse-dev
Ubuntu	16.04	FUSE		fuse libfuse-dev
Ubuntu	18.04	FUSE		fuse libfuse-dev
Ubuntu	20.04	FUSE		fuse libfuse-dev
Ubuntu 	22.04 	FUSE3		fuse3 libfuse3-dev  <-- use either FUSE or FUSE3
Ubuntu		C++ API		g++
Ubuntu		Perl API	swig libperl-dev
Ubuntu		PHP API		swig php5-cli php5-dev
Ubuntu	16.04	PHP API		swig php-cli php-dev*
Ubuntu  18.04   PHP API         swig php-cli php-dev
Ubuntu  20.04   PHP API         swig php-cli php-dev
Ubuntu  22.04   PHP API         swig php-cli php-dev
Ubuntu		Python API	swig python-dev
Ubuntu 	22.04	Python API	swig python3-dev
Ubuntu	12.04	Java API	default-jdk (openjdk 6)
Ubuntu	14.04	Java API	default-jdk (openjdk 7)
Ubuntu	16.04	Java API	default-jdk (openjdk 8)
Ubuntu	18.04	Java API	default-jdk (openjdk 10)
Ubuntu	20.04	Java API	default-jdk (openjdk 11)
Ubuntu	22.04	Java API	default-jdk (openjdk 11)

CentOS		Basic		gcc glib2-devel dbus dbus-devel autoconf openssl-devel make
CentOS	7.x	FUSE		fuse fuse-devel
CentOS	8.x	FUSE3		fuse3 fuse3-devel
CentOS		C++ API		gcc-c++
CentOS		Perl API	swig perl-devel
CentOS		PHP API		swig php-devel
CentOS  6.x	Python API	swig python-devel
CentOS  7.x	Python 2 API	swig python-devel
CentOS  7.x	Python 3 API	swig python3-devel
CentOS  8.x	Python 3 API	swig python3-devel
CentOS	6.x	Java API	java-1.6.0-openjdk or java-1.7.0-openjdk
CentOS	7.x	Java API	java-1.8.0-openjdk-devel or java-11-openjdk-devel
CentOS	8.x	Java API	java-11-openjdk

Rocky	9	Basic		gcc glib2-devel dbus dbus-devel autoconf openssl-devel make dbus-tools
Rocky	9	FUSE3		fuse3 fuse3-devel
Rocky 	9	C++ API		gcc-c++
Rocky 	9	Perl API	swig perl-devel
Rocky	9	PHP API		swig php-devel
Rocky	9	Python 3 API	swig python3-devel
Rocky	9	Java API	java-21-openjdk

Debian	12	Basic		make gcc libglib2.0-dev dbus libdbus-1-dev libssl-dev pkg-config automake
Debian 	12 	FUSE3		fuse3 libfuse3-dev  <-- use either FUSE or FUSE3
Debian	12	c++ API		g++
Debian	12	Perl API	swig libperl-dev
Debian  12	PHP API         swig php-cli php-dev
Debian 	12	Python API	swig python3-dev
Debian	12	Java API	default-jdk (openjdk 11)


* Support not available for PHP 7.0 due to SWIG version, see also 
  #5

Enjoy FLoM!
Ch.F.

About

FLoM: Easy to Use Distributed Lock Manager; a tool to synchronize the execution of commands, shell scripts and custom programs.

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published