WoodWing Help Center

Improving the performance for remote Smart Connection 9 users by using Enterprise ProxyForSC

 

Improving the performance of Smart Connection for InDesign for remote users

Info: This feature requires the following versions of Enterprise Server:

  • When using PHP 5.4 or 5.5: Enterprise Server version 9.6.0 or higher
  • When using PHP 5.6 or higher: Enterprise Server version 9.8.1 or higher

When users of Smart Connection for InDesign log in to Enterprise Server from a remote location, it is important that the transfer times for processing tasks such as check-out, check-in, article preview generation and so on, is kept as low as possible.

For this purpose, Enterprise ProxyForSC can be used: a toolbox for setting up a tunnel between a remote office and an Enterprise Server.

Depending on the configuration the payload can be send over by using 3rd-party software such as Aspera or BBCP and/or the SOAP communication can be compressed. Depending on the distance between the server and the remote office, the file size to transfer, network connection and protocol, the check-in/check-out process is up to 2–5 times faster.

How it works

On the Smart Connection side, communication with Enterprise Server is done through a Proxy Server, typically within the same LAN.

A typical workflow is as follows:

  1. A remote InDesign user requests to open a layout file.
  2. Smart Connection for InDesign sends a SOAP request to the Proxy Server.
  3. The Proxy Server compresses (deflates) the SOAP request and saves it in the Proxy Cache folder.
  4. The Proxy Server copies over the file to the Proxy Transfer folder of the Proxy Stub with the help of Aspera or BBCP.
  5. The Proxy Server sends over the original request headers to the Proxy Stub (a small data package over HTTP) along with a file descriptor.
  6. The Proxy Stub decompresses (inflates) the local file (as found in the Proxy Transfer folder) and recomposes the original SOAP request, combines it with the original request headers and sends it to Enterprise Server.
  7. Enterprise Server processes the SOAP request and returns a DIME message that contains the response and the layout file.
  8. The Proxy Stub compresses the DIME response and saves it in a local file.
  9. The Proxy Stub returns the original HTTP header of the DIME request and provides a descriptor of the local file (this is the response on step #5).
  10. The Proxy Server copies over the local file to the Proxy Cache folder with the help of Aspera or BBCP.
  11. The Proxy Server decompresses the local file and recomposes the DIME response, combines it with the original request headers and returns it to Enterprise Server (this is the response on step #2).

A diagram of ProxyForSC

Figure: A schematic overview of the setup for running ProxyForSC.

Download

The ProxyForSC tool can be downloaded from the Enterprise Server Software page.

Installation and configuration

The Enterprise ProxyForSC tool should be installed on the remote location on a server machine and at the head office location on another server machine (or on an Enterprise Server machine). They automatically take their role, but need slightly different configuration steps.

Please take note of the following:

  • The Proxy Server and Proxy Stub may work on Windows but Mac OS X or Linux are tested and recommended.
  • The installation and configuration instructions in this article are written for Mac OS X only.
  • In the examples, the following system setup is used:
  • System A: a remote Client
  • System B: a remote Proxy
  • System C: a local head office

The following examples show how to set up the ProxyForSC tool in Aspera and BBCP.

Making the communication secure

In case the communication between the Proxy Server and the Proxy Stub needs to be secure, use the following guidelines:

  • Make sure that the Proxy Stub supports SSL. Setting this up is the same as setting up a secure application server environment.
  • Make sure that the root certificate needed by the Proxy Server to validate the Proxy Stub is stored in the following folder on the Proxy Server side:

ProxyForSC/speedtest/encryptkeys

Note: A secure connection between the Proxy Stub and the Enterprise Server is not supported. In a normal setup the Proxy Stub and Enterprise Server run on the same machine and the communication will be done over http.

ProxyForSC and performance

It is important to know that the ProxyForSC solution is a tool which relies heavily on 3rd-party software applications such as Aspera or BBCP and that it in itself does not solve network instability problems or extreme packet loss.

However, ProxyForSC does reduce the effect of high-latency: the longer the distance between the remote location and the local Enterprise Server, the more this solution could make the difference.

Note: Do not use this tool on a LAN: it will negatively effect the performance of the client-server communication.

Making your installation a success

  • Consult a professional network specialist.
  • Experiment with the options provided by the 3rd-party software (Aspera and BBCP) to get the best performance for your connection.
  • Use the built-in Speed Test (see below) to compare the direct connection to Enterprise Server versus a connection over ProxyForSC.
  • Use the built-in Profiler (see below) to identify time consuming areas such as disk access, network traffic, and compression.
  • Examine the effect of having compression enabled or disabled.
  • Test extensively using InDesign clients on the remote location before taking the proxy into production.

Running a speed test

The ProxyForSC package contains a Speed Test which simulates Smart Connection for InDesign performing the following operations:

# Operation Service called
1 Log-in the "woodwing" user. LogOn
2 Create a layout, article and image. CreateObjects
3 Open the layout, article and image. GetObjects
4 Save the layout, article and image. SaveObjects
5 Close the layout, article and image. UnlockObjects
6 Delete the layout, article and image. DeleteObjects
7 Log-out the "woodwing" user. LogOff

For all operations the duration is measured and the average is calculated.

Configuring the speed test environment

IMPORTANT: Do not use the Speed Test on a production server.

Note: The most realistic results can be achived by using a client machine that has a HTTP server and PHP 5.4 or PHP 5.5 installed.

Step 1. Open the ProxyForSC/speedtest/config.php file and check all the options.

Step 2. Open the following config files:

  • ProxyForSC/speedtest/config.php
  • ProxyForSC/proxyserver/config.php
  • ProxyForSC/proxystub/config.php
  • Enterprise/speedtest/configserver.php

Step 3. For all files, set the following options to production mode:

  • Specify a folder for the OUTPUTDIRECTORY option.
  • Set the DEBUGLEVELS option to WARN.
  • Set the PROFILELEVEL option to 0 (not available for ProxyForSC/speedtest/config.php)

Running the test

IMPORTANT: Do not use the Speed Test on a production server.

Step 1. Enter the following URL in a Web browser:

http://127.0.0.1/ProxyForSC/speedtest/index.php

The Speed Test page appears.

The Speed Test page for ProxyForSC

  • To get a better average, choose a higher number in the "Number of runs" list.
  • To by-pass the Proxy Server, choose Enterprise Server in the "Connect to" list.
  • To work with smaller or larger files:
  1. Create a folder under ProxyForSC/speedtest/testdata.
  2. Create 3 files in that folder, named as follows:
  • article.wcml
  • layout.indd
  • image.jpg
  1. Refresh the Speed Test page and choose the folder in the "Test data" list.

Step 2. Click Start Test.

Wait until a report appears.

A test report for ProxyForSC

Figure: An example of a ProxyForSC report.

The client waiting times are shown in the "Average" column. Note that the actual waiting times in InDesign will be slightly higher since Smart Connection for InDesign also does some data processing which is not simulated (not taken into account).

Profiling time consuming areas

A profiler can be used to identify time consuming areas such as disk access, network traffic, and compression. The Profiler that is built into Enterprise Server is also built into the Proxy Server and Proxy Stub.

Configuration

Step 1. Open the following config files:

  • ProxyForSC/proxyserver/config.php
  • ProxyForSC/proxystub/config.php
  • Enterprise/config/configserver.php

Step 2. For all files, set the following options into profiler mode:

  • Specify a folder for the OUTPUTDIRECTORY option.
  • Set the DEBUGLEVELS option to INFO.
  • Set the PROFILELEVEL option to 5.

Running a profile

Step 1. Clear the log folders for the Proxy Server, Proxy Stub and Enterprise Server.

Step 2. Run the Speed Test (see above) or perform some operations with a remotely installed Smart Connection for InDesign.

In the log folders mentioned, the following file appears:

  • Proxy Server: proxyserver_profile.htm
  • Proxy Stub: proxystub_profile.htm
  • Enterprise Server: sce_profile.htm

Step 3. Open each file.

Figure: An example of a Profile test.

Every dark-gray line represents a service call, while the last 2 columns show the duration and percentage.

As you may notice, the sum of the percentages is much more than 100%. This is because some measurement are done over nested functions. The following tree structure shows how to read this information:

/proxyforsc/proxystub/index.php => 100%

Proxy Stub entry point => 99.5%

Retrieve InDesign request header info => 0.5%

Uncompressing InDesign request at disk => 0.5%

Call Enterprise Server (req:549 bytes, resp: 47022 bytes) => 93.9%

Compressing Enterprise Server response at disk => 1.0%

Return InDesign response header info => 0.2%

When the lines marked in bold show little differences in duration, the overhead of the proxy itself is low. When the other lines show higher durations, the overhead of the proxy is higher.

Making the proxy secure

Please consider the following steps to make the proxy more secure:

  • Use a HTTPS connection between the Proxy Server and the Proxy Stub.

Notes:

  • For general information about SSL see Using SSL in Enterprise Server.
  • When using a certificate signed by the WoodWing provided CA certificate please store the cacert.pem file in /ProxyForSC/speedtest/encryptkeys on the Proxy Server side.
  • When using SSH users, make sure that those users only have access to the transfer folders, and nowhere else.
  • Close HTTP access for all folders except:
  • ProxyForSC/proxyserver
  • ProxyForSC/proxystub
  • Apps are not used during production. Close HTTP access for:
  • ProxyForSC/proxyserver/apps
  • ProxyForSC/proxystub/apps

Troubleshooting

I can log in to the Proxy Server but I get an error when creating or saving a layout

Check the logging on the Proxy Server and Proxy Stub for any errors. If these folders turn up empty or do not show any errors, check the apache_error_log or the php_error_log on both machines for any problems.

When trying to log in from the client I get a 404 error

Make sure that the server is reachable by pasting the server URL in a Web browser. If it is, a (very broken) login page to Enterprise Server should be shown (you cannot use this to login though). Make sure that Apache uses the default port to connect to the server.

How do I solve a fatal server error (HTTP 500) logged by the proxy?

  • Check if Enterprise Server works well when Smart Connection (or the Speed Test) connects directly (not using proxy).
  • When you have configured IPv4 addresses in the config.php files of the proxy:
  • Check if there is no IPv6 DNS configured in System Preferences > Network > Advanced > DNS.
  • Consider using network names instead of IP addresses.
  • Check if the Proxy Server and Proxy Stub have the same value (true or false) set for the ENTERPRISEPROXY_COMPRESSION option.
  • When using BBCP, start a Terminal on the Proxy Server and check the following:

ssh proxyuser@proxyserver

ls -als /ProxyServer

Notes:

This folder (.) should give full access (drwxrwxrwx) for everyone. If not, enter:

sudo chmod 777 /ProxyServer

This folder (.) should be owned by _www:wheel. If not, enter:

sudo chown www:wheel /ProxyServer

This folder (.) should not contain any file. If it does, enter:

rm -rf /ProxyServer/*

ssh stubuser@proxystub

ls -als /ProxyStub

Notes: 

This folder (.) should give full access (drwxrwxrwx) for everyone. If not, enter:

sudo chmod 777 /ProxyStub

This folder (.) should be owned by _www:wheel. If not, enter:

sudo chown www:wheel /ProxyStub

This folder (.) should not contain any file. If it does, enter:

rm -rf /ProxyStub/*

exit

You return to the Proxy Server.

echo hello > /ProxyServer/test

/usr/local/bin/bbcp -s 8 /ProxyServer/test stubuser@proxystub:/ProxyStub/test

ssh stubuser@proxystub cat /ProxyStub/test

This should echo "hello"

SSH commands fail for an unknown reason

Try using the -v flag to make ssh verbose, for example:

ssh -v stubuser@proxystub

Have a close look at the output and Google for any reported problem.

Reporting a problem to Support

In case you run into a problem that you want to submit to Support, please do the following:

Step 1. Clear the log folders for Enterprise Server, the Proxy Server and the Proxy Stub.

Step 2. Open the following config files:

  • ProxyForSC/proxyserver/config.php
  • ProxyForSC/proxystub/config.php
  • Enterprise/config/configserver.php

Step 3. For all files, set the following options into debug mode:

  • Specify a folder for the OUTPUTDIRECTORY option.
  • Set the DEBUGLEVELS option to DEBUG.

Step 4. Reproduce the problematic scenario.

Step 5. Archive (ZIP) the log folders of:

  • Enterprise Server
  • Proxy Server
  • Proxy Stub

Step 6. Restore the adjusted configuration options by setting them back to their original values.

Step 7. Send the archives to WoodWing Support along with a detailed description of the scenario.

Was this article helpful?
0 out of 0 found this helpful / Created: / Updated:
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.