Git Product home page Git Product logo

format-filter-server's Introduction

Format Filtering Server

Purpose and approach

The Format Filtering Server (FFS) provides file format conversion services via HTTP interface. A document is received via HTTP-POST and the converted document is sent back as HTTP reply.

The messaging server ActiveMQ is used as a platform to achieve horizontal scalability. Many conversion nodes can be connected to the system and "consume" conversion-jobs from the respective queues. Scalability can be achieved on the HTTP side by connecting multiple HTTP-components to the messaging server.

The current status of implementation employs LibreOffice for converting input to the ODT format. Valid input formats are:

  • plain/text,
  • MS-OOXML-Documents (.docx),
  • MS-Binary-Word-Documents (.doc)

License

The code in this repository is AGPL-3.0 licensed

Implementation details

The flow of format filtering components is as follows:

http_post -> conversion -> http_reply -> cleanup

http_post

* receives incoming http requests
* creates dedicated workspace (tmpdir)
* writes input document to filesystem

Conversion
  • calls LibreOffice headlessly and executes actual conversion
  • input/output files are read/written from workspace directory
  • implements timeout handling

http_reply

* sends output document as HTTP reply
* runs in same worker/process as http_post (different queues)

Cleanup
~~~~~~~
* cleans workspace
* (disabled in current code, for development)

Configuration
  • specifiy path to LibreOffice binary in config.js CONFIG.libreoffice_binary

Startup

* $cd format-filter-server
* $./start-broker.sh
* $cd code
* $node run.js httpd
* $node run.js conversion

Testing
-------

Command line snippets

curl --data-binary @/tmp/your_example.docx http://127.0.0.1:16080/ > /tmp/your_example.odt curl --data "Hello World!" http://127.0.0.1:16080/ > /tmp/your_example.odt

format-filter-server's People

Contributors

karlitschek avatar vicdeo avatar wakeup avatar

Watchers

0r0 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.