This presentation is dedicated to the architectural design of BExIS, which describes the overall architecture, layering, molecularity, important components, and the data access techniques using an ORM.
The video of the talk is available at: https://www.youtube.com/watch?v=txLIDgEn59M
Unlocking the Future of AI Agents with Large Language Models
3 the system architecture
1. BEXIS Tech Talk Series
#3: The System Architecture
Javad Chamanara
March 2016
2. Recall from the first talk
• Requirements
– Data Lifecycle Management
– Generic
– Extensible
– Portable
– Scalable
BEXIS Tech Talk #3: The System Architecture 2
3. Requirements -> DLM
• Flexible Data Structures
• Data Submission
• Validation
• Preserving
• Metadata Management
• Versioning
BEXIS Tech Talk #3: The System Architecture 3
4. Recall from the second talk
BEXIS Tech Talk #3: The System Architecture 4
DataMetadata
Data StructureMetadata Structure Semantics Geo
Administration Security
«use»
«use»
«use» «use»
«use»
5. Core Conceptual Model
BEXIS Tech Talk #3: The System Architecture 5
SearchPublishing
CMLand Use
Reservation
Data
Submission
6. DLM APIs
BEXIS Tech Talk #3: The System Architecture 6
Core Functions
Data Structure Mgmt.
Data Mgmt.
Metadata Mgmt.
Sem. Data Mgmt.
7. Multi DBMS data access
BEXIS Tech Talk #3: The System Architecture 7
DB2 PgS
Data Access
Core Functions
...
Relational
XML
GIS
Multi DBMS support
Vendor unlocking
ORM support
Customization support
Data Structure Mgmt.
Data Mgmt.
Metadata Mgmt.
Sem. Data Mgmt.
8. Access to the Core Functions
BEXIS Tech Talk #3: The System Architecture 8
DB2 PgS
Data Access
Core Functions
UI Framework
...
Modularity
Integration
9. Access to Core Functions
BEXIS Tech Talk #3: The System Architecture 9
DB2 PgS
Data Access
Core Functions
UI
UI Framework
...
Modularity
Integration
Synthesis Work
Semantic Search
Analytics
User Defined
Spatial Querying
External Tools
Web Services
Archiving
Import/ Export
Publishing
10. Security
BEXIS Tech Talk #3: The System Architecture 10
DB2 PgS
Data Access
Security
Core Functions
UI
UI Framework
...
Modularity
Integration
Synthesis Work
Semantic Search
Analytics
User Defined
Spatial Querying
External Tools
Web Services
Archiving
Import/ Export
Publishing
11. Architectural Patterns
• Generic User Interaction
• MVC
• APIs, Web APIs
• Data Access
• Services
BEXIS Tech Talk #3: The System Architecture 12
12. Generic User Interaction
BEXIS Tech Talk #3: The System Architecture 13
Presentation
User
Services Core Services Security Data Access
13. Presentation: MVC
BEXIS Tech Talk #3: The System Architecture 14
class mvc
Controller
ModelView
«observe»
«observe»
14. Simplified MVC
BEXIS Tech Talk #3: The System Architecture 15
class mvc
View ViewModel
Controller
«observe»
Dependency
15. Classes Engaged in an Interaction
BEXIS Tech Talk #3: The System Architecture 16
Controller
View
Service Framework API
Data
GIS Data
ViewModel
«Observe»
«use»
«use»
16. BExIS MVC Sequence Diagram
BEXIS Tech Talk #3: The System Architecture 17
User
Controller Model ServiceViewRouting Engine
Request()
action()
GetData()
Populate()
Bind()
Render()
17. MVC Constraints
• Passive Models
• Request more data
• Manipulate entities
• Models are POCOs
• Models have no access to services
• Models may have builder/ transformers
• Views can interact with controllers’ actions only
– Interchanging data
– Calling controllers’ actions either sync or async
• No lazy loading in the Views (populated models+ajax)
BEXIS Tech Talk #3: The System Architecture 18
19. Integration
• Service Based
– Modules provide a set of services
• HTTP/S + Auth
– Internal authentication
– Remote LDAP/ Active Directory integration
• Authorization
– Restricts access to controllers’ actions
– Public actions
– Public data
BEXIS Tech Talk #3: The System Architecture 20
20. Public APIs
• Web API
– API namespace
• Module/Controller/Action
• Verb
• Data
• www.example.com/dcm/datasets/1
• www.example.com/dcm/datasets/1/versions
• www.example.com/dcm/versions/10
• Querystrings are allowed
• No versioning on APIs! Always the latest!!
BEXIS Tech Talk #3: The System Architecture 21
21. Modularity
• Modules
– A set of related user facing functions
– To extend the application’s functionality
• Layering
– Presentation
• MVC
– Service
• Access to Core services, DLM, external services, etc.
– Data Access
• Own Database/data
• Direct access to the DB/data (not recommended)
BEXIS Tech Talk #3: The System Architecture 22
22. Modularity
• Integration
– Shell integration: menus, themes, scripts, etc.
– Authorization
• Introducing actions, to be secured, to the system
• Automatic security trimming/ action authorization
• Notes
– Deployment
– Hot plug-abilities
– Upgrading/versioning
BEXIS Tech Talk #3: The System Architecture 23
23. Data
• Relational data
– Schema evolution
– Schema generation
– Data versioning
– Vendor/tool independence
• XML data
– File based XML
– RDBMS based XML
• GIS data
– External systems
– Integrated querying
– Security
BEXIS Tech Talk #3: The System Architecture 24
24. Data Access
• ORM
– NHibernate
– Vaiona
BEXIS Tech Talk #3: The System Architecture 25
25. Data Access Patterns
• Repository pattern
– CRUD on entities
– Querying using
• LINQ to objects
• HQL
• Native SQL (queries, views, stored-procedures)
• Vendor specific customization
– Relationship traversal
• Laziness/Eagerness
• object graph traversal
– Automatic entity state/context management
– Based on:
http://martinfowler.com/eaaCatalog/repository.html
BEXIS Tech Talk #3: The System Architecture 26
26. Data Access Patterns
• Unit of Work pattern
– Business Transaction Management
– Concurrency Control
– Operating on multiple repositories
– Transactions
• Distributed Transaction Coordination
• Transparent transaction management
• Ambient transaction detection/reuse
– Web request/session/user aware transaction mgmt.
– Automatic commit on request/session termination
– Based on:
http://martinfowler.com/eaaCatalog/unitOfWork.html
BEXIS Tech Talk #3: The System Architecture 27
27. Data Access Patterns
• Aggregates
– Cluster of entities and their dependents
• Datasets and their Versions
• Units of measurement and their conversion formula
– Simplify the service layer
– Packaged as units of work
– Better business level operation/transaction mgmt.
– Look at:
http://martinfowler.com/bliki/DDD_Aggregate.ht
ml
BEXIS Tech Talk #3: The System Architecture 28
28. Data Access Patterns
• Materialization
– Complex entity serialized as XML
– Stored in field of a table row
– Materialize on read
• Reads the XML and loads the entity
– Dematerialize on write
• Serializes the object as an XML document
– Used in Data Tuples of dataset versions
BEXIS Tech Talk #3: The System Architecture 29
29. ORM example
• Dataset as an Aggregate area
• DataTuple
• DataCell
• Versions
• Associations
BEXIS Tech Talk #3: The System Architecture 30
30. Dataset aggregate: conceptual
diagram
BEXIS Tech Talk #3: The System Architecture 31
Dataset
Dataset VersionDataset Stage
Tuple
DataValue
Data Cell
Data Structure
1
+Current Stage
1
10..1
1
1
+Variable Values
{Delta Association,
Only Structured Data}
47. How to work with the model
DatasetManagerService dms = new DatasetManagerService();
Dataset ds = dms.CreateEmptyDataset(sds, rp, ms);
DatasetVersion workingCopy =
dms.GetDatasetWorkingCopy(ds);
// edit the version
dms.CheckInDataset(ds, “new version is created.", user);
BEXIS Tech Talk #3: The System Architecture 48
48. Inside the “Check In” service
method
public void CheckInDataset
(Int64 datasetId, string comment, string userName)
{
using(IUnitOfWork uow = this.GetUnitOfWork())
{
IRepository<Dataset> repo =
uow.GetRepository<Dataset>();
Dataset ds = repo.Get(…).FirstOrDefault();
// Check-in logic here…
repo.Put(ds);
uow.Commit();
}
}
}
BEXIS Tech Talk #3: The System Architecture 49
49. Outlook
Whats next in the talk series?
• General purpose components
• Third party components
• Cross-cut functionalities
BEXIS Tech Talk #3: The System Architecture 51