Joe added a comment.

  I think the main question to answer is "does it make sense to create a safe 
regex evaluation service?".
  
  I think in a void the answer is "no". It could make sense to create a small 
C++ program wrapping the main re2 functionality and shell out to it from php.
  
  On the other hand, we have to consider the wikimedia infrastructure for this 
and there are two counterpoints to be made:
  
  - Is this a service we can only expect MediaWiki to call? If not, that's a 
point in favour of creating a separate service
  - Shelling out for us works well by using a combination of firejail and 
cgroups creation that won't work well in the future with cgroups v2 and 
containerization
  - Performance might not be extremely relevant
  
  Now on the last point: this proposal seems to worry a lot about performance, 
but I see no performance requirement spelled out. Without more context, both 
the choice of shelling out vs and RPC service, and the proposal to use gRPC for 
said service seem to me like premature optimizations.
  
  So my questions are:
  
  - What is the 95th percentile of latency in  validating all the constraint on 
an item when editing it?
  - What is the average, median and max number of regexes we need to validate 
per item?
  
  Without answering those questions, we would just make choices by principle, 
while I think we should have a more pragmatic approach.

TASK DETAIL
  https://phabricator.wikimedia.org/T240884

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Joe
Cc: Joe, WMDE-leszek, Volans, sbassett, Krinkle, Agabi10, 
Lucas_Werkmeister_WMDE, Addshore, Aklapper, Ladsgroup, darthmon_wmde, 
DannyS712, Nandana, kostajh, Lahi, Gq86, GoranSMilovanovic, RazeSoldier, 
QZanden, LawExplorer, _jensen, rosalieper, D3r1ck01, Scott_WUaS, Izno, SBisson, 
Perhelion, Wikidata-bugs, Base, aude, GWicke, Bawolff, jayvdb, fbstj, santhosh, 
Jdforrester-WMF, Mbch331, Rxy, Jay8g, Ltrlg, bd808, Legoktm
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to