Book Image

Oracle Coherence 3.5

By : Aleksandar Seovic
Book Image

Oracle Coherence 3.5

By: Aleksandar Seovic

Overview of this book

Scalability, performance, and reliability have to be designed into an application from the very beginning, as there may be substantial cost or implementation consequences if they need to be added down the line. This indispensible book will teach you how to achieve these things using Oracle Coherence, a leading data grid product on the market.Authored by leading Oracle Coherence authorities, this essential book will teach you how to use Oracle Coherence to build high-performance applications that scale to hundreds of machines and have no single points of failure. You will learn when and how to use Coherence features such as distributed caching, parallel processing, and real-time events within your application, and understand how Coherence fits into the overall application architecture. Oracle Coherence provides a solid architectural foundation for scalable, high-performance and highly available enterprise applications, through features such as distributed caching, parallel processing, distributed queries and aggregations, real-time events, and the elimination of single points of failure.However, in order to take full advantage of these features, you need to design your application for Coherence from the beginning. Based on the authors' extensive knowledge of Oracle Coherence, and how to use it in the real world, this book will provide you with all the information you need in order to leverage various Coherence features properly. It contains a collection of best practice-based solutions and mini-frameworks that will allow you to be more productive from the very beginning.The early chapters cover basics like installation guidelines and caching topologies, before moving on to the domain model implementation guidelines, distributed queries and aggregations, parallel processing, and real-time events. Towards the end, you learn how to integrate Coherence with different persistence technologies, how to access Coherence from platforms other than Java, and how to test and debug classes and applications that depend on Coherence.
Table of Contents (22 chapters)
Oracle Coherence 3.5
Credits
Foreword
About the author
Acknowledgements
About the co-authors
About the reviewers
Preface
12
The Right Tool for the Job
Index

Deploying the C++ Application


In order to build the C++ ATM application, you will need to do the following:

  1. Open Visual Studio 2008 Command Prompt and navigate to the CoherentBank\cpp directory. This will ensure that all environment variables necessary to run Microsoft C++ compiler are properly configured.

  2. Build the ATM application:

    > build
    

    This should compile and link the application and copy the executable and necessary configuration files into the dist subdirectory.

  3. Navigate to the dist subdirectory.

  4. Run the application with no arguments:

    > atm
    

    This should print out usage instructions:

    Usage: atm <deposit|withdraw> <account number> <amount> <currency code>
  5. Run the application one or more times against one of the accounts you have access to (you can see them in the web application when logged in). For example, if you want to withdraw $200 from the account with the ID 10 run the following:

    > atm withdraw 10 200 USD
    

    You should see a response similar to the following:

    Transaction Details 
    ---------------------------------- 
    Type:        WITHDRAWAL
    Description: ATM withdrawal ($ 200.00 @ 0.6630) 
    Amount:      132.6 EUR
    Balance:     20745.4 EUR
  6. Do several withdrawals and deposits against the same account and then view the account transactions in the web application.

    Note

    Note: The only currencies supported at the moment are USD, EUR, GBP, CHF, AUD, CAD, and JPY.