xray-tech / xorc-xray

Xray / OAM
Apache License 2.0
6 stars 1 forks source link

Gateway service #6

Closed pimeys closed 6 years ago

pimeys commented 6 years ago

Gateway service

Introduction

Xray 1.0

As described by Xray 1.0 doc:

This service in a gateway that receives events from the SDK over HTTPS, applies authentication, transforms them into protobuf events, and then forwards the events to rule-engine-direct exchange. Additionally, the GW performs basic IDFA matching where if a registration request for a device whose IDFA we have already seen (and stored in AS) is received, we re-assign the existing entity id. This means if an application is uninstalled and re-installed whilst the devices IDFA remains the same, the same entity will be assigned.

Xray OAM

The new version should be modular, fast and reliable. It should scale horizontally and allow easy switching of databases when moving to the new platform. In the beginning it should be a direct replacement for the old system, routing events to the Xray 1.0 platform, and at the same time routing them to the new OAM system.

The old C++ version is to be rewritten with Rust, which gives us the same speed and resource usage with a better programming workflow, plenty of good libraries available easily using the Cargo dependency management, and much safer environment using the compiler's static checks, data race detection and lifetime guarantees. The new version should run in a similar thread pool, but having a reactor core allowing asynchronous IO in every thread.

When the final details of entity storing and Kafka events are decided, it should be easy to replace parts of the new system to allow smooth migration.

pimeys commented 6 years ago

Service is ready for deployments and the code is available here:

https://github.com/360dialog/xorc-gateway/

pimeys commented 6 years ago

Closed in favor of this ticket:

https://github.com/360dialog/xorc-xray-platform/issues/7