xray-tech / xorc-xray

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

migrate 360dialog Orc code to OAM #4

Closed jsulmont closed 6 years ago

jsulmont commented 6 years ago

migrate 360dialog Orc code to OAM

introduction

Xray 1.0

From the Xray platform perspective, everything is an Orc program. As such a JSON doc describing a 360dialog CRM campaigns is turned into an Orc program by our json2orc transpiler.

The DAG-VM based Orc implementation in Xray 1.0 has serious limitations/restrictions (wrt. our Orc refereference implementation):

These limitations due to Xray 1.0 Orc's lack of expressiveness, resulted in unnecessary complexity in the Orc programs used by 360dialog (either transpiled or handwritten): we had to workaround missing Channels, otherwise, patterns and so forth, most of the time by "pushing" the business logic we could not express in Orc, to Lua scripting...

Xray OAM

Besides considerable performance improvments, and a rigorous implementation for all 4 Orc combinators (prune, sequence, parallel and otherwise), OAM's runtime provides a substantial subset of the Orc standard librairy:

scope and result

The scope for this epic is simple: migrate mutatis mutandis 360dialog's CRM Orc code to OAM. Ideally the successful completion of this task will result in the following deliveries:

  1. a (360dialog) CRM Orc library,
  2. specification for a set of CRM specific sites together with an environment capable of servicing them,
  3. a new json2orc transpiler, generating code for 1. and 2. above, and
  4. a framework for testing/accepting the migration.

migration strategies

top down: start from the business logic itself

Go through various currently supported campaigns asking oneself: given OAM, what's the most efficient, minimal and elegant way to express what it is that we are trying to do with these campaigns.

bottom up: start from the code itself

Go throught all the code (both Orc and Lua) and "mecanically" port to Orc.

Most likely both strategies will be applied simultanously.

adriandoonan commented 6 years ago

moved to platform repo and main project board as
Migrate CRM/360 business logic to OAM #2