All Projects → paypal → Hera

paypal / Hera

Licence: apache-2.0
High Efficiency Reliable Access to data stores

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Hera

Kangaroo
SQL client and admin tool for popular databases
Stars: ✭ 127 (-40.38%)
Mutual labels:  oracle, mysql
Sqlcheck
Automatically identify anti-patterns in SQL queries
Stars: ✭ 2,062 (+868.08%)
Mutual labels:  oracle, mysql
Firenze
Adapter based JavaScript ORM for Node.js and the browser
Stars: ✭ 131 (-38.5%)
Mutual labels:  mysql, databases
Datax
DataX is an open source universal ETL tool that support Cassandra, ClickHouse, DBF, Hive, InfluxDB, Kudu, MySQL, Oracle, Presto(Trino), PostgreSQL, SQL Server
Stars: ✭ 116 (-45.54%)
Mutual labels:  oracle, mysql
Sqitch
Sensible database change management
Stars: ✭ 2,320 (+989.2%)
Mutual labels:  oracle, mysql
Directus
Open-Source Data Platform 🐰 — Directus wraps any SQL database with a real-time GraphQL+REST API and an intuitive app for non-technical users.
Stars: ✭ 13,190 (+6092.49%)
Mutual labels:  oracle, mysql
Manage Fastapi
🚀 CLI tool for FastAPI. Generating new FastAPI projects & boilerplates made easy.
Stars: ✭ 163 (-23.47%)
Mutual labels:  mysql, databases
Adminer Custom
Customizations for Adminer, the best database management tool written in PHP.
Stars: ✭ 99 (-53.52%)
Mutual labels:  oracle, mysql
Qxorm
QxOrm library - C++ Qt ORM (Object Relational Mapping) and ODM (Object Document Mapper) library - Official repository
Stars: ✭ 176 (-17.37%)
Mutual labels:  oracle, mysql
Linq2db
Linq to database provider.
Stars: ✭ 2,211 (+938.03%)
Mutual labels:  oracle, mysql
Servicestack.ormlite
Fast, Simple, Typed ORM for .NET
Stars: ✭ 1,532 (+619.25%)
Mutual labels:  oracle, mysql
Migrate
Database migrations. CLI and Golang library.
Stars: ✭ 2,315 (+986.85%)
Mutual labels:  mysql, databases
Sqlfaker
轻量级、易拓展的数据库智能填充Java开源库
Stars: ✭ 109 (-48.83%)
Mutual labels:  oracle, mysql
Koolreport
This is an Open Source PHP Reporting Framework which you can use to write perfect data reports or to construct awesome dashboards using PHP
Stars: ✭ 204 (-4.23%)
Mutual labels:  oracle, mysql
Csv2db
The CSV to database command line loader
Stars: ✭ 102 (-52.11%)
Mutual labels:  oracle, mysql
Atdatabases
TypeScript clients for databases that prevent SQL Injection
Stars: ✭ 154 (-27.7%)
Mutual labels:  mysql, databases
Ebean
Ebean ORM
Stars: ✭ 1,172 (+450.23%)
Mutual labels:  oracle, mysql
Chloe
A lightweight and high-performance Object/Relational Mapping(ORM) library for .NET --C#
Stars: ✭ 1,248 (+485.92%)
Mutual labels:  oracle, mysql
Rom Sql
SQL support for rom-rb
Stars: ✭ 169 (-20.66%)
Mutual labels:  oracle, mysql
Sharding Method
分表分库的新思路——服务层Sharding框架,全SQL、全数据库兼容,ACID特性与原生数据库一致,能实现RR级别读写分离,无SQL解析性能更高
Stars: ✭ 188 (-11.74%)
Mutual labels:  oracle, mysql

Build Status License

Hera - High Efficiency Reliable Access to data stores

Hera multiplexes connections for MySQL and Oracle databases. It supports sharding the databases for horizontal scaling.

What is Hera

 Hera is Data Access Gateway for  databases and is a key enabler for scaling and improving availability databases.
- It Protects the database from resource exhaustion by evicting poorly performing queries,
- Intelligently routes read/write traffic appropriately for better load balancing,
- Improves tolerance to database outages,
- Provides high performance secured connections between applications and Hera
- Provides domain agnostic database sharding for horizontal database scaling.
- Automatic transaction application failover between replica databases
- And many more site resiliency features.

Getting Started

You can build mux using either Docker or manual build.

Docker Build

For development, the following docker commands can help get started

docker run --network host --name mysql-11 -e MYSQL_ROOT_PASSWORD=62-AntHill -d mysql:latest
docker exec -it mysql-11 bash -c 'echo "create database testschema;" | mysql -u root -h 127.0.0.1 -p62-AntHill'
cd hera/tests/devdocker
mkdir -p src/github.com/paypal/hera
rsync -av --exclude tests/devdocker ../.. src/github.com/paypal/hera
docker build -t hera-oss .
docker run -it --rm --name testRunHeraOss --network host -e password=62-AntHill hera-oss

To test it, in a separate terminal:

docker exec -it testRunHeraOss /bin/bash
cd /go/src
go run github.com/paypal/hera/client/gosqldriver/tls/example/sample_main.go

Manual Build

The following sections explain the process for manually building mux without Docker. We only tested on RedHat and Ubuntu.

Install Dependencies

  1. Install Go 1.10+.
  2. Install MySQL or Oracle.
  3. Install the MySQL driver and the Oracle driver
  4. Install Oracle instant client

Build Binaries

  1. Navigate to the working directory.

    cd $WORKSPACE
    export GOPATH=$WORKSPACE
    
  2. Option 1

    Clone the source code from github

    git clone [email protected]:paypal/hera src/github.com/paypal/hera
    

    Option 2

    (a) GO 1.12 is prerequisite

    (b) export GO111MODULE=on ( to enable the go mod feature)

    go get github.com/paypal/hera
    
  3. Install the dependencies: MySQL and Oracle driver

    go get gopkg.in/goracle.v2
    go get github.com/go-sql-driver/mysql
    
  4. Build server binaries

    go install github.com/paypal/hera/mux github.com/paypal/hera/worker/mysqlworker github.com/paypal/hera/worker/oracleworker
    
  5. Build Go test client

    go install github.com/paypal/hera/tests/e2e/client
    
  6. Build Java test client under the client/java directory

  7. Build the C++ oracleworker

    cd worker/cppworker/worker
    make -f ../build/makefile19
    

Running the server

To run mux there is minimal configuration required. Please see examples for running with MySQL or Oracle. The main configuration file is hera.txt, which must contain the TCP port where the server listens and the number of workers. The user name, password and the data source are passed via environment parameters.

    # the proxy executable
    ln -s $GOPATH/bin/mux .
    # the MySQL worker
    ln -s $GOPATH/bin/mysqlworker mysqlworker
    # to use the Oracle worker use oracleworker instead of mysqlworker

    # create the configuration file with the required configuration
    echo 'bind_ip=127.0.0.1' > hera.txt
    echo 'bind_port=11111' >> hera.txt
    echo 'opscfg.hera.server.max_connections=2' >> hera.txt
    # if using mysql run this
    # echo 'database_type=mysql' >> hera.txt

    # create minimal CAL configuration, needed by ops config
    echo 'cal_pool_name=stage_hera' > cal_client.txt

    # the database user name
    export username='user'
    # the database password
    export password='pass'
    # the data source
    export TWO_TASK='tcp(127.0.0.1:3306)/myschema'
    # for Oracle the datasource can be like '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=hostname)
    #    (PORT=12345)))(CONNECT_DATA=(SERVICE_NAME=sn)))'.
    # for Oracle only add to LD_LIBRARY_PATH environment variable the path to the shared libraries of the
    #    Oracle instant client

    # start
    ./mux --name hera-test

For details about the parameters see configuration

Running the client

There is a Java client implemented as JDBC driver. Please see the documentation for how to install and use it.

There is also a Go client implemented as SQL driver. Please see the example.

License

Hera is licensed under Apache 2.0.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].