Skip to content

Commit

Permalink
updates for 0.4.2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
O'Sullivan authored and O'Sullivan committed Feb 20, 2017
1 parent d40e057 commit d570ae8
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 57 deletions.
32 changes: 12 additions & 20 deletions config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,22 @@ sseng.exe uses it to determine the location of various resources including dynam
the xll.txt file that specifies the XLLs to be loaded. Most of the settings are purely internal; two may be
of interest to users.


* ``LICENSE_FILE``: path to the license key file, which can contain an offline key to stop the SpreadServeEngine
phoning home to spreadserve.com.
* ``DNS_HOST_NAME``: path to a flat text file containing a hostname. If the file exists, SpreadServeEngine will
use this hostname when phoning home to spreadserve.com.
* ``OWNER``: the email address associated with this SpreadServe host by spreadserve.com.
* ``FORMAT_LOADING``: switches cell formatting on or off when loading xlsx files. No impact on xls handing.
* ``XLL_CFG_FILE``: path to the file that specifies the XLLs to be loaded.
* ``XLL_REG_FILE``: path to the file sseng.exe uses to dump signatures of XLL worksheet functions
that have been successfully registered.

**RealTimeWebServer configuration**

The RealTimeWebServer implementation is all in one Python module: ``%SSROOT%\py\http\rtwebsvr.py``, which has
several global variables you can change to configure its behaviour. Look for the section near the top
with the Config comment. If you want to change the port that RealTimeWebServer listens on then change
this line::

define( "port", default=8888, help="run on the given port", type=int)

Below the port config line are several variables...
The RealTimeWebServer implementation is mostly in one Python module: ``%SSROOT%\py\http\rtwebsvr.py``, which has
gets configuration variables from ``%SSROOT%\cfg\webcfg.py``. If you want to switch SpreadServe to work with
Active Directory authentication, rather than it's default social login, then edit webcfg.py

* ``ADGroupMappings``: a dictionary defining the Active Directory groups that for which user
membership will give view, edit or admin permissions.
Expand All @@ -38,16 +40,6 @@ Below the port config line are several variables...
admin permission can start and stop SpreadServe processes via the dashboard, and upload
new spreadsheets to the repository via the repository page.

* ``ssroot``: defaults to the value of the ``SSROOT`` environment variable. It is unlikely
you'll need to change this.
* ``DefaultRepoDir``: path for the repository RealTimeWebServer serves as ``/repository.html``. Uploaded
spreadsheets are saved here. When you click the ``Load`` button on the Dashboard page you're offered
a list of the repository contents to load.
* ``AideName``: process name used for rtwebsvr.py in the dashboard.
* ``DefaultProcessName``: process name used for rtwebsvr.py when no command line parameters are supplied in a
command line launch.
* ``DefaultCmdLine``: command line parameters used when they're not supplied at the command line.


**SpreadServe Command line parameters**

Expand All @@ -57,6 +49,8 @@ part of their behaviour. You'll see the parameters used in the shell scripts in
launch files in ``%SSROOT%\cfg``. Command line options are always presented with a leading hyphen and a following
value eg ``-ENV SIT -NAME DBLogServer``.

* ``HTTP_PORT``: supply this on the rtwebsvr.py command line to change the RealTimeWebServer port. For example
``-HTTP_PORT 80`` to run on port 80.
* ``ENV``: Mandatory. Environment that this SpreadServe process belongs to. Several environments can co-exist on the
same host as components will only recognise and communicate with components in the same named environment.
* ``NAME``: Optional. C++ processes will default to the exe name on the dashboard page, and Python processes will
Expand Down Expand Up @@ -106,5 +100,3 @@ made profiles are supplied in the ``%SSROOT%\cfg`` directory. They are...
* ``baseweb``: launches the same three processes as ``base``, but with the addition of the RealTimeWebServer.
* ``demo``: same as ``baseweb``, but adds BlackScholesMockMarketData to pump fake market data into the BlackScholes.xls
example sheet.
* ``blockweb``: same as ``baseweb``, with the addition of the BlockServer, which will listen for calc requests from
the Blockspring SpreadServe Block.
58 changes: 26 additions & 32 deletions guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ When you've logged in you should see a page like this in your browser...
.. image:: img/ss_dash.jpg
:alt: SpreadServe dashboard

This is the dashboard page. It's used for starting and stopping SpreadServe processes, examining their log files and
loading spreadsheets into running instances of the SpreadServeEngine. You can navigate back to this page at any time
by clicking the dashboard link on the left. The main table in the page gives the process ID of each process, its name,
its status, and a set of buttons for operations. You can use the process ID to lookup the process in Windows Task Manager
if you're logged on to the server hosting SpreadServe.
This is the SpreadServe dashboard. It's used for starting and stopping SpreadServe processes, examining their log files and
loading spreadsheets into running instances of the SpreadServeEngine. The top table in the page gives the process ID of each
process, its name, its status, and a set of buttons for operations. You can use the process ID to lookup the process in
Windows Task Manager if you're logged on to the server hosting SpreadServe.

* Log: clicking this button for any process will show you the current log file for the process. The file will be in the
%TEMP% directory. The file is displayed 'raw' in the browser, so you'll need to use the back button to return to the dashboard page.
%TEMP% directory. The file is displayed 'raw' in the browser, so you'll need to use the back button to return to the
dashboard page.
* Kill: in normal operations you should only use this to kill of instances of SpreadServeEngine.
* Run: clicking the Run button next to SpreadServeEngine will create another engine instance.
You need one instance of the SpreadServeEngine for each spreadsheet you're running.
Expand All @@ -55,49 +55,43 @@ if you're logged on to the server hosting SpreadServe.
* Calc: instruct a SpreadServeEngine to recalculate a sheet. Equivalent to doing shift-ctrl-alt-F9 in Excel.
* RTD: invoke ServerTerminate on any RTD servers that are loaded.

At the top right of the table of processes the middle, down arrow, button will reveal a complete list of
At the top right of the table of processes the 'show dead' check box hides or reveals a complete list of
processes that includes dead or not yet started processes.

**User Interface: Live Sheets**
If you use the SpreadServeEngine Load button to load the Black Scholes.xls spreadsheet, then click on Live Sheets,
you shoud see something like this...
If you use the SpreadServeEngine Load button to load the InterestRateDerivatives.xls spreadsheet, then scroll down
to the Running Sheets table, you should see something like this...

.. image:: img/ss_live1.jpg
:alt: One live sheet

And if you return to the dashboard page and launch a new SpreadServeEngine instance with the Run button,
and then use the Load button for that new instance to load up InterestRateDerivatives.xls, then this is what you should see...

.. image:: img/ss_live2.jpg

:alt: Two live sheets

Naturally, all the live sheets within a live spreadsheet are clickable links that will take you through to a view of that sheet.
Try clicking on Black-Scholes Model and you should see this...
Try clicking on Swaps under InterestRateDerivatives.xls and you should see this...

.. image:: img/ss_live3.jpg

This is just what you'd see in Microsoft Excel if you loaded the same SpreadSheet. Try it and see for yourself.
You can find the spreadsheet in the SpreadServe directory tree at ``py/http/repo/BlackScholes.xls``. Now in Excel all
the cells are editable, both those with formulae, and those holding raw data. You can change the cells in and see
the spreadsheet recalc. In the SpreadServe GUI you can change the raw data cells, but you can't edit the formula cells.
You can find the spreadsheet in the SpreadServe directory tree at ``py/http/repo/InterestRateDerivatives.xls``.
Now in Excel all the cells are editable, both those with formulae, and those holding raw data. You can change the cells
and see the spreadsheet recalc. In the SpreadServe GUI you can change the raw data cells, but you can't edit the formula cells.
In the SpreadServe GUI try clicking on any of the cells that have the dot dot dot underlining. You'll see a pop up that
will allow you to change the data. If you do, the spreadsheet will recalc and you'll see the changed values in your
browser, just as you would in Excel. But with SpreadServe, there could be any number of browsers looking at that live
sheet, and they'd all see the same data, and the same recalculation.

**User Interface: Repository**
Clicking the Repository link to the left will show you a list of the spreadsheets available for loading with the Load button on the dashboard page...
On the dashboard page, scroll right down to the last table. You'll see a list of the spreadsheets available for loading
with the Load button on the dashboard page...

.. image:: img/ss_repo.jpg
:alt: SpreadServe repository

The repository page also allows you to upload spreadsheets from your local file system. Hit the browse button to select a spreadsheet.
The repository table also allows you to upload spreadsheets from your local file system. Hit the browse button to select a spreadsheet.
When you've OKed the file selection dialog, hit the Upload button to persist the spreadsheet in the repository directory on the server.
Next time you hit the load button you're spreadsheet listed.
Next time you hit the load button your spreadsheet will be listed.

**Constraints**

* Currently SpreadServe can only handle Excel 97-2003 .xls formatted spreadsheets. Excel 2007 and up .xlsx formatted sheets are on our road map.
But for the time being, please use Excel to do a 'Save As' .xls to prepare your spreadsheets for uploading to SpreadServe.
* Limited VBA support. SpreadServe does not support XLAMs. Only embedded VBA can be used. Range can't be used as parameter type. Parameters
should be built in types only: ints, floats, strings.
* Processes run with elevated permissions access the registry differently, which can prevent `Excel-DNA <https://github.com/Excel-DNA>`_
Expand Down Expand Up @@ -137,7 +131,7 @@ are supplied with SpreadServe: BlackScholesMockMarketData and dblog.
One of the sample connector programs supplied with SpreadServe injects mock market data into the Black Scholes spreadsheet.
You can run BlackScholesMockMarketData like this::

cd c:\SpreadServe\ss0.2.0\py\smpl
cd c:\SpreadServe\ss0.4.2\py\smpl
..\..\sh\sspy black_scholes_mock_mkt_data.py -ENV SIT
Note that you may need to change the path and environment name to match your install. Once BlackScholesMockMarketData is running,
Expand All @@ -151,12 +145,12 @@ spreadsheet, and take its data from a real time market data system.
dblog consists of two processes; one coded in Java, for JDBC DB connectivity, and one in Python, built on SpreadServe's SocketServer
implementation. Here's how you launch the Python SocketServer part of dblog::

cd c:\SpreadServe\ss0.2.0\py\sock
cd c:\SpreadServe\ss0.4.2\py\sock
..\..\sh\sspy dblog.py -ENV SIT
And this is how you launch the Java process::

cd c:\SpreadServe\ss0.2.0\sh
cd c:\SpreadServe\ss0.4.2\sh
dbconn
There are several configuration dependencies here, and this will only work out of the box if you have a MySQL install on your SpreadServe host.
Expand Down Expand Up @@ -185,11 +179,11 @@ not using MySQL, you'll need to add the relevant JDBC driver to the lib director

To add an XLL to your SpreadServe deployment you need to edit ``cfg\xll.txt``. In the standard install it looks like this::

file:///c:/SpreadServe/ss0.2.0/bin/xlcall32.dll;cdecl;refreshdata
file:///c:/SpreadServe/ss0.2.0/bin/quantlibxl-vc110-mt-s-1_4_0.xll;cdecl;refreshdata
file:///c:/SpreadServe/ss0.2.0/bin/SSAddin.xll;stdcall;refreshdata
file:///c:/SpreadServe/ss0.4.2/bin/xlcall32.dll;cdecl;refreshdata
file:///c:/SpreadServe/ss0.4.2/bin/quantlibxl-vc110-mt-s-1_4_0.xll;cdecl;refreshdata
file:///c:/SpreadServe/ss0.4.2/bin/SSAddin.xll;stdcall;refreshdata

To add your XLL, copy it to the ``ss0.2.0\bin`` directory, then add another line to xll.txt modelled on the the lines that reference xlcall32.dll
To add your XLL, copy it to the ``ss0.4.2\bin`` directory, then add another line to xll.txt modelled on the the lines that reference xlcall32.dll
and the QuantLib XLL. Note that each line has three parts separated by semicolons. Firstly the path to the XLL, then the calling convention, and
finally an RTD switch. The calling convention should be ``cdecl`` or ``stdcall``; XLLs implemented in C++ will probably be ``cdecl``, and those in
C# ``stdcall``. However this is not a hard and fast rule, and if you're not sure which calling convention your XLL uses then examine it with
Expand Down
Binary file modified img/ss_dash.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/ss_live1.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/ss_live3.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/ss_live4.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/ss_repo.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 6 additions & 5 deletions spec.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@ SpreadServe Tech Spec

SpreadServe is a Windows Server hosted server product with a web UI.

* OSes: any Windows desktop OS from Windows 7, and any server OS from 2003. SpreadServe has been tested on Windows 7, Windows 8 and Windows Server 2008.
* User interface: web UI built with `Bootstrap <http://getbootstrap.com/>`_ 2.0.4 and `jQuery <http://jquery.com/>`_ 1.7.1 enabling job control and
spreadsheet interaction from a browser.
* OSes: any Windows desktop OS from Windows 7, and any server OS from 2003. SpreadServe has been tested on Windows 7, Windows 8,
Windows Server 2008 & 2012.
* User interface: web UI built with `Angular <http://angularjs.org>`_ 1.5, <http://`Bootstrap <http://getbootstrap.com/>`_ 3.3 and `jQuery <http://jquery.com/>`_ 2.2
enabling job control and spreadsheet interaction from a browser.
* APIs: Python. C++ and Java APIs exist in prototype form. The Python API supports integrations and unit testing of spreadsheets.
* Core implementation: SpreadServe's native implementation language is C++ built as 32 bit binaries with Microsoft Visual C++ 9.
* VBA: SpreadServe supports VBA macros.
* XLL: SpreadServe supports XLL addins, and has been tested with the `QuantLib <http://quantlib.org/index.shtml>`_ 1.4.0 addin.
* RTD: SpreadServe supports RTD updates.
* Excel file formats: Excel 97-2003 .xls is currently supported. The later Excel .xlsx format is in development.
* Excel file formats: Excel 97-2003 .xls as well as the default Excel .xlsx format are supported.
* RDBMS: the dblog component enables logging of all SpreadSheet operations to an RDB.
SpreadServe has been tested with `MySQL <http://www.mysql.com/>`_ 5.6, and should work with any RDB that has a JDBC driver.
* Sockets: The SocketServer enables connections from processes based on other hosts and implementation technologies.
* Open Source Software: SpreadServe uses several powerful OSS technologies as building blocks.
They include `Tornado <http://www.tornadoweb.org/en/stable/>`_, `Python <https://www.python.org/>`_,
`STLport <http://www.stlport.org/>`_ , `Boost <http://www.boost.org/>`_ and `Apache Open Office <https://www.openoffice.org/>`_.
* Cloud ready: SpreadServe has been deployed and tested on an `Amazon EC2 <http://aws.amazon.com/ec2>`_ Windows 2008 AMI.
* Cloud ready: SpreadServe has been deployed and tested on `Amazon EC2 <http://aws.amazon.com/ec2>`_ Windows 2008 & 2012 AMIs.

0 comments on commit d570ae8

Please sign in to comment.