Archive for the 'Excel' Category

Next Page »

Enterprise applications using and integrating with Gigaspaces XAP

June 17th, 2009

When I am dealing with customers and Partners it never ceases to amaze me how innovative many of  the solutions and products, that have GigaSpaces embedded, are. I thought it would be well worth a quick review of some of these:

ActivePivot: ActivePivot™ by Quartet is a real time object oriented OLAP engine that provides information dashboards from front office to back office including trade blotters, value-at-risk drill down analysis, inventory positions, cash flow and security inventories, credit risk, online risk and hedging analytics in real time. You can view a case study of a combined ActivePivot / GigaSpaces at a major French bank here.

An example of using active Pivot with GigaSpaces could be that market data feeds are written into a space using any of GigaSpaces’ APIs . ActivePivot is able to connect to the core in-memory data and register for  events. When a tick is updated in-memory, GigaSpaces sends a notification to ActivePivot which in turn re-aggregates the relevant cube branch. This means that the aggregated cube is always updated and reflects the latest market state. In addition ActivePivot queries GigaSpaces for the raw data when Excel sends a drill-down request, which enables ActivePivot to deliver a very quick response time.

GigaSystemsBuilder: This uses the model driven development (MDD) capabilities of JeeWiz to generate Grid and Cloud-based systems under Gigasystems technologies.  Comprehensive PoC’s take less than a week and using JeeWiz to generate 90% plus of the final system is an efficient and low cost to utilise these emerging technologies. You can see a screencast of this in action here.

Excel Federated Grid:  This builds on our core Excel integration to enable organisations who use Excel in a trading scenario to scale their use of Excel to prevent bottenecks, to parallelize processing, or to automate algorithmic trading that uses Excel. You can read more about this in a prior blog post. To learn more about the GigSpaces/Microsoft Excel Integration and its applicability to finance have a read of this Microsoft written article.

Contact Centre: Nortel’s Contact Center application portfolio provides a single interface for blending inbound/outbound voice, e-mail, web chat, and IM customer interactions, businesses can collaborate with their customers through the device and method of choice extending a superior customer experience. 

Orbyte Solutions: Orbyte Solutions provide a Trading Application portfolio that works in-house or on public clouds such as Amazon EC2 and is powered by GigaSpaces Cloud Tools.  The applications include Foreign Exchange Trading, Spread-betting and encompass charting and widget features using their own innovative rich clients. You can see my prior blog posts on this here and here.

Hyper Rig:  Hyper Rig is a technical framework for Risk Management that can be added to your existing set up, complement it and enhance it. As such, the architecture has been designed to include features such as orchestration, exceptions management and audit, messaging, integrated security, automatic failover, monitoring, load-balancing, virtual computation-grid and data quality management. 

SmartStream: GigaSpaces XAP is embedded within SmartStream’s next generation Transaction Lifecycle Management technology suite. Using GigaSpaces’s proven technology, SmartStream can deliver on demand and predictable scalability to support clients’ high-performance processing requirements. You can read more about the integration from SmartStream’s site.

Online Gaming: I recently blogged about an online gaming application that is available on Facebook but whose engine is a commercial engine. It is the first totally enabled online Cloud gaming network and is powered by GigaSpaces Cloud Tools.

These are just a selection of application that use /embed GigaSpaces that I have touched. There are many  thousands more that are used in all different parts of the world, either on premise or on the cloud.

Algorithmic Excel Trading with GigaSpaces

June 5th, 2009

One of the really strong points of the GigaSpaces technology is the strength of the client interoperability. As well as being fully interoperable with .Net and C++ (and if you are interested in these technologies I would suggest you check out the C++ article here and the .Net articles here and here) GigaSpaces has integration [...]

VBA GSIterator

June 3rd, 2008

VB Space API v1.2 is released.

A nice addition to the release is the native support for GSIterator, which enabled reading large sets of data in a manageable manner. The ReadWrite example file includes a usage scenario.

-Guy

Realtime Aggregations

May 30th, 2008

Quartet Financial provide a very appealing product called ActivePivot.

ActivePivot offloads pivot calculations and aggregations from the client process to a backend server. It exposes XMLA interface (among others), which means that if you are an Excel user, you simply define a pivot table and point the data source to the ActivePivot server. From that point onwards, Excel interacts with ActivePivot natively.

The result is a very thin Excel spreadsheet which only displays the aggregated result, and all the number crunching and aggregations take place at the server side. When the user interacts with the pivot table, Excel queries ActivePivot and display the next level. Very nice!

ActivePivot provides hooks for the correlation and aggregation execution, so custom logic can easily be applied.

ActivePivot stores the aggregated cube in memory, which allows it to update the cube and respond to market events, and by that provide intra-day aggregations.

The real time bit is where GigaSpaces fits in

Market data feeds are written into a space using one of GigaSpaces’ APIs (JMS, Remoting, JavaSpaces, etc’), and ActivePivot connect to the space and register for space events. When a tick is updated in the space, the space sends a notification to ActivePivot which in turn re-aggregates the relevant cube branch. This means that the aggregated cube is always updated and reflects the latest market state. In addition ActivePivot queries the space for the raw data when Excel sends a drill-down request, which allows ActivePivot a very quick response time.

ActivePivot can be applied at different areas and provide real time P&L, real time Risk, etc’

-Guy

GigaSpaces VB API Beta Release

May 7th, 2008

GigaSpaces VB API version 1.0 is now available under OpenSpaces.org.

Up and above some enhancements and stability fixes, the main addition in this release is native notification support for VBA applications.

The distribution includes a comprehensive example of notifications, which includes also (as a side effect) interoperability with Java. It is a simulation of FXSpot Pricing System in which prices are updated by an external system (the Java feeder in our case), and at the other end there is a spreadsheet which is listening to the FXSpot updates.

Here are the basics of the example:

FXSpot POJO:

@SpaceClass(persist = false, fifo = false, replicate = false)
public class FXSpot {
    private String fxName;
 private double modified;
 private float value;    

 @SpaceId(autoGenerate = false)
 public String getFxName() {
  return fxName;
 }
 
 public void setFxName(String _fxName) {
  fxName = _fxName;
 }
 
 @SpaceProperty(nullValue = “0″)
 public double getModified() {
  return modified;
 }
 
 public void setModified(double _modified) {
  modified = _modified;
 }
 
 @SpaceProperty(nullValue = “0″)
 public float getValue() {
  return value;
 }
 
 public void setValue(float _value) {
  value = _value;
 }
}

The counterpart PONO (I have omitted the COM methods):

namespace com.mycompany.trading.fx
{
    [ClassInterface(ClassInterfaceType.AutoDual), ComVisible(true)]
    public class FXSpot
    {        
        private string _fxName;
        private double _modified;
        private float _value;
 
   public FXSpot()
        {
            _fxName     = null;
            _modified   = 0;
            _value      = 0;
        }

        [SpaceID(AutoGenerate = false)]
        [SpaceProperty(AliasName = "fxName", NullValue = "")]
        public string FXName
        {
            get { return _fxName; }
            set { _fxName = value; }
        } 

        [SpaceProperty(AliasName = "modified", NullValue = 0)]
        public double Modified
        {
            get { return _modified; }
            set { _modified = value; }
        } 

        [SpaceProperty(AliasName = "value", NullValue = 0)]
        public float Value
        {
            get { return _value; }
            set { _value = value; }
        }
    }
}
 

Java feeder – After looking up the space, and initializing Random helpers and currency names, it looks like:

while(true)
{
    FXSpot spot = new FXSpot();
 
    spot.setFxName(fxNames[ccyRand.nextInt(10)]); 

    double modified = (double)System.currentTimeMillis(); 

    // convert to Excel date
    modified = (modified + 7200000) / 86400000 + 25569;

    spot.setModified(modified);
    spot.setValue(valuesRandom.nextFloat());

    System.out.println(“Writing spot = “ + spot); 

    spaceProxy.write(spot, null, Lease.FOREVER);

    Thread.sleep(sleepTime);
}

Up until now, nothing new really… Now begins the interesting bit!

After omitting the initialization parts of the VBA code, what we have is the following:

Registration function:

Function RegisterNotifications(ByVal sRng As String)
    If GigaSpace Is Nothing Then
        Call Init
    End If
 
    Dim rng As range
    rng = range(sRng)
 
    Dim Template As FXObjects.FXSpot
    Template = New FXObjects.FXSpot
 
    Template.fxName = rng.Value
 
    Dim modifiers As Integer
    modifiers = NotificationModifiers.Update 

    Call GigaSpace.RegisterNotification(Template, “Notify”, modifiers, sRng)
End Function

It is very easy to explain the code. If you have ever read the docs or used GigaSpaces’ notifications API, you should feel pretty comfortable here. Same rules apply… If you haven’t, a quick browse here will help understanding the API and terminology better.

You simply invoke GigaSpace.RegisterNotification method with a template to match, the name of your notify function, notify modifiers (take, write, update, all), and last argument which is not part of GigaSpaces notify API is called vbHint. It can hold any object the user wishes to receive back when the notify function is triggered for this specific registration (i.e. template match and operation match). In this example I have iterated through a list of currencies, and I pass the cell address of the specific currency to the registration so that when my Notify method is invoked, I can lookup the relevant cell easily.

My Notify function:

Function Notify(ByVal eventType As Long, ByVal pono As Object, ByVal vbHint As Object)
    Dim sRng As String
    sRng = vbHint
 
    Dim rng As range
    rng = range(sRng)
 
    Dim spot As FXObjects.FXSpot
    spot = pono
 
    rng.Offset(0, 1).Value = spot.Value
    rng.Offset(0, 2).Value = spot.Modified
End Function

Note the Notify signature. When registering to notifications, the notify function must have this signature in terms of the types it takes as arguments. The eventType represents the space operation which triggered the notification, and the pono is the object which matched the registration’s template and triggered the notify.

In this example, I take the values from the notification object, and update the relevant Excel cells (I use the vbHint for that).

The example includes a button to UnRegisterNotifications.

Public Sub UnReg()
    If Not (GigaSpace Is Nothing) Then
        Call GigaSpace.UnRegisterNotifications
    End If
End Sub

The UnRegisterNotifications method removes all registrations for the invoking Excel from the space.

One more thing to note is the termination of the Excel process. As notifications require some daemon threads to run at the background, the Excel needs to invoke GigaSpace.Terminate function which cleans up these threads and frees some resources. Failing to invoke the method could result a hanging Excel process. As a best practice, you should catch the Excel workbook close event and call the terminate method.

Example (at the workbook level):

Private Sub Workbook_BeforeClose(ByVal Cancel As Boolean)
    Call TerminateGigaSpace
End Sub

Which invokes the Terminate method:

Public Function TerminateGigaSpace()
    If Not (GigaSpace Is Nothing) Then
        Call GigaSpace.Terminate
    End If
End Function

The example with inline comments and documentation is packed in the setup. After downloading and completing the installation process, the example Excel can be run from –> Programs –> VB Space API –> Examples –> FXSpot Notify. The example is located under \Examples\FXPrices. Follow the readMe.txt to run and change the example.

Enjoy!

-Guy

Next Page »