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...
- The application generates an SQL statement and passes it to the GigaSpaces JDBC driver.
- The JDBC driver creates a packaged SQL statement with the same commands as the original statement, and forwards it to the Query Processor.
- The Query Processor receives the packaged statement and generates the space operations necessary to fulfill the query. For example, if the statement contains an INSERT command, the Query Processor performs a Write operation on the space.
- The Query Processor receives a result from the space, in the form of Entry objects.
- The Query Processor converts the Entries to result objects that conform to the SQL standard, and forwards them to the JDBC driver.
- The JDBC driver returns an SQL-compliant result-set to the application.
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...
- Fully embedded – the application, the Query Processor and the space reside on the same machine, and run in the same JVM process. In this configuration the space, acting as database, is packaged with the client application. This provides very high performance.
- Central Query Processor – the Query Processor runs on a separate machine, with one or more client applications using it. The space runs embedded as part of the Query Processor JVM. If there are multiple applications and one central data store, this configuration makes for more efficient parsing of SQL statements. The Query Processor caches SQL queries, so when the same statements are received from other applications, they are not parsed again.
- Query Processor as proxy – the space and Query Processor are installed on different machines running in different JVMs. This configuration is useful if the space, acting as a central data store, cannot be readily accessed by all client applications. One or more Query Processors can be set up in an accessible network location, and it is only necessary to link these "proxies" (not all client applications) to the space.
|
Section Contents
|
Comments (2)
Sep 07
Anonymous says:
<a href=<a href= http://www.state.sd.us/gis/wwf/forum/forum_posts.asp?TID=24 >Buy Generic Lasix.Buy Lasix Online</a>
<a href= http://www.state.sd.us/gis/wwf/forum/forum_posts.asp?TID=25 >Buy Oxycontin Online.Buying Oxycontin</a>
<a href= http://www.state.sd.us/gis/wwf/forum/forum_posts.asp?TID=26 >Buy Soma Online.Order Soma.Cheap Soma</a>
<a href= http://www.state.sd.us/gis/wwf/forum/forum_posts.asp?TID=27 >Buy Fioricet Online.Generic Fioricet online</a>
<a href= http://www.state.sd.us/gis/wwf/forum/forum_posts.asp?TID=28 >Cheap Tramadol Cod.Very Cheap Tramadol</a>
Sep 07
Anonymous says:
<a href=<a href= http://www.innerprise.net/forum/forum_posts.asp?TID=1260&PN=1&TPN=1 >Buy Propecia Online.Buy Generic Propecia</a>
<a href= http://www.innerprise.net/forum/forum_posts.asp?TID=1261&PN=1&TPN=1 >Buy Acomplia Online.Acomplia Discount</a>
<a href= http://www.innerprise.net/forum/forum_posts.asp?TID=1262&PN=1&TPN=1 >Buy Xenical Online.Order Xenical</a>
<a href= http://www.innerprise.net/forum/forum_posts.asp?TID=1263&PN=1&TPN=1 >Buy Lipitor online.Generic Lipitor Cheap</a>
<a href= http://www.innerprise.net/forum/forum_posts.asp?TID=1264&PN=1&TPN=1 >Buy Provera Online.Cheap Generic Provera</a>
Add Comment