JDBC

  Search Here
Searching XAP 6.0 Documentation

                                               

Section Summary: GigaSpaces allows applications to connect to a space/cache using JDBC. A GigaSpaces JDBC driver accepts SQL statements, translates them to space operations, and returns standard result sets.

Overview

The GigaSpaces JDBC interface allows database-driven applications to interact with spaces via SQL queries and commands. A query processor transparently translates SQL queries into legal JavaSpaces operations. No integration is required – all you need to do is point the application to the GigaSpaces JDBC driver like any other JDBC driver.

Applications can access the GigaSpaces Data Grid using the JDBC API; data written to the grid using the JDBC API can also be accessed using other APIs.

An alternative way of querying the space using SQL syntax is the SQLQuery class (see Querying the Space). This class allows you to perform SQL queries directly against space objects, without adding O/R mapping complexity.

An Alternative for a JDBC-Compliant Database?

JDBC support in GigaSpaces is centered around the Space-Based Architecture – its main motivation is to enable more sophisticated querying of the space, beyond the template matching provided by JavaSpaces.

GigaSpaces is not a full-fledged relational database and it does not support the full SQL92 standard (see JDBC Supported Features). However, the existing SQL support is extremely useful for applications that need to execute queries on a space for real-time queries.

Using Existing SQL Code and Porting to External Systems

The JDBC interface is mostly used to enable access to the space through standard SQL tools and programming interfaces. You can write SQL commands against the space, and the same code will in many (simple) cases be compatible with other SQL implementations.

Porting existing JDBC code to the space is certainly doable (but would require some level of adaptation depending on the specifics of the case and the complexity of the SQL queries. For legacy applications, it may still be easier than porting existing code to leverage the space technology directly. Since the SQL support is limited, this path should be taken with caution, and would normally require close support from GigaSpaces.

Application Workflow

JDBC applications use the following workflow when interacting with GigaSpaces:

Expand this...

Distributed Configurations

The three components of the GigaSpaces JDBC – the client application (with JDBC driver), the Query Processor and the space – can be installed on different computers located in different physical locations, or even in the same JVM. This gives rise to several possible configurations:

Expand this...

Section Contents


GigaSpaces 6.0 Documentation Contents (Current Page in Bold)

    Java

    C++

    .NET

    Middleware Capabilities

    Configuration and Management

Add GigaSpaces wiki search to your browser search engines!
(works on Firefox 2 and Internet Explorer 7)

Labels

 
(None)