I have searched everywhere on this site and the internet without getting a clear understanding.
I have successfully installed phantomjs and highcharts on a CentOS 6.7 per instructions Setting Up Export Server
Here are the required .js files in "/software/phantomjs/highcharts/highcharts-export-server-master/phantomjs":
- highcharts-convert.js highcharts-more.js highstock.js highmaps.js d3-funnel.js gauge.min.js exporting.js jquery.1.9.1.min.js
I'm very new to phantomjs and especially highcharts - what I am looking to do is provide a way for batch programs running on one server (Server B) to send POST requests to the export server on Server A and get back .png or .pdf files.
The war is deployed on Tomcat and 10 separate servers are running starting with port 7777 and the PhantomJS server is running as well at 127.0.0.1:3003 per the following command and app-convert.js configuration file:
phantomjs highcharts-convert.js -host 127.0.0.1 -port 3003
phantomjs propertiesthe host and port phantomjs listens to
host = 127.0.0.1 port = 7777
location of the phantomjs executable, could be for example > /usr/local/bin/phantomjs
exec = /software/phantomjs/phantomjs
specify here an alternative location (the whole path!) for the script that > starts an Phantomjs server. F.eks /home/bert/scripts/my-highcharts-convert.js Leave empty if you're using the script bundled with the export-server.
connect properties used to connect with phantomjs running as HTTP-server >script =
all values in milliseconds
specifies the timeout when reading from phantomjs when a connection is > established
readTimeout = 6000
timeout to be used when opening a communications link to the phantomjs > server
connectTimeout = 1000
the whole request to the phantomjs server is scheduled, max timeout can last > to this value. This is because in java you can't rely on the above two > timeouts.
Pool propertiesmaxTimeout = 6500
number of phantomjs servers you can run in the pool.
poolSize = 10
The pool is implemented as a BlockingQueue. When asking for a phantom server > connection and nothing is available, it waits for the number of milliseconds > defined by maxWait
maxWait = 6000
Keep files in the temp folder for a certain retentionTime, defined in > miliseconds
retentionTime = 300000
I can hit http://my-server/highcharts-export-web/ demo page and it works fine from a browser.
THE QUESTIONS I HAVE:
- What URL do I want to use for my remote batch program?
- Is //my-server/highcharts-export-web/ supposed to work for my remote calls?
- Is the webapp designed to receive direct requests from non-browser clients?
- What process calls the 10 servers in the server pool?
Can someone provide an example of how you would setup remote calls to the export server (they will run multiple times per day) and return .png's or .pdf's from batch program?
Thanks Brian