SlideShare a Scribd company logo
EMF Model Query2-The next generation model query languageSaurav Sarkar, SAP Labs India, BangaloreEclipse DayTalk – May 6th 2011Saurav Sarkar-EMF Model Query2
Need for model queryingSaurav Sarkar-EMF Model Query2Need for EMF is well known. Once the application is on EMF then the need for querying arises.Querying for objects, types of objects and the links between the objects becomes an utmost necessity.
EMF Model Query and EMF Model Query2EMF Query is a subproject under EMF project which again has two features EMF Model Query and EMF Model Query2.Major difference between the two is in terms of the scalability.EMF Model Query execute queries by loading all the resources in the memory.EMF Model Query2 in comparison execute queries by minimally loading the resources .Saurav Sarkar-EMF Model Query2
Key aspects of QueryingSaurav Sarkar-EMF Model Query2
Key features of Model Query2Scalable Query execution engine and retrieval  of results of interest.Dirty state awareness.Ways of expressing Queries. AST and Textual.New XText based SQL like human readable language.Testing the model through the XText based UI.Pre configuring scoping before execution of queries.Queries are type safe.Saurav Sarkar-EMF Model Query2
Query Editor and SQL Like QueriesSaurav Sarkar-EMF Model Query2
Query Execution and ResultsSaurav Sarkar-EMF Model Query2
Query Preference pageSaurav Sarkar-EMF Model Query2
Query View-Viewing the QueriesSaurav Sarkar-EMF Model Query2
AST Based Query Syntax example@Testpublic void testLibrary(){final ResourceSetrs = new ResourceSetImpl();FromTypefromRelationShip = new FromType("lib", EcoreUtil.getURI(LibraryPackage.eINSTANCE.getLibrary()), false);FromEntry[] fromEntries = new FromEntry[] { fromRelationShip };SelectAlias selectMe = new SelectAlias("lib");SelectEntry[] selectEntries = new SelectEntry[] { selectMe };Query query = new Query(selectEntries, fromEntries);ResultSet execute = QueryProcessorFactory.getDefault().createQueryProcessor(getDefaultIndexStore()).execute(query, getQueryContext(rs));}Saurav Sarkar-EMF Model Query2
Architectural OverviewSaurav Sarkar-EMF Model Query2
Architecture – Interpreter and the storage processorsSaurav Sarkar-EMF Model Query2
Indexing in Query2Saurav Sarkar-EMF Model Query2Index provides information for narrowing the scope of resources that have to be loaded during execution.It contains data about resources, Eobjects and references between them. Index is able to rapidly answers queries for resources , elements and one step reference navigation-forward and backward.Indexes can be paged, dumped and loaded according to user scenarios.
Index  Data StructuresSaurav Sarkar-EMF Model Query2The Index is stored in the granularity of an EMF resource as a page.A ResourceDescriptor corresponds to a resource.The ResourceDescriptor then further can aggregate number of ReferenceDescriptor and EObjectDescriptor.
Type of IndicesSaurav Sarkar-EMF Model Query2
Index QueriesSaurav Sarkar-EMF Model Query2Index implementation also supports queries to be performed.Queries can be performed to retrieve resource, type and reference information.Queries can be performed on the descriptors.
Introducing Index ViewSaurav Sarkar-EMF Model Query2To facilitate the users to view the resources which have been indexed, Query 2 provides a dedicated view called Index View.Index View displays the indices in two broad categories:- Resource Index and Type Index.More details of Index View on the developer guide.
Demo of Index ViewSaurav Sarkar-EMF Model Query2
Dirty state HandlingSaurav Sarkar-EMF Model Query2Query engine is aware of the dirty state of the resources i.e. the results are returned depending upon the state of the resources.Tooling support is available for dirty state execution of queries.
Execution of Query with Dirty state awareness.Saurav Sarkar-EMF Model Query2
Demo of Dirty state HandlingSaurav Sarkar-EMF Model Query2Query engine is aware of the dirty state of the resources i.e. the results are returned depending upon the state of the resources.Tooling support is available for dirty state execution of queries.
Development tooling and scenarios achieved through Query2- SearchingSaurav Sarkar-EMF Model Query2Searching of model elements can be done using  Query2 without actually loading the elements.A search UI was developed to test the scenario.
Search EMF Models using Query2Saurav Sarkar-EMF Model Query2
Development tooling and scenarios achieved through Query2- RefactoringSaurav Sarkar-EMF Model Query2Refactoring of model elements requires references to be updated.Using query2 reference searches can be performed which in turn loads minimal resources and hence fast refactoring can be achieved.
Refactoring of EMF Models using Query2Saurav Sarkar-EMF Model Query2
Query2- View ModelsSaurav Sarkar-EMF Model Query2Models can be viewed without actually loading the model elements.A model explorer was implemented to prove the scenario.
Junits in Query280 % of the major scenarios are covered through JUnits.Sneak peek into Junits to see the Query execution code.Saurav Sarkar-EMF Model Query2
Planned new featuresImplementing Query2 Execution in Databases.Integration of CDO with Query2.https://bugs.eclipse.org/bugs/show_bug.cgi?id=329723Indexing enhancements like Pluggable Index builder, Indexing APIs.Date and BigInteger support in Query2https://bugs.eclipse.org/bugs/show_bug.cgi?id=338164Saurav Sarkar-EMF Model Query2
Useful links and feedbackUpdate site link https://hudson.eclipse.org/hudson/job/tycho-query2-nightly/lastSuccessfulBuild/artifact/targetPlatform/Query2 wiki homehttp://wiki.eclipse.org/EMF_Query2HomeQuery2 developer guidehttp://wiki.eclipse.org/EMF_Query2Home/EMF_Query2DevGuideFor any questions, suggestions and feedback on Query please mail to saurav.sarkar@sap.com or ashwani.kr.sharma@sap.comYou can also ask questions on the EMF forums.Saurav Sarkar-EMF Model Query2

More Related Content

PPT
Modeling Search Computing Applications
PPTX
EMF-IncQuery presentation at TOOLS 2012
PDF
Transzformációk integrált alkalmazása a modellvezérelt szoftverfejlesztésben
PDF
11.query optimization to improve performance of the code execution
PDF
The SENSORIA Development Environment
PDF
Incremental pattern matching in the VIATRA2 model transformation system
PDF
Efficient model transformations by combining pattern matching strategies
PPTX
Model visualization made easy: Incremental query-driven views in modeling tools
Modeling Search Computing Applications
EMF-IncQuery presentation at TOOLS 2012
Transzformációk integrált alkalmazása a modellvezérelt szoftverfejlesztésben
11.query optimization to improve performance of the code execution
The SENSORIA Development Environment
Incremental pattern matching in the VIATRA2 model transformation system
Efficient model transformations by combining pattern matching strategies
Model visualization made easy: Incremental query-driven views in modeling tools

Similar to Query2 eclipse day (11)

PDF
IncQuery Labs Models 2020 MIP Talk
PDF
EMF-IncQuery 0.7 Presentation for Itemis
PDF
A tutorial on EMF-IncQuery
PPTX
EMF-IncQuery: Blazing-fast reaction time even for very large diagrams (Sirius...
PPTX
IncQuery-D: Distributed Incremental Model Queries over the Cloud: Engineerin...
PPTX
Incremental Model Queries for Model-Dirven Software Engineering
PDF
SERENE 2014 School: Incremental Model Queries over the Cloud
PDF
SERENE 2014 School: Daniel varro serene2014_school
PPTX
Local search-based pattern matching features in EMF-IncQuery
ODP
Fast, Faster and Super-Fast Queries
PPTX
IncQuery gets Sirius: faster and better diagrams
IncQuery Labs Models 2020 MIP Talk
EMF-IncQuery 0.7 Presentation for Itemis
A tutorial on EMF-IncQuery
EMF-IncQuery: Blazing-fast reaction time even for very large diagrams (Sirius...
IncQuery-D: Distributed Incremental Model Queries over the Cloud: Engineerin...
Incremental Model Queries for Model-Dirven Software Engineering
SERENE 2014 School: Incremental Model Queries over the Cloud
SERENE 2014 School: Daniel varro serene2014_school
Local search-based pattern matching features in EMF-IncQuery
Fast, Faster and Super-Fast Queries
IncQuery gets Sirius: faster and better diagrams
Ad

Recently uploaded (20)

PPT
Teaching material agriculture food technology
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Empathic Computing: Creating Shared Understanding
PDF
Machine learning based COVID-19 study performance prediction
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Encapsulation_ Review paper, used for researhc scholars
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Teaching material agriculture food technology
MYSQL Presentation for SQL database connectivity
Dropbox Q2 2025 Financial Results & Investor Presentation
Empathic Computing: Creating Shared Understanding
Machine learning based COVID-19 study performance prediction
Mobile App Security Testing_ A Comprehensive Guide.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Diabetes mellitus diagnosis method based random forest with bat algorithm
Encapsulation_ Review paper, used for researhc scholars
The AUB Centre for AI in Media Proposal.docx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Big Data Technologies - Introduction.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Spectroscopy.pptx food analysis technology
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Spectral efficient network and resource selection model in 5G networks
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Programs and apps: productivity, graphics, security and other tools
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Ad

Query2 eclipse day

  • 1. EMF Model Query2-The next generation model query languageSaurav Sarkar, SAP Labs India, BangaloreEclipse DayTalk – May 6th 2011Saurav Sarkar-EMF Model Query2
  • 2. Need for model queryingSaurav Sarkar-EMF Model Query2Need for EMF is well known. Once the application is on EMF then the need for querying arises.Querying for objects, types of objects and the links between the objects becomes an utmost necessity.
  • 3. EMF Model Query and EMF Model Query2EMF Query is a subproject under EMF project which again has two features EMF Model Query and EMF Model Query2.Major difference between the two is in terms of the scalability.EMF Model Query execute queries by loading all the resources in the memory.EMF Model Query2 in comparison execute queries by minimally loading the resources .Saurav Sarkar-EMF Model Query2
  • 4. Key aspects of QueryingSaurav Sarkar-EMF Model Query2
  • 5. Key features of Model Query2Scalable Query execution engine and retrieval of results of interest.Dirty state awareness.Ways of expressing Queries. AST and Textual.New XText based SQL like human readable language.Testing the model through the XText based UI.Pre configuring scoping before execution of queries.Queries are type safe.Saurav Sarkar-EMF Model Query2
  • 6. Query Editor and SQL Like QueriesSaurav Sarkar-EMF Model Query2
  • 7. Query Execution and ResultsSaurav Sarkar-EMF Model Query2
  • 8. Query Preference pageSaurav Sarkar-EMF Model Query2
  • 9. Query View-Viewing the QueriesSaurav Sarkar-EMF Model Query2
  • 10. AST Based Query Syntax example@Testpublic void testLibrary(){final ResourceSetrs = new ResourceSetImpl();FromTypefromRelationShip = new FromType("lib", EcoreUtil.getURI(LibraryPackage.eINSTANCE.getLibrary()), false);FromEntry[] fromEntries = new FromEntry[] { fromRelationShip };SelectAlias selectMe = new SelectAlias("lib");SelectEntry[] selectEntries = new SelectEntry[] { selectMe };Query query = new Query(selectEntries, fromEntries);ResultSet execute = QueryProcessorFactory.getDefault().createQueryProcessor(getDefaultIndexStore()).execute(query, getQueryContext(rs));}Saurav Sarkar-EMF Model Query2
  • 12. Architecture – Interpreter and the storage processorsSaurav Sarkar-EMF Model Query2
  • 13. Indexing in Query2Saurav Sarkar-EMF Model Query2Index provides information for narrowing the scope of resources that have to be loaded during execution.It contains data about resources, Eobjects and references between them. Index is able to rapidly answers queries for resources , elements and one step reference navigation-forward and backward.Indexes can be paged, dumped and loaded according to user scenarios.
  • 14. Index Data StructuresSaurav Sarkar-EMF Model Query2The Index is stored in the granularity of an EMF resource as a page.A ResourceDescriptor corresponds to a resource.The ResourceDescriptor then further can aggregate number of ReferenceDescriptor and EObjectDescriptor.
  • 15. Type of IndicesSaurav Sarkar-EMF Model Query2
  • 16. Index QueriesSaurav Sarkar-EMF Model Query2Index implementation also supports queries to be performed.Queries can be performed to retrieve resource, type and reference information.Queries can be performed on the descriptors.
  • 17. Introducing Index ViewSaurav Sarkar-EMF Model Query2To facilitate the users to view the resources which have been indexed, Query 2 provides a dedicated view called Index View.Index View displays the indices in two broad categories:- Resource Index and Type Index.More details of Index View on the developer guide.
  • 18. Demo of Index ViewSaurav Sarkar-EMF Model Query2
  • 19. Dirty state HandlingSaurav Sarkar-EMF Model Query2Query engine is aware of the dirty state of the resources i.e. the results are returned depending upon the state of the resources.Tooling support is available for dirty state execution of queries.
  • 20. Execution of Query with Dirty state awareness.Saurav Sarkar-EMF Model Query2
  • 21. Demo of Dirty state HandlingSaurav Sarkar-EMF Model Query2Query engine is aware of the dirty state of the resources i.e. the results are returned depending upon the state of the resources.Tooling support is available for dirty state execution of queries.
  • 22. Development tooling and scenarios achieved through Query2- SearchingSaurav Sarkar-EMF Model Query2Searching of model elements can be done using Query2 without actually loading the elements.A search UI was developed to test the scenario.
  • 23. Search EMF Models using Query2Saurav Sarkar-EMF Model Query2
  • 24. Development tooling and scenarios achieved through Query2- RefactoringSaurav Sarkar-EMF Model Query2Refactoring of model elements requires references to be updated.Using query2 reference searches can be performed which in turn loads minimal resources and hence fast refactoring can be achieved.
  • 25. Refactoring of EMF Models using Query2Saurav Sarkar-EMF Model Query2
  • 26. Query2- View ModelsSaurav Sarkar-EMF Model Query2Models can be viewed without actually loading the model elements.A model explorer was implemented to prove the scenario.
  • 27. Junits in Query280 % of the major scenarios are covered through JUnits.Sneak peek into Junits to see the Query execution code.Saurav Sarkar-EMF Model Query2
  • 28. Planned new featuresImplementing Query2 Execution in Databases.Integration of CDO with Query2.https://bugs.eclipse.org/bugs/show_bug.cgi?id=329723Indexing enhancements like Pluggable Index builder, Indexing APIs.Date and BigInteger support in Query2https://bugs.eclipse.org/bugs/show_bug.cgi?id=338164Saurav Sarkar-EMF Model Query2
  • 29. Useful links and feedbackUpdate site link https://hudson.eclipse.org/hudson/job/tycho-query2-nightly/lastSuccessfulBuild/artifact/targetPlatform/Query2 wiki homehttp://wiki.eclipse.org/EMF_Query2HomeQuery2 developer guidehttp://wiki.eclipse.org/EMF_Query2Home/EMF_Query2DevGuideFor any questions, suggestions and feedback on Query please mail to saurav.sarkar@sap.com or ashwani.kr.sharma@sap.comYou can also ask questions on the EMF forums.Saurav Sarkar-EMF Model Query2

Editor's Notes

  • #3: Talk about Intro to EMF Model Query2Why Model Query2 is requiredDemos
  • #4: How EMF Query is placed under EMF project.Why EMF Query2 when EMF Query was already there.Major catch.
  • #5: Response time: Query2 queries very fast.Scoping: Scoping can be mentioned while running the queries.Scoping can be global and as well as inclusive.Type safety : Queries have to according to type of modelDirty state: Queries are aware of the dirt state of the model.
  • #7: Mention Xtext Based Text like editor hereHow SQL like syntaxes can be mentioned.Mention all type of SQL syntaxes like ‘Like’
  • #8: Mention how query execution takes place.With one shortcut key the queries can be executedResults of the view can be viewed in the Query result view.
  • #9: 1.Query view shows the queries which are defined in the Query text editor.2. It provides the context menu actions to execute the queries in the persistent or dirty state.
  • #10: 1.Query view shows the queries which are defined in the Query text editor.2. It provides the context menu actions to execute the queries in the persistent or dirty state.
  • #11: This is a AST based query syntax which is a java object based format.Form Entries, Select Entries are created and passed to the Query object.Then the Query is executed inside the Index. The Query also gets the Query context as a parameter.
  • #12: Scheduler finds out the resources state whether it is persistent or dirty.Interpreter lays out the query and forms the graph for the query.Processor actually executes the query.How queries in multiple backends could be executed.The database is still under way.
  • #13: Scheduler finds out the resources state whether it is persistent or dirty.Interpreter lays out the query and forms the graph for the query.Processor actually executes the query.How queries in multiple backends could be executed.The database is still under way.
  • #14: A Fast and efficient index mechanism is used behind the Query2 to retrieve the results.Types of tables available, Object table ,resource table and references table.Object Query , EReourceQuery and EReferenceQueryIndexQueryServices which provides API like find subtypes, getlinksin partitions,How reference searches could be performed
  • #17: 1. We need to check if any resource has changed and that particular state of the resource need to be considered.2. Dirty Index is maintained in the Query core.3.When executed the context menu action of dirty state from the Queries view.
  • #18: 1. We need to check if any resource has changed and that particular state of the resource need to be considered.2. Dirty Index is maintained in the Query core.3.When executed the context menu action of dirty state from the Queries view.
  • #19: 1. We need to check if any resource has changed and that particular state of the resource need to be considered.2. Dirty Index is maintained in the Query core.3.When executed the context menu action of dirty state from the Queries view.
  • #20: 1. We need to check if any resource has changed and that particular state of the resource need to be considered.2. Dirty Index is maintained in the Query core.3.When executed the context menu action of dirty state from the Queries view.
  • #21: Dirty state executionHere Resource1 is Dirty as well as persistent whereas the resource2 is only persistent.The Query executes and need to fetch the data from both dirty and persistent states.
  • #22: 1. We need to check if any resource has changed and that particular state of the resource need to be considered.2. Dirty Index is maintained in the Query core.3.When executed the context menu action of dirty state from the Queries view.
  • #23: All the components were tested with Huge data.
  • #24: Searching mechanism implemented by Query2.The search component query the resource from the index without loading them. This increases the performances.Type of model entity could be also selected.
  • #25: All the components were tested with Huge data.
  • #26: Refactoring is implemented using Query2.If an object is refactored, then the objects which are referring to this objects must also have their references updated.Query2 contains the link information in the indexes in the form of Outgoing link and incoming link. For refactoring the references searches could be performed which helps to find the references. Again the resource loading is minimized.
  • #27: All the components were tested with Huge data.