mozilla / remote-settings

Delivering data to Firefox
https://remote-settings.readthedocs.io/
Apache License 2.0
14 stars 13 forks source link

Support for MozJEXL in Android #84

Closed mostlygeek closed 5 years ago

mostlygeek commented 6 years ago

In the fretboard project the team is building A/B experiment and gradual rollout libraries. One of the discussions is about supporting filter. We introduced mozjexl support in RemoteSettingsV2 on Fx desktop. It's powered by the same JavaScript library as Normandy.

It would be good to support the same mozjexl filter expression format with the libraries being developed in Fretboard for Android Components. I don't have any idea what the best approach would be but the goal is to:

Info about Fretboard:

mostlygeek commented 6 years ago

Also see: https://github.com/mozilla/firefox-browser-architecture/pull/70

mostlygeek commented 6 years ago

Another option is to dump JEXL for something else. One option is Google's Common Expression Language. They have C++ and Go implementations.

From the CEL Readme:

Guiding philosophy:

  1. Keep it small & fast.
    • CEL evaluates in linear time, is mutation free, and not Turing-complete. This limitation is a feature of the language design, which allows the implementation to evaluate orders of magnitude faster than equivalently sandboxed JavaScript.
  2. Make it extensible.
    • CEL is designed to be embedded in applications, and allows for extensibility via its context which allows for functions and data to be provided by the software that embeds it.
  3. Developer-friendly.
    • The language is approachable to developers. The initial spec was based on the experience of developing Firebase Rules and usability testing many prior iterations.
    • The library itself and accompanying toolings should be easy to adopt by teams that seek to integrate CEL into their platforms.

It seems like it would be a good fit for what we want for it. It would be nice to compare this with how we've been using JEXL.

Something that came out of our weekly meeting was perhaps a rust implementation of this. However, since there is already a CPP implementation we might be able to leverage that directly.

mostlygeek commented 6 years ago

Also see: https://github.com/mozilla/product-delivery/issues/6, a proposal to replace JEXL with CEL

leplatrem commented 5 years ago

Another initative is on the way: Mobile Experiments https://docs.google.com/document/d/1C1k68VHKEhl1fp2oA_kkn23NZxsaloIIAJiukVQKgf0/edit#heading=h.kikb69snwwdr