Skip to content

Commit 4ec4095

Browse files
authored
WMS ID: 11079 - Merge of workshop content ready for review (#7)
* TimesTen: Initial population * Work in progress * Finalising workshop instructions etc. * QA fixes #1 * QA fixes #2
1 parent 1b04a24 commit 4ec4095

File tree

24 files changed

+3099
-0
lines changed

24 files changed

+3099
-0
lines changed

timesten/README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# TimesTen LiveLabs on GitHub - Welcome!
2+
[![](../../common/images/livelabs-banner-formarketplace.png)](https://bit.ly/golivelabs)
3+
4+
Oracle TimesTen In-Memory Database (TimesTen) delivers real time application performance (low response time and high throughput) by changing the assumptions around where data resides at runtime. By managing data in memory, and optimizing data structures and access algorithms accordingly, database operations execute with maximum efficiency achieving dramatic gains in responsiveness and throughput.
5+
6+
TimesTen is a relational database, with SQL as its access language and PL/SQL as its procedural language, so you can leverage your existing Oracle Database skills. TimesTen supports a wide range of database APIs such as JDBC, ODBC, ODP.NET and Oracle Call Interface (OCI). Several Open Source languages, such as Python and Node.js, are supported via Open Source APIs.
7+
8+
TimesTen Scaleout, a shared nothing scale-out architecture based on the existing TimesTen in-memory technology, allows databases to transparently scale across dozens of hosts, reach hundreds of terabytes in size and support hundreds of millions of transactions per second without the need for manual database sharding or workload partitioning.
9+
10+
TimesTen can be deployed in two distinct ways:
11+
12+
_TimesTen Classic_
13+
14+
A single node database for applications that require the lowest and most consistent response time. High availability is provided via active-standby pair replication to another node, and also supports multiple read-only subscribers for scaling read heavy workloads.
15+
16+
TimesTen Classic can also be deployed as a cache for Oracle Database. By caching a subset of your Oracle Database data in a TimesTen cache, you can dramatically improve the performance of data access. TimesTen provides a declarative caching mechanism which suports both readonly caching and read-write caching. Data change synchronistion, a standard feature of TimesTen cache, ensures that the cache and the backend database are always in sync.
17+
18+
_TimesTen Scaleout_
19+
20+
A shared nothing distributed database based on the existing TimesTen in-memory technology. TimesTen Scaleout allows databases to transparently scale across dozens of hosts, reach hundreds of terabytes in size and support hundreds of millions of transactions per second without the need for manual database sharding or workload partitioning. Scaleout features include concurrent parallel cross-node processing, transparent data distribution (with single database image) and elastic scaleout and scalein. High availability and fault tolerance are automatically provided through use of Scaleout's K-safety feature. TimesTen Scaleout supports most of the same features and APIs as TimesTen Classic.
21+
22+
TimesTen Scaleout can also be deployed as a cache for Oracle Database, supporting a subset of the cache features of Timesten Classic.
23+
24+
25+
## How do I get started with TimesTen LiveLabs?
26+
27+
Before attempting any of the workshops listed below you need to determine which type of environment you are going to utilize. You have the choice of running the workshops in your own Oracle Cloud tenancy or in a LiveLabs provided tenancy. If you want to use your own tenancy it can either be via an existing Oracle Cloud account to which you have access or you can register for an Oracle Cloud Trial Account.
28+
29+
## Get an Oracle Cloud Trial Account for Free!
30+
If you don't have an Oracle Cloud account then you can quickly and easily sign up for a free trial account that provides:
31+
- $300 of free credits good for up to 3500 hours of Oracle Cloud usage
32+
- Credits can be used on all eligible Cloud Platform and Infrastructure services for the next 30 days
33+
- Your credit card will only be used for verification purposes and will not be charged unless you 'Upgrade to Paid' in My Services
34+
35+
Click here to request your trial account: [https://www.oracle.com/cloud/free](https://www.oracle.com/cloud/free)
36+
37+
## TimesTen Workshop Pre-requisites
38+
39+
The TimesTen workshops have the following pre-requisites:
40+
41+
- A basic familiarity with relational databases and SQL
42+
43+
## Available TimesTen Workshops
44+
- [Accelerate your Applications: Achieve Blazing Fast SQL With an Oracle TimesTen Cache](https://apexapps.oracle.com/pls/apex/dbpm/r/livelabs/view-workshop?p180_id=613)
45+
46+
## TimesTen Related Pages
47+
- [TimesTen Product Home](https://www.oracle.com/au/application-development/)
48+
- [TimesTen Samples on GitHub](https://github.com/oracle-samples/oracle-timesten-samples)
49+
- [TimesTen Blogs](https://blogs.oracle.com/timesten/)
50+
51+
## Documentation
52+
- [TimesTen Documentation](https://docs.oracle.com/en/database/other-databases/timesten/)
53+
54+
## Need Help?
55+
Please first consult the "Need Help?" lab located at the bottom of your workshop to see if our FAQ can solve your problem. If you have an issue that is specific to the contents of the workshop, please reach out to the author located in the "Acknowledgements" section at the bottom of each lab via email. Please include your workshop name and lab name. You can also include screenshots and attach files. If you have a more general issue, or would like to reach out to the LiveLabs management team, email us [here](mailto:livelabs-help_us@oracle.com).
56+
57+
If you do not have an Oracle Account, click [here](https://profile.oracle.com/myprofile/account/create-account.jspx) to create one.
148 KB
Loading
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Introduction
2+
3+
## About this Workshop
4+
5+
In this workshop you will discover how deploying Oracle TimesTen In-Memory Database as an in-memory relational cache for Oracle Database can dramatically improve the response times for SQL queries, typically by an order of magnitude.
6+
7+
Setting up a TimesTen cache is quick and easy. This workshop leads you through the process step by step and uses a simple OLTP application and some example queries to demonstrate the incredibly low query latencies provided by TimesTen.
8+
9+
Estimated Workshop Time: **60 minutes**
10+
11+
### About Oracle TimesTen In-Memory Database
12+
13+
Oracle TimesTen In-Memory Database (TimesTen) delivers real time application performance (low response time and high throughput) by changing the assumptions around where data resides at runtime. By managing data in memory, and optimizing data structures and access algorithms accordingly, database operations execute with maximum efficiency achieving dramatic gains in responsiveness and throughput.
14+
15+
TimesTen is a relational database, with SQL as its access language and PL/SQL as its procedural language, so you can leverage your existing Oracle Database skills. It supports a wide range of database APIs such as JDBC, ODBC, ODP.NET and Oracle Call Interface (OCI) and several Open Source languages, such as Python and Node.js, are supported via Open Source APIs. TimesTen provides full persistence and has built in high-availability.
16+
17+
TimesTen can be deployed both as a database of record or as a high performance relational cache in front of an Oracle database to acceleratae Oracle database applications. This lab focuses on the cache deployment mode.
18+
19+
![TimesTen Cache Architecture Diagram](./images/tt-cache-architecture.png " ")
20+
21+
### Objectives
22+
23+
In this workshop you will:
24+
25+
* Start up the components required for the labs
26+
* Create a TimesTen instance
27+
* Execute some basic TimesTen commands
28+
* Prepare the Oracle database for TimesTen caching
29+
* Prepare a TimesTen datbase and set it up as a cache
30+
* Load data from the Oracle database into the cached tables and activate cache refresh
31+
* Verify cache refresh
32+
* Run a simple OLTP benchmark to see the performance benefit of TimesTen
33+
* Run some queries to see the speedup provided by TimesTen
34+
* Use dynamic cache groups
35+
* Shutdown the TimesTen cache and instance
36+
37+
### Prerequisites
38+
39+
This workshop assumes that you have:
40+
41+
* Some familiarity with Oracle Database
42+
* A basic understanding of SQL
43+
44+
In order to run this workshop you need:
45+
46+
* An active Oracle Cloud account
47+
48+
You can run this workshop:
49+
50+
* In the LiveLabs sandbox
51+
* In your own tenancy using a paid Oracle Cloud account
52+
* Using a free-trial Oracle Cloud account
53+
54+
This workshop does _not_ support the Oracle Cloud 'Always Free' tier due to that tier's resource restrictions.
55+
56+
**IMPORTANT:** If you choose to run this workshop in your own tenancy, or using a free-trial Cloud account, please be sure to provision at least **4 CPUs** and **32 GB RAM** for the cloud instance used for the workshop.
57+
58+
You may now ***proceed to the next lab***.
59+
60+
## Learn More
61+
62+
* [TimesTen Product Home](https://www.oracle.com/database/technologies/related/timesten.html)
63+
* [TimesTen Samples on GitHub](https://github.com/oracle-samples/oracle-timesten-samples)
64+
* [TimesTen Documentation](https://docs.oracle.com/en/database/other-databases/timesten/)
65+
66+
## Acknowledgements
67+
68+
* **Author** - Chris Jenkins, Senior Director, TimesTen Product Management
69+
* **Contributors** - Doug Hood & Jenny Bloom, TimesTen Product Management
70+
* **Last Updated By/Date** - Chris Jenkins, July 2022
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Prepare Setup
2+
3+
## Introduction
4+
5+
In this lab, you will download the Oracle Resource Manager (ORM) stack zip file needed to setup the resource needed to run this workshop. This workshop requires a compute instance and a Virtual Cloud Network (VCN) and subnet.
6+
7+
Estimated Time: **15 minutes**
8+
9+
### Objectives
10+
11+
- Download the workshop's ORM stack
12+
- Configure an existing Virtual Cloud Network (VCN) - optional
13+
14+
### Prerequisites
15+
16+
This lab assumes you have:
17+
18+
- An Oracle Cloud account with enough resources to run this workshop. The minimum requirements are **4 CPUs, 32 GB RAM, 100 GB storage and one VCN/subnet**.
19+
20+
## Task 1: Download Oracle Resource Manager (ORM) stack zip file
21+
22+
1. Click on the link below to download the Resource Manager zip file you need to build your environment:
23+
24+
[ll-timesten-cache-intro.zip](https://objectstorage.uk-london-1.oraclecloud.com/p/puzLjtCV8NbFGkuRWo1lVsdeFqS5E91KZ1Rfa7fkidhPEGVxuFTbtT32zkXOXtl0/n/intdouglashood/b/stacks/o/ll-timesten-cache-intro.zip)
25+
26+
2. Save in your downloads folder.
27+
28+
We strongly recommend using this stack to create a self-contained/dedicated VCN with your instance(s). Skip to *Task 3* to follow our recommendations. If you would rather use an exiting VCN then proceed to the next task to update your existing VCN with the required Egress rules.
29+
30+
## Task 2: Adding security rules to an existing VCN
31+
32+
This workshop requires a certain number of ports to be available, a requirement that can be met by using the default ORM stack execution that creates a dedicated VCN. In order to use an existing VCN/subnet the following ports should be added to the Ingress rules.
33+
34+
| Port |Description |
35+
| :------------- | :------------------------------------ |
36+
| 22 | SSH |
37+
| 80 | Remote Desktiop using noVNC |
38+
| 6080 | Remote Desktop using noVNC |
39+
40+
1. Go to *Networking >> Virtual Cloud Networks*
41+
42+
2. Choose your network
43+
44+
3. Under Resources, select *Security Lists*
45+
46+
4. Click on *Default Security Lists *under the Create Security List button
47+
48+
5. Click *Add Ingress Rule* button
49+
50+
6. Enter the following:
51+
- Source CIDR: 0.0.0.0/0
52+
- Destination Port Range: *Refer to above table*
53+
54+
7. Click the Add Ingress Rules button
55+
56+
## Task 3: Setup your OCI compute instance
57+
58+
Using the details from the two steps above, proceed to the lab *Environment Setup* to setup your workshop environment using Oracle Resource Manager (ORM) using one of the following options:
59+
60+
- Create Stack: *Compute + Networking*
61+
- Create Stack: *Compute only* using an existing VCN where security lists have been updated as per *Task 2* above
62+
63+
**IMPORTANT:** When deploying the workshop compute instance via the ORM stack, it is strongly recommended that you enable the optional SSH access using either your own SSH public key or a generated SSH key pair. SSH connectivity offers a better user experience, especially for copy/paste, than noVNC connectivity.
64+
65+
You may now *proceed to the next lab (Environment setup)*.
66+
67+
## Acknowledgements
68+
69+
* **Author** - Chris Jenkins, Senior Director, TimesTen Product Management
70+
* **Contributors** - Doug Hood & Jenny Bloom, TimesTen Product Management
71+
* **Last Updated By/Date** - Chris Jenkins, July 2022
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Connect to the workshop compute instance
2+
3+
## Introduction
4+
5+
In this lab you will learn the different ways to connect to the OCI compute instance that hosts the workshop.
6+
7+
The workshop requires you to use a terminal session to run various commands and observe their output. Often you may need to copy and paste commands or text from the workshop instructions into the terminal session.
8+
9+
If you chose to run the workshop in the LiveLabs sandbox then the only connection method available to you by default is a GUI session using the browser based VNC mechanism. It is possible to setup SSH connectivity by adding your own SSH key into the instance (follow the instructions provided in the noVNC lab).
10+
11+
If you chose to run the workshop in your own tenancy, or in a free-trial Cloud account, then you can use the same browser based GUI connection method. Also, if you selected the option during deploymemnt via the ORM stack, you also have the option to use SSH connectivity (**strongly recommended)**.
12+
13+
Estimated Time: **5 minutes**
14+
15+
### Objectives
16+
17+
- Connect to the compute instance using noVNC
18+
- Connect to the compute instance using SSH (optional)
19+
20+
### Prerequisites
21+
22+
This lab assumes that you have:
23+
24+
- Completed all the previous labs in this workshop, in sequence.
25+
26+
## Task 1: Connect using noVNC
27+
28+
_LiveLabs sandbox_
29+
30+
In the LiveLabs reservation page for your active reservation you will see the URL to use for a noVNC connection to the workshop instance.
31+
32+
_Own tenancy or free-trial Cloud account_
33+
34+
At the end of the ORM stack apply job execution report you will see the noVNC connection URL.
35+
36+
Copy / paste the URL into your browser and you should then see the workshop desktop.
37+
38+
![Workshp noVNC Desktop](./images/novnc-desktop.png " ")
39+
40+
You can use the *Activities* menu, or double click the *Terminal* icon on the desktop to open a terminal session.
41+
42+
## Task 2: Connect using SSH (optional but recommended)
43+
44+
You can connect to the instance as the oracle user using an SSH private key.
45+
46+
_LiveLabs sandbox_
47+
48+
You can follow the instructions in the noVNC lab to add an SSH poublic key to the oracle user's SSH **authorized_keys** file. You then connect using the corresponding SSH private key.
49+
50+
_Own tenancy or free-trial Cloud account - user provided public key_
51+
52+
If you provided your own SSH public key as part of the ORM stack deployment process then you can connect using the corresponding SSH private key.
53+
54+
_Own tenancy or free-trial Cloud account - system generated key pair_
55+
56+
The SSH private key needed to connect is displayed at the end of the ORM stack apply job log. Copy/paste the key into a file on your client computer, or import into into your SSH client, and use that file to connect.
57+
58+
**NOTE:** On Linux and macOS systems, SSH private keys should be stored in your user's .ssh directory (**~/.ssh**) and must have permissions of **600 (rw-------)**.
59+
60+
Assuming that the SSH private key is **~/.ssh/id_livelabs** and the oublic IP address of the workshop compiute instance is **123.123.123.123** then you can connect using:
61+
62+
**ssh -i ~/.ssh/id_livelabs oracle@123.123.123.123**
63+
64+
```
65+
$ ssh -i ~/.ssh/id_livelabs oracle@123.123.123.123 11:55:17
66+
The authenticity of host '123.123.123.123 (123.123.123.123)' can't be established.
67+
ED25519 key fingerprint is SHA256:bm2wv3HgyBIhIRov6+EtId10rQHyq1LXpXglQMpqhqA.
68+
This key is not known by any other names
69+
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
70+
Warning: Permanently added '140.238.69.118' (ED25519) to the list of known hosts.
71+
Last login: Mon Jun 27 09:12:52 2022 from aa.bb.cc.dd
72+
[oracle@ttlivelabvm ~]$
73+
```
74+
75+
You can now *proceed to the next lab*. You can keep your terminal session open for use in the next lab.
76+
77+
## Acknowledgements
78+
79+
* **Author** - Chris Jenkins, Senior Director, TimesTen Product Management
80+
* **Contributors** - Doug Hood & Jenny Bloom, TimesTen Product Management
81+
* **Last Updated By/Date** - Chris Jenkins, July 2022
82+
4.56 MB
Loading
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Initialize the workshop environment
2+
3+
## Introduction
4+
5+
In this lab you will start up all the components required to run the labs making up this workshop.
6+
7+
The workshop uses an Oracle database which runs in its own container (**dbhost**). A second container (**tthost1**) provides the TimesTen environment. These containers, and the host system (**ttlivelabvm**), are all connected using a custom Docker network. This setup provides a realistic multi-host environment with the convenience of just a single compute instance.
8+
9+
Estimated Time: 10 minutes.
10+
11+
### Objectives
12+
13+
- Initialize the workshop environment.
14+
15+
### Prerequisites
16+
17+
This lab assumes that you have:
18+
19+
- Completed all the previous labs in this workshop, in sequence.
20+
21+
### Starting over from the beginning
22+
23+
Once you have successfully completed this lab, if at any point you want to start the whole workshop again from the beginning, just go the the **~/lab** directory and run the script **labReset.sh**. That script will take 5-8 minutes to run and it will reset everything back to the way it was after this lab completed.
24+
25+
## Task 1: Connect to the environment
26+
27+
Connect to the OCI compute instance and open a terminal session, as the user **oracle**, using an appropriate method as discussed in the previous lab.
28+
29+
## Task 2: Initialize and startup the lab components
30+
31+
Change to the **lab** directory:
32+
33+
**cd ~/lab**
34+
35+
`[oracle@ttlivelabvm ~] cd ~/lab`
36+
37+
Initialize the workshop:
38+
39+
**labSetup.sh cache-intro**
40+
41+
```
42+
[oracle@ttlivelabvm ~] labSetup.sh cache-intro
43+
info: setting up workshop 'cache-intro', this will take several minutes...
44+
info: starting hosts: OK
45+
info: host initialization: OK
46+
info: resetting Oracle Database state, please be patient...
47+
info: Oracle Database state successfully reset
48+
info: starting Oracle Database: OK
49+
```
50+
51+
This command will take between 5 and 8 minutes to complete. Once the setup has completed successfully, *proceed to the next lab*. You can keep your terminal session open ready for the next lab.
52+
53+
## Acknowledgements
54+
55+
* **Author** - Chris Jenkins, Senior Director, TimesTen Product Management
56+
* **Contributors** - Doug Hood & Jenny Bloom, TimesTen Product Management
57+
* **Last Updated By/Date** - Chris Jenkins, July 2022
58+

0 commit comments

Comments
 (0)