Accessing the Factom blockchain from different programming languages

Sergey Bushnyak
Kompendium
Published in
3 min readMay 4, 2020

Kompendium LLC is a small, but effective group of Factom enthusiasts with diverse knowledge in programming languages. One of our persistent goals since beginning our work with the Factom protocol has been to attract a wider and more diverse body of developers to the Factom ecosystem and to make their introduction and community onboarding as smooth as possible. In an ever-expanding and dynamic blockchain world, moving software from system to system is difficult. To facilitate these transitions for developers interested in exploring Factom, we have created a collection of client libraries for several programming languages, significantly extending the Factom ecosystem’s developer toolbox. Often the mere absence of readily-available libraries for service in a developer’s language of choice might dissuade developer adoption — our efforts to expand and improve developer tooling supporting the Factom ecosystem is a direct effort to prevent that situation from happening and encourage greater adoption.

Most blockchains lack smart-contract functionality for different reasons, and while the Factom community works towards smart-contract incorporation and standards, developers will continue to require immediate access to blockchain functionality and often do so via low-level access.

There are 5–10 mainstream languages that have a lot of libraries out of the box, several Factom clients are already available for Java, C#, and Python. There are also less popular but very productive programming languages for which developers typically need to write their own code to connect to 3rd party ecosystems. Fortunately for all, the Factom protocol has a very profound API system that covers many typical cases that might be leveraged by developers for a wide variety of functions and solutions. The API ecosystem consist of 3 major parts:

  • `factomd` API subset
  • `walletd` API subset
  • `debug` API subset

These are API subsets exposed by executables that are reference implementation of the Factom protocol.

To accommodate both worlds of software engineers and extend Factom’s attractiveness to a wider audience of programming language-communities we developed a large set of libraries for the following programming languages:

These clients are for native JSON RPC API. Remote Procedure Call (RPC) is a very powerful data transfer technology, but often difficult to develop for. Some of the utility of RPC is its high level of universality and flexibility it provides to developers. PHP and Ruby are dynamic languages offering a wide capabilities; our PHP and Ruby libraries provide broad tests coverage to ensure correctness during software execution.

Rust and Haskell are type-safe languages that allow creating very robust and bug-free software even with minimal testing, which often accelerates the speed of developing at early stages. Static type-systems allow compilers to understand inconsistencies in the code before the program builds which removes several classes of errors typically requiring extensive manual testing or broad test utilities. Our libraries in Haskell and Rust also were built with extensive test coverage and are ready with out-the-box to support a variety of developer needs with power functionality and ensured correctness during execution .

Our libraries map JSON data into specific language data types with validation before conversions that allows the Factom protocol to work directly with correct objects/types in your business application.

In the next installments, I’ll show how to build a small application with each of Kompendium’s Factom community libraries and use features from the Factom protocol.

--

--