Highly Performant JavaScript Rules Engine
Main Author: | |
---|---|
Publication Date: | 2023 |
Format: | Master thesis |
Language: | eng |
Source: | Repositórios Científicos de Acesso Aberto de Portugal (RCAAP) |
Download full: | http://hdl.handle.net/10400.22/24067 |
Summary: | Jscrambler offers a product named Webpage Integrity, which actively monitors and blocks client-side behaviors of third-party scripts running in web applications. The product core is an agent that runs in the webpage, with a rules engine built into it, dictating actions the agent takes based on rules defined by the customer. Both the agent and its engine are built with JavaScript. JavaScript is a weakly-typed scripting language used all over the internet, running in almost all websites. Being a weakly-typed and extremely flexible language presents some difficulties, mainly lack of compilation-time optimization. To tackle this, it has a built-in Just-in-time compiler, which does runtime optimizations based on several heuristics, such as the number of functions executions, or the data type in its arguments. JavaScript rules engines are a tricky case of performance. Being a very flexible tool makes the code also be very flexible, accepting a multitude of arguments and data types, which leads to the Just-in-time compiler not optimizing the code to its fullest potential. This work creates a rules engine different from the ones that are freely available for JavaScript. Instead of interpreting the rules in real time by a very flexible engine, the rules are compiled into Just-in-time compilation friendly JavaScript code, which has the same functionality. Based on a realistic test model created from one of Jscrambler’s biggest customers, results show that compiling rules into JavaScript source code brings a performance boost of up to 60 times. Lastly, results show that the Just-in-time compiler does not bring any significant performance gains in a pure JavaScript rules engine with Just-in-time compilation friendly code. |
id |
RCAP_c4d6933d7a5f37a952d140194e4eecb4 |
---|---|
oai_identifier_str |
oai:recipp.ipp.pt:10400.22/24067 |
network_acronym_str |
RCAP |
network_name_str |
Repositórios Científicos de Acesso Aberto de Portugal (RCAAP) |
repository_id_str |
https://opendoar.ac.uk/repository/7160 |
spelling |
Highly Performant JavaScript Rules EngineJavaScriptPerformanceRules EngineJscrambler offers a product named Webpage Integrity, which actively monitors and blocks client-side behaviors of third-party scripts running in web applications. The product core is an agent that runs in the webpage, with a rules engine built into it, dictating actions the agent takes based on rules defined by the customer. Both the agent and its engine are built with JavaScript. JavaScript is a weakly-typed scripting language used all over the internet, running in almost all websites. Being a weakly-typed and extremely flexible language presents some difficulties, mainly lack of compilation-time optimization. To tackle this, it has a built-in Just-in-time compiler, which does runtime optimizations based on several heuristics, such as the number of functions executions, or the data type in its arguments. JavaScript rules engines are a tricky case of performance. Being a very flexible tool makes the code also be very flexible, accepting a multitude of arguments and data types, which leads to the Just-in-time compiler not optimizing the code to its fullest potential. This work creates a rules engine different from the ones that are freely available for JavaScript. Instead of interpreting the rules in real time by a very flexible engine, the rules are compiled into Just-in-time compilation friendly JavaScript code, which has the same functionality. Based on a realistic test model created from one of Jscrambler’s biggest customers, results show that compiling rules into JavaScript source code brings a performance boost of up to 60 times. Lastly, results show that the Just-in-time compiler does not bring any significant performance gains in a pure JavaScript rules engine with Just-in-time compilation friendly code.Sousa, Paulo Manuel Baltarejo deREPOSITÓRIO P.PORTOFerreira, Sérgio Filipe Santos2023-11-032026-11-03T00:00:00Z2023-11-03T00:00:00Zinfo:eu-repo/semantics/publishedVersioninfo:eu-repo/semantics/masterThesisapplication/pdfhttp://hdl.handle.net/10400.22/24067urn:tid:203381084enginfo:eu-repo/semantics/embargoedAccessreponame:Repositórios Científicos de Acesso Aberto de Portugal (RCAAP)instname:FCCN, serviços digitais da FCT – Fundação para a Ciência e a Tecnologiainstacron:RCAAP2025-03-07T10:04:43Zoai:recipp.ipp.pt:10400.22/24067Portal AgregadorONGhttps://www.rcaap.pt/oai/openaireinfo@rcaap.ptopendoar:https://opendoar.ac.uk/repository/71602025-05-29T00:30:53.794050Repositórios Científicos de Acesso Aberto de Portugal (RCAAP) - FCCN, serviços digitais da FCT – Fundação para a Ciência e a Tecnologiafalse |
dc.title.none.fl_str_mv |
Highly Performant JavaScript Rules Engine |
title |
Highly Performant JavaScript Rules Engine |
spellingShingle |
Highly Performant JavaScript Rules Engine Ferreira, Sérgio Filipe Santos JavaScript Performance Rules Engine |
title_short |
Highly Performant JavaScript Rules Engine |
title_full |
Highly Performant JavaScript Rules Engine |
title_fullStr |
Highly Performant JavaScript Rules Engine |
title_full_unstemmed |
Highly Performant JavaScript Rules Engine |
title_sort |
Highly Performant JavaScript Rules Engine |
author |
Ferreira, Sérgio Filipe Santos |
author_facet |
Ferreira, Sérgio Filipe Santos |
author_role |
author |
dc.contributor.none.fl_str_mv |
Sousa, Paulo Manuel Baltarejo de REPOSITÓRIO P.PORTO |
dc.contributor.author.fl_str_mv |
Ferreira, Sérgio Filipe Santos |
dc.subject.por.fl_str_mv |
JavaScript Performance Rules Engine |
topic |
JavaScript Performance Rules Engine |
description |
Jscrambler offers a product named Webpage Integrity, which actively monitors and blocks client-side behaviors of third-party scripts running in web applications. The product core is an agent that runs in the webpage, with a rules engine built into it, dictating actions the agent takes based on rules defined by the customer. Both the agent and its engine are built with JavaScript. JavaScript is a weakly-typed scripting language used all over the internet, running in almost all websites. Being a weakly-typed and extremely flexible language presents some difficulties, mainly lack of compilation-time optimization. To tackle this, it has a built-in Just-in-time compiler, which does runtime optimizations based on several heuristics, such as the number of functions executions, or the data type in its arguments. JavaScript rules engines are a tricky case of performance. Being a very flexible tool makes the code also be very flexible, accepting a multitude of arguments and data types, which leads to the Just-in-time compiler not optimizing the code to its fullest potential. This work creates a rules engine different from the ones that are freely available for JavaScript. Instead of interpreting the rules in real time by a very flexible engine, the rules are compiled into Just-in-time compilation friendly JavaScript code, which has the same functionality. Based on a realistic test model created from one of Jscrambler’s biggest customers, results show that compiling rules into JavaScript source code brings a performance boost of up to 60 times. Lastly, results show that the Just-in-time compiler does not bring any significant performance gains in a pure JavaScript rules engine with Just-in-time compilation friendly code. |
publishDate |
2023 |
dc.date.none.fl_str_mv |
2023-11-03 2023-11-03T00:00:00Z 2026-11-03T00:00:00Z |
dc.type.status.fl_str_mv |
info:eu-repo/semantics/publishedVersion |
dc.type.driver.fl_str_mv |
info:eu-repo/semantics/masterThesis |
format |
masterThesis |
status_str |
publishedVersion |
dc.identifier.uri.fl_str_mv |
http://hdl.handle.net/10400.22/24067 urn:tid:203381084 |
url |
http://hdl.handle.net/10400.22/24067 |
identifier_str_mv |
urn:tid:203381084 |
dc.language.iso.fl_str_mv |
eng |
language |
eng |
dc.rights.driver.fl_str_mv |
info:eu-repo/semantics/embargoedAccess |
eu_rights_str_mv |
embargoedAccess |
dc.format.none.fl_str_mv |
application/pdf |
dc.source.none.fl_str_mv |
reponame:Repositórios Científicos de Acesso Aberto de Portugal (RCAAP) instname:FCCN, serviços digitais da FCT – Fundação para a Ciência e a Tecnologia instacron:RCAAP |
instname_str |
FCCN, serviços digitais da FCT – Fundação para a Ciência e a Tecnologia |
instacron_str |
RCAAP |
institution |
RCAAP |
reponame_str |
Repositórios Científicos de Acesso Aberto de Portugal (RCAAP) |
collection |
Repositórios Científicos de Acesso Aberto de Portugal (RCAAP) |
repository.name.fl_str_mv |
Repositórios Científicos de Acesso Aberto de Portugal (RCAAP) - FCCN, serviços digitais da FCT – Fundação para a Ciência e a Tecnologia |
repository.mail.fl_str_mv |
info@rcaap.pt |
_version_ |
1833600570009583616 |