annotate Sphinx/source/plugins/transfers.rst @ 530:63d59fab98e2

webdav on windows server 2012
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 19 Oct 2020 18:17:34 +0200
parents 2922fb1bd65e
children 1af054b77e9c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
164
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 .. _transfers:
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 Transfers accelerator plugin
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
5 ============================
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 .. contents::
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 Osimis provides a `transfers accelerator plugin
449
2922fb1bd65e fix links
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 361
diff changeset
10 <https://hg.orthanc-server.com/orthanc-transfers/file/default>`__ whose
164
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 purpose is to speed up the transfers of DICOM instances over networks
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 (with respect to the native DICOM protocol or to the built-in
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 :ref:`Orthanc peers <peers>` mechanism).
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 Description
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 -----------
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 This plugin can be used to **send** local images to remote Orthanc
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20 peers, or to locally **retrieve** images stored on remote Orthanc
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21 peers.
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23 The plugin also implements **storage commitment**, i.e. the peer that
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 initiates the transfer is informed whether *all* the DICOM instances
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 have been properly received by the other peer. The DICOM instances are
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 individually validated using their MD5 checksum. In other words, this
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 plugin provides atomicity in the transfers (i.e. a study/series is
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 considered as a whole, and partial transfers are prevented).
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 Note that the protocol is **entirely built over HTTP/HTTPS** (and not
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 directly over TCP), making it friendly with network firewalls and Web
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 caches. Also, the plugin takes advantage of the **jobs engine** of
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 Orthanc, so that transfers can be easily paused/canceled/resubmitted.
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
35 Technically, this plugin extends the REST API of Orthanc with
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
36 endpoints that optimize the use of the network bandwidth over the HTTP
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37 and HTTPS protocols, through the combination of the following
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38 mechanisms:
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
39
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
40 * Small DICOM instances are grouped together to form so-called
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
41 "buckets" of some megabytes in order to reduce the number of HTTP
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
42 handshakes.
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
43
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44 * Large DICOM instances are split as a set of smaller buckets in
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
45 order to bypass nasty effects of TCP congestion control on
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 low-quality network links.
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 * Buckets are downloaded/uploaded concurrently by several threads.
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
49
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
50 * Buckets can be individually compressed using the gzip algorithm,
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51 hereby reducing the network usage. On a typical medical image, this
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 can divide the volume of the transmission by a factor 2 to 3, at
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 the price of a larger CPU usage.
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 * Sending images to remote Orthanc peers can either be done with HTTP
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 ``PUT`` requests (so-called "push mode"), or with HTTP ``GET``
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
57 requests if the local Orthanc server has a public IP address
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 (so-called "pull mode").
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 Compilation
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 -----------
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 Static linking
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 ^^^^^^^^^^^^^^
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68 .. highlight:: text
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
69
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
70 The procedure to compile the plugin is similar to that for the
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
71 :ref:`core of Orthanc <compiling>`. The following commands should work
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
72 for most UNIX-like distribution (including GNU/Linux)::
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 $ mkdir BuildTransfers
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75 $ cd BuildTransfers
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 $ cmake .. -DSTATIC_BUILD=ON -DCMAKE_BUILD_TYPE=Release
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77 $ make
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
78
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 The compilation will produce the shared library ``OrthancTransfers``
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 that can be loaded as a plugin by Orthanc.
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
82
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83 Microsoft Windows
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
84 ^^^^^^^^^^^^^^^^^
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
85
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
86 Pre-compiled binaries for Microsoft Windows `are available
358
011b01ccf52d fixing external hyperlinks
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 221
diff changeset
87 <https://www.orthanc-server.com/browse.php?path=/plugin-transfers>`__.
164
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
88
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
90 Dynamic linking on Ubuntu 16.04
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
91 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
92
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93 .. highlight:: text
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
95 If static linking is not desired, here are build instructions for
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
96 Ubuntu 16.04 (provided build dependencies for the :ref:`core of
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97 Orthanc <compiling>` have already been installed)::
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 $ mkdir BuildTransfers
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
100 $ cd BuildTransfers
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 $ cmake .. -DCMAKE_BUILD_TYPE=Release \
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 -DALLOW_DOWNLOADS=ON \
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103 -DUSE_SYSTEM_GOOGLE_TEST=OFF \
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104 -DUSE_SYSTEM_ORTHANC_SDK=OFF
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105 $ make
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 Basic usage: Sending images
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109 ---------------------------
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111 .. highlight:: json
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113 You of course first have to :ref:`install Orthanc <binaries>`, with a
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 version above 1.4.2. Secondly, you have to load the plugin and to
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115 **declare the remote Orthanc peers** in the :ref:`configuration file
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 <configuration>`. Here is a minimal example (obviously, adapt the
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
117 parameters)::
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
118
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
119 {
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120 "Name" : "MyOrthanc",
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121 "Plugins" : [
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122 "/home/user/orthanc-transfers/BuildTransfers/libOrthancTransfers.so"
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 ],
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124 "OrthancPeers" : {
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125 "remote" : [ "http://1.2.3.4:8042/" ]
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126 }
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
127 }
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
129 Once Orthanc is running, when you open a patient, a study, or a series
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130 in :ref:`Orthanc Explorer <orthanc-explorer>`, you will see a new
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131 yellow button entitled ``Transfers accelerator``. By clicking on this
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
132 button, you will be able to send the local patient/study/series to one
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
133 of the remote Orthanc peers (provided they are also equipped with the
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
134 transfers accelerator plugin).
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
135
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
136
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
137 REST API
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138 --------
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140 .. highlight:: bash
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142 Here is a sample command line to **receive** a patient from the remote
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143 peer called ``remote``::
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
144
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
145 $ curl -v http://localhost:8042/transfers/pull -X POST -d '{"Resources":[{"Level":"Patient","ID":"16738bc3-e47ed42a-43ce044c-a3414a45-cb069bd0"}],"Compression":"gzip","Peer":"remote"}'
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
146
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
147 Note that several resources from different levels (patient, study,
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
148 series or instances) can be retrieved at once.
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
149
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
150 Conversely, here is a sample command line to **send** the same patient
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
151 to the remote peer ``remote``::
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
152
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153 $ curl -v http://localhost:8042/transfers/send -X POST -d '{"Resources":[{"Level":"Patient","ID":"16738bc3-e47ed42a-43ce044c-a3414a45-cb069bd0"}],"Compression":"gzip","Peer":"remote"}'
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
155 The command above is the one that is issued by Orthanc Explorer under
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
156 the hood (see section above).
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
157
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
158
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
159
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
160 Sending in pull vs. push mode
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
161 -----------------------------
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
162
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
163 In the case DICOM instances are being **sent** to a remote peer, the
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
164 plugin can work in two different modes:
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
165
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
166 * In **"pull" mode**, the plugin will transfer images by using as many
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
167 HTTP ``GET`` requests as possible.
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
168
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
169 * In **"push" mode**, it will use a sequence of HTTP ``PUT`` requests.
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
170
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
171 Push mode is easier to setup, but pull mode should be favored, as it
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
172 might lead to improved performance in the presence of Web caches. For
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
173 pull mode to work, the remote peer must be able to make calls to the
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
174 REST API of the local peer. This often means that the local peer has a
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
175 public IP address.
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
176
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
177 In order to enable pull mode to send image from Orthanc peer "A" to
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
178 another Orthanc peer "B", 2 actions must be taken:
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
179
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
180 1. "B" must have "A" defined as one of its peers, by adding "A" to its
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
181 ``OrthancPeers`` configuration section.
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
182
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
183 2. "A" must also have "B" defined as one of its peers, and the
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
184 ``RemoteSelf`` property must be provided for peer "B". This option
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
185 specifies the symbolic name under which "B" is known to "A".
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
186
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
187 .. highlight:: json
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
188
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
189 Here is a sample configuration for "A"::
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
190
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
191 {
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
192 "Name" : "A",
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
193 "Plugins" : [
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
194 "/home/user/orthanc-transfers/BuildTransfers/libOrthancTransfers.so"
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
195 ],
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
196 "OrthancPeers" : {
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
197 "B" : {
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
198 "Url" : "http://b.myinstitution.com:8042/",
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
199 "RemoteSelf" : "A"
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
200 }
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
201 }
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
202 }
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
203
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
204 And here is a sample configuration for "B"::
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
205
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
206 {
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
207 "Name" : "B",
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
208 "Plugins" : [
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
209 "/home/user/orthanc-transfers/BuildTransfers/libOrthancTransfers.so"
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
210 ],
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
211 "OrthancPeers" : {
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
212 "A" : {
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
213 "Url" : "http://a.myinstitution.com:8042/"
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
214 }
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
215 }
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
216 }
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
217
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
218
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
219
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
220 NB: **Receiving** images is always done in pull mode.
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
221
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
222
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
223
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
224 Advanced options
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
225 ----------------
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
226
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
227 Besides the ``OrthancPeers`` configuration option, several advanced
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
228 options are available to fine-tune the configuration of the
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
229 plugin. They are listed below::
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
230
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
231 {
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
232 ...
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
233 "HttpTimeout" : 120, // Can be increased on slow networks
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
234 "Transfers" : {
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
235 "Threads" : 6, // Number of worker threads for one transfer
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
236 "BucketSize" : 4096, // Optimal size for a bucket (in KB)
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
237 "CacheSize" : 128, // Size of the memory cache to process DICOM files (in MB)
221
26441131d725 option MaxHttpRetries in transfers accelerator
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 164
diff changeset
238 "MaxPushTransactions" : 4, // Maximum number of simultaneous receptions in push mode
26441131d725 option MaxHttpRetries in transfers accelerator
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 164
diff changeset
239 "MaxHttpRetries" : 0 // Maximum number of HTTP retries for one bucket
164
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
240 }
05aa4f426621 transfers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
241 }