Skip to content

Architectural Requirements

Lunga-Ntando-Ndlovu edited this page Jun 24, 2024 · 14 revisions

Architectural Design Strategy

The chosen architectural design strategy is design based on quality requirements. This approach focuses on ensuring the system meets the key quality attributes and non-functional requirements that are most critical for ClassConnect's success. By prioritizing scalability, performance, usability, and other quality attributes from the start, the architectural design can be optimized to fulfill these needs.

Architectural Patterns

  • Service-Oriented Pattern: ClassConnect will implement a service-oriented architecture to promote scalability and performance. The system will be divided into two main services: the Learning Hub and the 3D Environment. This approach allows for independent deployment, and scaling of each service.

  • Client-Server Pattern: ClassConnect will follow the client-server architectural pattern, with a centralized server application and multiple client applications (web browsers) connecting to it. This separates the concerns of providing services and rendering the user interface.

  • Peer-to-Peer Pattern: For the real-time communication in the 3D environment, a peer-to-peer (P2P) pattern using WebRTC will be used. This avoids the need for a central server to stream data to each client. Instead, clients will connect directly and stream environment updates between each other in a mesh network.

Architectural Quality Requirements

  • Scalability: The system should be able to scale to handle an increasing number of users/organizations with minimal impact on performance. Since ClassConnect is built for educational institutions which tend to have a large number of students this quality requirement is important.

  • Performance: The 3D environment rendering and streaming must have low latency and maintain a high framerate to provide a smooth user experience and make the learning experience pleasant.

  • Usability: The system should be intuitive and easy to use for both lecturers and students, regardless of their technical expertise. As ClassConnect aims to enhance the learning experience, a user-friendly interface is crucial for widespread adoption and effective use in educational settings.

  • Availability: The platform should maintain high uptime and be accessible to users whenever needed, as educational activities often have strict schedules. ClassConnect should aim for 99.9% availability to ensure that classes and learning materials are accessible at all times.

  • Security: The system must implement robust security measures to protect user data, intellectual property, and ensure the integrity of the learning environment. As ClassConnect will handle sensitive educational information, strong security protocols are essential to maintain trust and comply with data protection regulations.

Architectural Design and Pattern

Technology Choices (Demo 1)

User Interface

SvelteKit

Overview: SvelteKit is a framework for building web applications using Svelte, a modern JavaScript compiler. It provides server-side rendering, routing, and code-splitting out of the box.

Pros:

  • Fast performance due to compile-time optimizations
  • Small bundle sizes
  • Simple and intuitive syntax

Cons:

  • Smaller community compared to React or Vue
  • Fewer third-party libraries and components

Architectural Fit: SvelteKit aligns seamlessly with our client-server architecture, serving as an ideal frontend solution. Its lightweight and efficient nature enables us to create a highly responsive client-side application, complementing our server infrastructure.

Backend Services

NestJS

Overview: NestJS is a progressive Node.js framework for building efficient and scalable server-side applications. It uses TypeScript and combines elements of OOP, FP, and FRP.

Pros:

  • Modular architecture promotes code reusability
  • Built-in dependency injection for better testability
  • Strong TypeScript support enhances developer productivity

Cons:

  • Steeper learning curve for developers new to TypeScript or decorators
  • Can be overkill for simple applications
  • Performance overhead due to abstractions (though generally negligible)

Architectural Fit: NestJS provides a robust and structured backend that complements our SvelteKit frontend. Its modular design allows for scalable and maintainable server-side code, supporting our client-server architecture with powerful API development capabilities.

Database

MongoDB

Overview: MongoDB is a document-oriented NoSQL database that offers high performance, high availability, and easy scalability.

Pros:

  • Flexible schema design allows for agile development
  • Horizontal scalability through sharding
  • Rich query language and indexing capabilities

Cons:

  • Lack of built-in joins can complicate some queries
  • Higher storage requirements compared to normalized relational databases
  • Not ideal for applications requiring complex transactions across multiple documents

Architectural Fit: MongoDB's document model aligns well with JavaScript objects, making it a natural fit for our Node.js-based backend. Its scalability and flexibility support our application's potential growth, while its performance characteristics complement our focus on creating a responsive user experience.

primary logo

Clone this wiki locally