Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

Replace Redis with Apache Ignite for in memory cache and db #129

Merged
merged 9 commits into from
Mar 25, 2020
Merged

Replace Redis with Apache Ignite for in memory cache and db #129

merged 9 commits into from
Mar 25, 2020

Conversation

chenpiaoping
Copy link
Contributor

@chenpiaoping chenpiaoping commented Mar 17, 2020

This PR implements the abstraction layer of the in-memory database, which i also call it db cache. underlying component that really provide cache services that include redis and ignite currently. The ICache interface defines the basic interface for cache operations, such as add, delete, and modify. The cache also supports Transaction,Transaction interface provides transaction-related interfaces. If the underlying cache chooses ignite, it also supports security features and uses SLL to establish a secure link with the ignite server.

Copy link
Contributor

@xieus xieus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very good start. Please take a look at the comments. Thanks!

@@ -9,3 +9,7 @@ logging.level.root=info
logging.level.org.springframework.web=info
logging.file.path=.
logging.type=file
#Ignite configuration
#ignite.host=localhost
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very good start with the abstraction layer on DB access.

Couple of suggestions:

  • We likely want to uncomment the ignite configuration.
  • Place ignite cluster on other hosts, and support remote IPs/URLs instead of localhost
  • Deploy Ignite clusters as a K8s service

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the remaining item is to update the one-box deployment script as well as the k8s yaml file, respectively.

https://github.com/futurewei-cloud/alcor/blob/master/scripts/deploy.sh
https://github.com/futurewei-cloud/alcor/tree/master/kubernetes

How did you test the change locally? deploy a Ignite container and verify locally?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let us address this item in next PR.


public class IgniteCache<K, V> implements ICache<K, V> {
private static final Logger logger = LoggerFactory.getLogger();
private static final int QUERY_PAGE_SIZE = 1000;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know how the page size impacts perf? Could we make it configurable?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The static var is gone now. Not sure if we need it.

src/com/futurewei/alcor/controller/db/Database.java Outdated Show resolved Hide resolved
@xieus xieus added the feature feature development label Mar 17, 2020
@xieus xieus added this to the Version 0.3.2020.03.31 milestone Mar 17, 2020
@xieus xieus reopened this Mar 20, 2020
Copy link
Contributor

@xieus xieus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This iteration looks a lot better. Thank you.

Can you address the remaining comments and update the title and description of this PR, before you merge the change?

@xieus xieus linked an issue Mar 25, 2020 that may be closed by this pull request
@chenpiaoping chenpiaoping changed the title Add db module Replace Redis with Apache Ignite for in memory cache and db #98 Mar 25, 2020
@chenpiaoping chenpiaoping changed the title Replace Redis with Apache Ignite for in memory cache and db #98 Replace Redis with Apache Ignite for in memory cache and db Mar 25, 2020
@xieus
Copy link
Contributor

xieus commented Mar 25, 2020

Merge the PR to master. Deployment step to be completed in a separate PR.

@xieus xieus merged commit efe828e into futurewei-cloud:master Mar 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature feature development
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace Redis with Apache Ignite for in memory cache and db
2 participants