Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

K. J.

Somaiya College of Engineering, Mumbai-77


(Autonomous College Affiliated to University of Mumbai)

Batch: C3 Roll No.: 16010120202

Experiment / assignment / tutorial No 2

Grade: AA / AB / BB / BC / CC / CD /DD

Signature of the Staff In-charge with date

TITLE : Identification of B E Project Architecture

AIM : To understand different types of architectures.


___________________________________________________________

Expected OUTCOME of Experiment:

CO 1. To design the architecture of software systems in various architectural styles and


patterns.
_____________________________________________________________________

Books/ Journals/ Websites referred:

1 “Software Architecture, Richard N Taylor etl, Wiley


2 ArchStudio - Getting Started - Easy Setup

www.isr.uci.edu/projects/archstudio/setup-easy.html
______________________________________________________________________

Theory:

Architectural Models, Views, and Visualizations:

● Architecture Model
An artifact documenting some or all of the architectural design decisions about
a system
● Architecture Visualization
A way of depicting some or all of the architectural design decisions about a
system to a stakeholder
● Architecture View
A subset of related architectural design decisions
● Architectural Processes:
• Architectural design

Department of Computer Engineering SADT/Sem-VIII – July-Dec 2023 Page 1


K. J. Somaiya College of Engineering, Mumbai-77
(Autonomous College Affiliated to University of Mumbai)

• Architecture modelling and visualization


• Architecture-driven system analysis
• Architecture-driven system implementation
• Architecture-driven system deployment, runtime redeployment, and
mobility
• Architecture-based design for non-functional properties, including
security and trust
• architectural adaptation

● Stakeholders in a System’s Architecture:


• Architects
• Developers
• Testers
• Managers
• Customers
• Users
• Vendors

● An architectural style is a named collection of architectural design decisions


that are applicable in a given development context constrain architectural design
decisions that are specific to a particular system within that context elicit
beneficial qualities in each resulting system.

● Primary way of characterizing lessons from experience in software system


design Reflect less domain specificity than architectural patterns useful in
determining everything from subroutine to top-level application structure.

● Basic Properties of Styles:

● A vocabulary of design elements : Component and connector types; data elements


e.g., pipes, filters, objects, servers
● Set of configuration rules : Topological constraints that determine allowed
compositions of elements e.g., component may be connected to at most 2 others
● A semantic interpretation : Compositions of design elements have well-defined
meanings. Possible analyses of systems built in a style.

Implementation

Title of Project: Personalised Finance App using Federated Learning

Abstract of Project:
Personalised finance app employing federated learning for services like loan risk
assessment and credit scoring. Upholding data privacy, our app empowers users to
securely share data with financial institutions, ensuring computations are conducted

Department of Computer Engineering SADT/Sem-VIII – July-Dec 2023 Page 2


K. J. Somaiya College of Engineering, Mumbai-77
(Autonomous College Affiliated to University of Mumbai)

locally. Unveiling a new era of transparency, it grants users insights into data
utilization, fosters trust and informed decisions. It also helps users understand loan
related risks and their credit score, all of which is computed in a federated environment

Architecture of Project:

Component Diagram (Independent Components) :

Step by step working :

1. Choose a model on central server that is either pre-trained or isn’t trained at all.
2. The next step would be the distribution of the initial model to the clients
(devices or local servers).
3. Each client keeps training it on-site using its own local data. The important part
is that this training data can be confidential, including personal photos, emails,
health metrics, or chat logs. Collecting such information in cloud-based
environments could be problematic or simply impossible.
4. When locally trained, the updated models are sent back to the central server via
encrypted communication channels. Worth noting that the server doesn’t get
any real data, but only trained parameters of the model (e.g., weights in neural
networks).
5. Updates from all clients are averaged and aggregated into a single shared
model, improving its accuracy.
6. Finally, this model is sent back to all devices and servers.

Department of Computer Engineering SADT/Sem-VIII – July-Dec 2023 Page 3


K. J. Somaiya College of Engineering, Mumbai-77
(Autonomous College Affiliated to University of Mumbai)

Components and Connectors Architecture :

Explanation of Components and Connectors:

Components: Roles and functions of each component:

1. Server: The server serves as the central coordinator of the federated learning process.
It manages the entire training workflow by initiating training rounds, distributing the
initial global model to selected clients, collecting and aggregating model updates, and
overseeing synchronization of learning process. Server ensures that the collaboration
among clients leads to a refined global model while maintaining data privacy.

2. Client and Client Driver: Clients are individual entities or devices that participate in
federated learning. Each client holds its own local dataset, representing data from its
specific environment. The client driver, situated on the server's side, is responsible for
selecting a subset of clients for each training round. It communicates with these chosen
clients, providing them with the current global model and collecting their model
updates after they've trained on their local data. The client driver facilitates the
interaction between the server and individual clients, enabling them to contribute their
insights to the global model.

Department of Computer Engineering SADT/Sem-VIII – July-Dec 2023 Page 4


K. J. Somaiya College of Engineering, Mumbai-77
(Autonomous College Affiliated to University of Mumbai)

3. Aggregator and Aggregator Driver: The aggregator is a key component on the


server's side responsible for collecting and aggregating the model updates received
from participating clients. After each training round, clients generate local model
updates based on their local datasets. The aggregator combines these updates, often
using techniques like weighted averaging, to create an enhanced global model. The
aggregator driver, operating alongside the aggregator, manages the aggregation process.
It decides which client updates to include in the aggregation and how to weight their
contributions. The aggregator driver ensures that the aggregated model maintains high
performance and generalization across all participating clients.

Connectors (Procedure Calls): Sequence of actions and communications are :

1. Local Train: This step involves each individual client training its local model using
its own local dataset. Clients execute training algorithms on their data to update their
models according to the specific patterns in their data.

2. Local Message: After local training, clients generate a message that contains the
updates made to their local models. This message typically includes information about
the model's weights or gradients that were adjusted during training.

3. Train Message: The train message is sent by each client to the server. It carries the
model updates resulting from the local training process. These updates are then
aggregated to create an improved global model.

4. Local Model Push: Once train messages are sent to server, clients push their locally
trained models (updated versions) to server. These models might be used in aggregation

5. Aggregate Message: The server collects the train messages from all participating
clients. This step involves the aggregation of these individual model updates to create a
new version of the global model.

6. Aggregation Model Push: After the aggregation process is complete, the server
pushes the newly aggregated global model to all participating clients. This updated
global model incorporates the insights from all clients' local models.

7. Aggregation Finish Message: This message is sent by the server to inform the clients
that the aggregation process has been successfully completed. It indicates that the
clients can now update their models with the aggregated global model.

8. Aggregated Model Webhook: Upon receiving the aggregation finish message, clients
can implement a webhook to automatically retrieve the aggregated global model. A
webhook is a way for one system to provide information to another system in real-time.

Post Lab Descriptive Questions

Department of Computer Engineering SADT/Sem-VIII – July-Dec 2023 Page 5


K. J. Somaiya College of Engineering, Mumbai-77
(Autonomous College Affiliated to University of Mumbai)

1 .Discuss the different architecture styles

1. Dataflow: The dataflow architectural style focuses on the movement and


transformation of data within a system. In a dataflow architecture, components
are designed to process data as it flows through the system, typically following
a directed graph-like structure. Each component performs specific tasks on the
incoming data and passes the transformed data to other components. This style
is particularly suited for applications that involve extensive data processing and
manipulation, such as streaming data analytics or signal processing systems.

2. Call and Return (Layered) : The call and return architectural style, also
known as the layered architectural style, involves organizing a system into
multiple layers or tiers. Each layer represents a specific level of abstraction and
functionality. Higher layers depend on the services provided by lower layers,
but lower layers are usually unaware of the specifics of the layers above them.
This separation of concerns helps in modularizing the system and promoting
maintainability, as changes in one layer typically don't affect others. This style
is commonly used in web applications with a frontend-backend separation or in
operating systems with kernel-user space divisions.

Department of Computer Engineering SADT/Sem-VIII – July-Dec 2023 Page 6


K. J. Somaiya College of Engineering, Mumbai-77
(Autonomous College Affiliated to University of Mumbai)

3. Independent Components (Component-Based) : The independent


components architectural style emphasizes building a system from reusable and
interchangeable components. Each component encapsulates a specific set of
functionality and can communicate with other components through well-defined
interfaces. This style promotes code reusability, modular development, and easy
system maintenance. It's commonly used in environments where different teams
or developers are responsible for different components, leading to better
scalability and maintainability.

4. Virtual Machines : Virtual machine architectural style involves creation of


software-based abstractions of physical hardware, known as virtual machines
(VMs). These VMs provide isolated environment that mimics physical
computer, allowing multiple operating systems or applications to run on same
physical hardware without interfering with each other. This style is frequently
used in server virtualization, where one physical server hosts multiple VMs,
each running a separate instance of an operating system or application.

Department of Computer Engineering SADT/Sem-VIII – July-Dec 2023 Page 7


K. J. Somaiya College of Engineering, Mumbai-77
(Autonomous College Affiliated to University of Mumbai)

5. Data-Centred Systems : Data-centred architecture centres around management


and manipulation of data as primary focus of system. Involves organizing
architecture around data and its associated processes. Common in systems that
manage large volumes of data, such as databases and data warehouses.
Architecture often prioritizes data storage, retrieval, and processing efficiency.

2. Identify the style of your B.E project.

Chosen Style : Independent Components (Component-Based)

Independent components style is well-suited for my project due to its modularity,


scalability, privacy preservation, and ability to accommodate the distributed and varied
nature of participants. It aligns with the decentralized, privacy-conscious, and
collaborative essence of federated learning while enabling effective development and
management of a complex system.

3. Apply any two standard styles for your B.E Project and justify.

A. Independent Components (Component-Based)

Justifications:

Department of Computer Engineering SADT/Sem-VIII – July-Dec 2023 Page 8


K. J. Somaiya College of Engineering, Mumbai-77
(Autonomous College Affiliated to University of Mumbai)

1. Modularity and Reusability: The independent components style promotes


modularity, allowing different functional units to be developed, tested, and maintained
independently. This aligns with the nature of federated learning, where various clients
and server-side components interact autonomously.

2. Scalability: Project involves diverse set of clients with varying computational


capabilities. Component-based approach enables scalable development and
deployment, accommodating different devices without imposing excessive overhead.

3. Privacy and Security: Privacy preservation is a central tenet and component-based


style ensures that sensitive data remains within individual components, reducing the
risk of unauthorized access or data breaches.

4. Customization: Different clients or data sources might require tailored approaches


to model training and aggregation. With independent components, customization is
facilitated, allowing each component to be optimized for its specific task.

5. Interoperability: Project involves collaboration between different entities.


Component-based style promotes interoperability, allowing components to
communicate through well-defined interfaces, making it easier to integrate

6. Maintenance and Updates: Independent components can be updated or replaced


without affecting the entire system. This is crucial as in our project client availability
and system evolution can vary.

7. Reduced Complexity: By breaking down the system into manageable components,


the complexity of each individual unit is reduced, making development, debugging, and
maintenance more feasible.

8. Distributed Expertise: Different teams or individuals can specialize in developing


specific components, leveraging expertise to enhance overall quality and efficiency.

9. Adaptability: The component-based style allows for dynamic adaptation. New


components can be integrated as requirements evolve, facilitating the integration of
new algorithms or techniques.

10. Testing and Validation: Independent components can be tested individually,


improving the system's reliability. This approach also allows for easier isolation and
resolution of potential issues.

B. Components and Connectors (C2)

Justifications:

1. Modularity and Reusability: C2 promotes modularity by breaking down a system


into components, each responsible for specific functions. In our project, we have

Department of Computer Engineering SADT/Sem-VIII – July-Dec 2023 Page 9


K. J. Somaiya College of Engineering, Mumbai-77
(Autonomous College Affiliated to University of Mumbai)

components for clients, server, aggregators, data pre-processors, and more. This
modular design enables individual components to be developed, tested, and maintained
independently, enhancing reusability and system flexibility.

2. Decentralization and Privacy: C2 style's emphasis on components aligns with


decentralized nature of our project, where data remains localized on clients. Each client
functions as independent component, responsible for local training and sending model
updates. This supports our project’s key principle of preserving privacy by minimizing
data exposure.

3. Communication and Interaction: Connectors define how components interact and


communicate. In an FL project, connectors can facilitate the exchange of model
updates, aggregated models, and messages between clients and the server. This aligns
with the dynamic communication required in FL, where clients interact with the server
for training rounds and model aggregation.

4. Customization and Adaptability: C2 allows components to be customized and


adapted to specific tasks. For our project, this style will allow clients to be tailored to
accommodate different data types or devices while maintaining compatibility with
system's connectors.

5. Scalability: Components and connectors facilitate scalability in our project. As the


number of clients grows, new client components can be added, and connectors can
handle the interactions. This makes it feasible to scale the system to accommodate a
diverse set of participants.

6. Interoperability: Project involves collaborations between different organizations


and devices. The C2 style supports interoperability by defining well-defined interfaces
(connectors) that enable seamless communication between diverse components.

7. Real-time Interaction and Updates: C2's connectors can enable real-time


interaction and updates. For our project, this means that components can communicate
model updates, aggregated models, and other information in a timely manner,
supporting iterative learning rounds.

8. Transparency and Traceability: C2 can aid in maintaining transparency by


providing clear interfaces between components. In our project, this could enable
tracking data flow, model updates, and interactions, fostering trust among participants.

9. Testing and Maintenance: The modular nature of C2 supports ease of testing and
maintenance. Components can be tested independently, and updates can be applied to
specific components without affecting the entire system.

Date: 25/06/2023 Signature of faculty in-charge

Department of Computer Engineering SADT/Sem-VIII – July-Dec 2023 Page 10

You might also like