-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.txt
More file actions
61 lines (44 loc) · 1.8 KB
/
README.txt
File metadata and controls
61 lines (44 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
== 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)
=== 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