Andun S.L. GunawardanaSoftware Engineering InternApplication Server TeamDevelopment Technology GroupWSO2 Lanka (Pvt) Ltd
Projects Within Internship  Main Projects:  Entitlement Servlet Filter Feature  RawXSLT Mediator for WSO2 ESB  New XPATH P...
Projects Within Internship  Main Projects:  Entitlement Servlet Filter Feature  RawXSLT Mediator for WSO2 ESB  New XPATH P...
Entitlement Servlet Filter Feature   Requirement :    Providing XACML policy based fine grained    authorization to webap...
Entitlement Servlet Filter Feature   Step sequence to take an Entitlement    Decision :
Entitlement Servlet Filter Feature   Components Added to the Carbon    Platform :    • Entitlement PEP Proxy Component   ...
Entitlement Servlet Filter Feature   Components Added to the Carbon    Platform :    • Entitlement PEP Proxy Component   ...
Entitlement Servlet Filter Feature   Use of Entitlement Proxy Component :    ◦ Act as a proxy for communication between  ...
Entitlement Servlet Filter Feature   Entitlement Proxy Component :
Entitlement Servlet Filter Feature   Why Entitlement Proxy Component ?    ◦ Make User Life Easy,       User have to invo...
Entitlement Servlet Filter Feature   Components Added to the Carbon    Platform :    • Entitlement PEP Proxy Component   ...
Entitlement Servlet Filter Feature   Use of Entitlement Servlet Filter    Component :    ◦ Act as the PEP.    ◦ Checking ...
Entitlement Servlet Filter Feature   Entitlement Servlet Filter Component :
Entitlement Servlet Filter Feature   How to use Entitlement Servlet Filter    Component :    ◦ The webapp have to engage ...
Entitlement Servlet Filter Feature How to use Entitlement Servlet Filter  Component :
Entitlement Servlet Filter Feature   Components Added to the Carbon    Platform :    • Entitlement PEP Proxy Component   ...
Entitlement Servlet Filter Feature Entitlement Servlet Filter Feature can be found in the  Carbon 4.0.2 P2 repo. Entitle...
Projects Within Internship  Main Projects:  Entitlement Servlet Filter Feature  RawXSLT Mediator for WSO2 ESB  New XPATH P...
RawXSLT Mediator   Requirement :    ◦ Creating a performance improved XSLT      transformation Mediator.    ◦ Do XSLT tra...
RawXSLT Mediator   Weaknesses of the Existing XSLT    Mediator :    ◦ It build AXIOM data model for each message. So bit ...
RawXSLT Mediator   How RawXSLT Mediator Works ?
RawXSLT Mediator   Improvement :                 Requests Handled Per Second : Message Size 500B    3,000.00    2,500.00 ...
RawXSLT Mediator   Improvement :                   Requests Handled Per Second : Message Size 1K    2,000.00    1,800.00 ...
RawXSLT Mediator   Improvement :                   Requests Handled Per Second : Message Size 5K    1,200.00    1,000.00 ...
RawXSLT Mediator   Improvement :                 Requests Handled Per Second : Message Size 10K    600.00    500.00    40...
RawXSLT Mediator   Limitations of the RawXSLT Mediator :    ◦ It can be only used in Binary Relay Mode of ESB.    ◦ The X...
Projects Within Internship  Main Projects:  Entitlement Servlet Filter Feature  RawXSLT Mediator for WSO2 ESB  New XPATH P...
New XPATH Parser   Requirement :    ◦ Create a XAPTH parser which will suite to parse      simple XPATH expressions with ...
New XPATH Parser   Weaknesses of the Current XPATH    Parser :    ◦ It reads and build full XML tree for parse XPATH     ...
New XPATH Parser   Lets XPATH : /data/book/author/name with the    following XML,
Entitlement Servlet Filter Feature   New implementation of XPATH Parser:    ◦ Create small components which are responsib...
New XPATH Parser   Using those created small components we can get a    result of a XPATH expression,
New XPATH Parser   New implementation of XPATH Parser:    ◦ So the new XAPTH parser will do the following,    ◦ When we g...
New XPATH Parser   The Syntax Tree For a XAPTH Using Antlr,
New XPATH Parser   Improvement :                Requests Handled Per Second : Message Size 10K    4,000.00    3,500.00   ...
Projects Within Internship  Main Projects:  Entitlement Servlet Filter Feature  RawXSLT Mediator for WSO2 ESB  New XPATH P...
Refactoring App Server Samples ◦ Adding Apache Ant Build Files to the APP Server   samples, with more flexibility to run  ...
Projects Within Internship  Main Projects:  Entitlement Servlet Filter Feature  RawXSLT Mediator for WSO2 ESB  New XPATH P...
Test Automation Hackathon ◦ Wrote number of test cases to WSO2 ESB.   Mediators, Endpoints,VFS Tranport ◦ Added improveme...
Projects Within Internship    Related Links :     ◦ http://www.insightforfuture.blogspot.com/2012/09/xacml-policy-definit...
What I Learn at WSO2 •   WSO2 Specific •   Technologies •   Products & Tools •   Software Engineering Principals •   Best ...
What I Learn at WSO2 •   WSO2 Specific •   Technologies •   Products & Tools •   Software Engineering Principals •   Best ...
WSO2 Specific ◦   Application Server ◦   ESB ◦   Identity Server ◦   Carbon Platform ◦   Clarity Framework ◦   Source Code...
What I Learn at WSO2 •   WSO2 Specific •   Technologies •   Products & Tools •   Software Engineering Principals •   Best ...
Technologies ◦   JAVA : In-depth Use, Libraries ◦   SOAP ◦   XACML ◦   XPATH/XSLT ◦   JSP ◦   OSGI
What I Learn at WSO2 •   WSO2 Specific •   Technologies •   Products & Tools •   Software Engineering Principals •   Best ...
Products & Tools ◦   Apache Axis2     ◦   Sonar ◦   Apache Synapse   ◦   FindBugs ◦   Apache Tomcat    ◦   JConsole ◦   Sa...
What I Learn at WSO2 •   WSO2 Specific •   Technologies •   Products & Tools •   Software Engineering Principals •   Best ...
Software Engineering Principles ◦   Service Oriented Architecture ◦   Cloud Computing ◦   Agile Development Process ◦   Cu...
What I Learn at WSO2 •   WSO2 Specific •   Technologies •   Products & Tools •   Software Engineering Principals •   Best ...
Best Practices ◦   Code Quality ◦   Developer Testing ◦   Performance Testing ◦   Documentation ◦   Version Controlling ◦ ...
Thank You
Upcoming SlideShare
Loading in …5
×

What I did in My Internship @ WSO2

1,162 views

Published on

What I did in My Internship @ WSO2

Published in: Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,162
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
52
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

What I did in My Internship @ WSO2

  1. 1. Andun S.L. GunawardanaSoftware Engineering InternApplication Server TeamDevelopment Technology GroupWSO2 Lanka (Pvt) Ltd
  2. 2. Projects Within Internship Main Projects: Entitlement Servlet Filter Feature RawXSLT Mediator for WSO2 ESB New XPATH Parser for WSO2 ESB Other Projects: Refactoring WSO2 Application Server Samples Test Automation Hackathon
  3. 3. Projects Within Internship Main Projects: Entitlement Servlet Filter Feature RawXSLT Mediator for WSO2 ESB New XPATH Parser for WSO2 ESB Other Projects: Refactoring WSO2 Application Server Samples Test Automation Hackathon
  4. 4. Entitlement Servlet Filter Feature Requirement : Providing XACML policy based fine grained authorization to webapp requests, using WSO2 Identity Server.
  5. 5. Entitlement Servlet Filter Feature Step sequence to take an Entitlement Decision :
  6. 6. Entitlement Servlet Filter Feature Components Added to the Carbon Platform : • Entitlement PEP Proxy Component • Entitlement Servlet Filter Component • XACML Filter Feature • Sample for WSO2 Application Server 5.0.1
  7. 7. Entitlement Servlet Filter Feature Components Added to the Carbon Platform : • Entitlement PEP Proxy Component • Entitlement Servlet Filter Component • XACML Filter Feature • Sample for WSO2 Application Server 5.0.1
  8. 8. Entitlement Servlet Filter Feature Use of Entitlement Proxy Component : ◦ Act as a proxy for communication between WSO2 IS(PDP) and PEP. ◦ Entitlement Servlet Filter and the Entitlement Mediator use this new component.
  9. 9. Entitlement Servlet Filter Feature Entitlement Proxy Component :
  10. 10. Entitlement Servlet Filter Feature Why Entitlement Proxy Component ? ◦ Make User Life Easy,  User have to invoke a method in the proxy to get a entitlement decision.  User dont have to implement XACML request related things to use a XACML policy hosted in IS. The proxy hides those complexity from user.  User can use SOAP, Thrift or JSON to PDP PEP communication without worrying about the implementations. ◦ Entitlement requests can be sent either using XACML 3.0 or XACML 2.0. ◦ Several PEPs can use same Proxy to communicate with several PDPs(WSO2 IS instances) at the same time.
  11. 11. Entitlement Servlet Filter Feature Components Added to the Carbon Platform : • Entitlement PEP Proxy Component • Entitlement Servlet Filter Component • XACML Filter Feature • Sample for WSO2 Application Server 5.0.1
  12. 12. Entitlement Servlet Filter Feature Use of Entitlement Servlet Filter Component : ◦ Act as the PEP. ◦ Checking the authorization of requests which are coming for webapps which are hosted in WSO2 Application Server or Any other WebApp container.
  13. 13. Entitlement Servlet Filter Feature Entitlement Servlet Filter Component :
  14. 14. Entitlement Servlet Filter Feature How to use Entitlement Servlet Filter Component : ◦ The webapp have to engage the Entitlement Servlet filter using the web.xml. ◦ Necessary parameters to initialize the PEP proxy have to be provided via the web.xml ◦ The webapp must have a J2EE authentication mechanism.
  15. 15. Entitlement Servlet Filter Feature How to use Entitlement Servlet Filter Component :
  16. 16. Entitlement Servlet Filter Feature Components Added to the Carbon Platform : • Entitlement PEP Proxy Component • Entitlement Servlet Filter Component • XACML Filter Feature • Sample for WSO2 Application Server 5.0.1
  17. 17. Entitlement Servlet Filter Feature Entitlement Servlet Filter Feature can be found in the Carbon 4.0.2 P2 repo. Entitlement Servlet Filter Feature ships with Application Server 5.0.1 with a Sample to illustrate it’s functionality.
  18. 18. Projects Within Internship Main Projects: Entitlement Servlet Filter Feature RawXSLT Mediator for WSO2 ESB New XPATH Parser for WSO2 ESB Other Projects: Refactoring WSO2 Application Server Samples Test Automation Hackathon
  19. 19. RawXSLT Mediator Requirement : ◦ Creating a performance improved XSLT transformation Mediator. ◦ Do XSLT transformations in the Binary Relay Mode of the WSO2 ESB.
  20. 20. RawXSLT Mediator Weaknesses of the Existing XSLT Mediator : ◦ It build AXIOM data model for each message. So bit large messages will add hugh performance drawback. ◦ To overcome that Stream Level Transformation is suggested, without creating AXIOM data model.
  21. 21. RawXSLT Mediator How RawXSLT Mediator Works ?
  22. 22. RawXSLT Mediator Improvement : Requests Handled Per Second : Message Size 500B 3,000.00 2,500.00 2,000.00 1,500.00 1,000.00 500.00 0.00 n =5000, n =2500, n =1250, n =625, n =250, n =125, n =50, c=10 c=20 c=40 c=80 c=200 c=400 c=1000 Normal XSLT Mediator RawXSLT Mediator
  23. 23. RawXSLT Mediator Improvement : Requests Handled Per Second : Message Size 1K 2,000.00 1,800.00 1,600.00 1,400.00 1,200.00 1,000.00 800.00 600.00 400.00 200.00 0.00 n =5000, n =2500, n =1250, n =625, n =250, n =125, n =50, c=10 c=20 c=40 c=80 c=200 c=400 c=1000 Normal XSLT Mediator RawXSLT Mediator
  24. 24. RawXSLT Mediator Improvement : Requests Handled Per Second : Message Size 5K 1,200.00 1,000.00 800.00 600.00 400.00 200.00 0.00 n =5000, n =2500, n =1250, n =625, n =250, n =125, n =50, c=10 c=20 c=40 c=80 c=200 c=400 c=1000 Normal XSLT Mediator RawXSLT Mediator
  25. 25. RawXSLT Mediator Improvement : Requests Handled Per Second : Message Size 10K 600.00 500.00 400.00 300.00 200.00 100.00 0.00 n =5000, c=10 n =2500, c=20 n =1250, c=40 n =250, c=200 n =50, c=1000 Normal XSLT Mediator RawXSLT Mediator
  26. 26. RawXSLT Mediator Limitations of the RawXSLT Mediator : ◦ It can be only used in Binary Relay Mode of ESB. ◦ The XSLT transformation sheets have mandatory conditions. So flexibility of the transformation is limited.
  27. 27. Projects Within Internship Main Projects: Entitlement Servlet Filter Feature RawXSLT Mediator for WSO2 ESB New XPATH Parser for WSO2 ESB Other Projects: Refactoring WSO2 Application Server Samples Test Automation Hackathon
  28. 28. New XPATH Parser Requirement : ◦ Create a XAPTH parser which will suite to parse simple XPATH expressions with better performance.
  29. 29. New XPATH Parser Weaknesses of the Current XPATH Parser : ◦ It reads and build full XML tree for parse XPATH which can be parsed without building the complete tree. ◦ That is a big performance drawback, so new XPATH parser is suggested which can parse simple XPATH expression with better performance using Streams of XML and on top of AXIOM.
  30. 30. New XPATH Parser Lets XPATH : /data/book/author/name with the following XML,
  31. 31. Entitlement Servlet Filter Feature New implementation of XPATH Parser: ◦ Create small components which are responsible to do simple operations to AXIOM data model. ◦ For Example,  Component to return XML node if it matches some conditions.  Component to return set of children of a XML node if it matches some conditions.  Component to return an attribute of a XML node.
  32. 32. New XPATH Parser Using those created small components we can get a result of a XPATH expression,
  33. 33. New XPATH Parser New implementation of XPATH Parser: ◦ So the new XAPTH parser will do the following, ◦ When we give a XPATH expression to the parser it will create the component chain which will do the processing to get the result of the XAPTH. ◦ When the parsing happens, the input XML is passed though the component chain and output the result. ◦ To create the component chain we have analyze the given XPATH expression. ◦ For that We use Antlr Parser Generator.
  34. 34. New XPATH Parser The Syntax Tree For a XAPTH Using Antlr,
  35. 35. New XPATH Parser Improvement : Requests Handled Per Second : Message Size 10K 4,000.00 3,500.00 3,000.00 2,500.00 2,000.00 1,500.00 1,000.00 500.00 0.00 n =50, n =100, n =200, n =400, n =800, n =2000, c=2000 c=1000 c=500 c=250 c=125 c=50 Synapse XPATH New XPATH
  36. 36. Projects Within Internship Main Projects: Entitlement Servlet Filter Feature RawXSLT Mediator for WSO2 ESB New XPATH Parser for WSO2 ESB Other Projects: Refactoring WSO2 Application Server Samples Test Automation Hackathon
  37. 37. Refactoring App Server Samples ◦ Adding Apache Ant Build Files to the APP Server samples, with more flexibility to run independently. ◦ Added run scripts to samples which will make the samples complete. ◦ Structuring samples with necessary documents. ◦ Creating Wiki Docs for the Samples. ◦ Refactored JAX-WS & JAX-RS samples to run with in the current platform.
  38. 38. Projects Within Internship Main Projects: Entitlement Servlet Filter Feature RawXSLT Mediator for WSO2 ESB New XPATH Parser for WSO2 ESB Other Projects: Refactoring WSO2 Application Server Samples Test Automation Hackathon
  39. 39. Test Automation Hackathon ◦ Wrote number of test cases to WSO2 ESB.  Mediators, Endpoints,VFS Tranport ◦ Added improvement to Clarity Test Framework.  REST Support  Failover Test Support  Load Balance Endpoint Test Support ◦ Added a alternative mechanism to check ESB logs using custom Mediator. This required because ESB’s Log Reading Functionality is broken.
  40. 40. Projects Within Internship  Related Links : ◦ http://www.insightforfuture.blogspot.com/2012/09/xacml-policy-definition- pointpdp-proxy.html ◦ http://www.insightforfuture.blogspot.com/2012/07/providing-xacml-fine- grained.html ◦ http://www.insightforfuture.blogspot.com/2012/07/providing-xacml-fine- grained_22.html ◦ http://docs.wso2.org/wiki/display/AS501/Entitlement+Servlet+Filter+Sample ◦ http://wso2.org/svn/browse/wso2/carbon/platform/branches/4.0.0/components/id entity/org.wso2.carbon.identity.entitlement.proxy/ ◦ http://wso2.org/svn/browse/wso2/carbon/platform/branches/4.0.0/components/id entity/org.wso2.carbon.identity.entitlement.filter/ ◦ http://wso2.org/svn/browse/wso2/carbon/platform/branches/4.0.0/features/identi ty/xacml/org.wso2.carbon.identity.xacml.filter.feature/ ◦ http://wso2.org/svn/browse/wso2/carbon/platform/branches/4.0.0/products/as/5. 0.1/modules/samples/product/EntitlementFilter/
  41. 41. What I Learn at WSO2 • WSO2 Specific • Technologies • Products & Tools • Software Engineering Principals • Best Practices
  42. 42. What I Learn at WSO2 • WSO2 Specific • Technologies • Products & Tools • Software Engineering Principals • Best Practices
  43. 43. WSO2 Specific ◦ Application Server ◦ ESB ◦ Identity Server ◦ Carbon Platform ◦ Clarity Framework ◦ Source Code Management ◦ Release Cycle ◦ Support Strategy ◦ Developer Studio
  44. 44. What I Learn at WSO2 • WSO2 Specific • Technologies • Products & Tools • Software Engineering Principals • Best Practices
  45. 45. Technologies ◦ JAVA : In-depth Use, Libraries ◦ SOAP ◦ XACML ◦ XPATH/XSLT ◦ JSP ◦ OSGI
  46. 46. What I Learn at WSO2 • WSO2 Specific • Technologies • Products & Tools • Software Engineering Principals • Best Practices
  47. 47. Products & Tools ◦ Apache Axis2 ◦ Sonar ◦ Apache Synapse ◦ FindBugs ◦ Apache Tomcat ◦ JConsole ◦ Saxon ◦ JMeter ◦ Antlr ◦ JProfiler ◦ AXIOM ◦ TCPMon ◦ Intellij IDEA ◦ Bamboo ◦ Maven ◦ JIRA ◦ Ant ◦ SVN ◦ SOAP UI
  48. 48. What I Learn at WSO2 • WSO2 Specific • Technologies • Products & Tools • Software Engineering Principals • Best Practices
  49. 49. Software Engineering Principles ◦ Service Oriented Architecture ◦ Cloud Computing ◦ Agile Development Process ◦ Customer Requirement Analysis ◦ Documentation ◦ Software Evolution ◦ Testing and Quality Assurance ◦ Providing Support to Customers
  50. 50. What I Learn at WSO2 • WSO2 Specific • Technologies • Products & Tools • Software Engineering Principals • Best Practices
  51. 51. Best Practices ◦ Code Quality ◦ Developer Testing ◦ Performance Testing ◦ Documentation ◦ Version Controlling ◦ Discussing Ideas
  52. 52. Thank You

×