🐶 PettySync

PettySync is a smart pet collar that can help you track your pet's location and health such as mood, activity, sleep, and there is also a social community of people who use this collar. which can organize activities together Talk and exchange to make raising your pets better.

Problems solved with our product

  • Unable to track pets during the day
  • Concerned about your pet's well-being during the day
  • It is not possible to detect the pet's unexpressed abnormalities.
  • Inability to recognize pet's needs.
  • Unable to find lost pets.

pettysync image


This report is part of the Advance Computer Engineering Technology (266-261405) course.

🧑‍🤝‍🧑 Team Members

PettySync's team members and their responsibility.


Student IDNameResponsibility
630610734Tanadol DeachprapakornUI/UX Design, System Design
630610736Thanawat BumpengpunNetwork Design, Collar Sensors
630610737Tanat TangunProject Manager, System/Collar Design
630610749Pongsakorn RattanapanMachine Learning Design, Pipeline
630610758Lalinthorn PholnarukUI/UX Design
630610764Siriwat SongwattanaDatabase
630610765Suparida SilpasithUI/UX Design
630610752Purich SeenaullaeNetwork Design
630610770Atthapong AuewongchaiNetwork Design
630610759Latthaphol LaohapiboonrattanaNetwork/Collar Design Support

🌈 UX/UI Design

We have designed user inferfaces using FIGMA🪄

This is mobile application interfaces. 📱🙎🏽‍♂️

Want to try our application?🐱

You can follow this link to the prototype: 🐶PettySync Prototype

⭐️ User Interface Section Overview

Login/Register
alt text

Community
alt text

Pet Map
alt text

Pet profile
alt text

Health & Activity
alt text

Notifications
alt text

Setting
alt text

📱User Flow 🧒🏻

This page will describe how our users can use the PettyRync mobile application in these sections as follow.

LOGIN & REGISTER📝

alt text

Login/Register is the initial part of the user interface, where users can access the application only after creating an account on the application by entering basic personal information.


alt text

Once the user has successfully registered or logged in, there is an option to add pet accounts and pair your pet accounts with with the smart collars (using QR CODE or Collar ID), which is optional.

COMMUNITY🏠

alt text

The second part of the application is the community system, consisting of feed, groups and events related to pets. In a group, one can create posts to share information among group members.


alt text

Posts from each group are gathered and displayed in your feed. Users can like, comment, and share posts to their socail media.


alt text

Regarding events, there is a section suggesting various events, each with descriptions about the event's topic, location, and schedule. Users can join events (or leave events), and also create their own events.


alt text

In the group section, different groups are recommended in groups page. Users can subscribe to many groups, allowing them to view and create posts within those groups. Users can definitely leave any group at anytime.


alt text

Each users can also create their own groups too.


alt text

Our profile includes all our posts, groups, and events that we have created or joined. While we can view our own profile page, we cannot access profiles of other users.

PET MAP📍

alt text

In the pet map section, we can view the location of our pets and nearby pets with our smart collars.

alt text

There is a function to announce if our pet is missing, which will be displayed on the map for other users. Similarly, we can see if other pets are reported missing and notify their owners if found.

PET PROFILE🐶🐱

alt text

Within the "Pet Profile" segment, the initial section serves as a comprehensive card summarizing each pet's key details. This includes up-to-date health information, the current status of the pet, and the battery status of its smart collar.


alt text

Upon entering the card, users gain access to the pet's menu, featuring:

  • Personal Information: Editable details that allow users to input and modify key information about their pet.
  • Vaccination History: A comprehensive record documenting the pet's vaccination history, aiding in the management of its health.
  • Smart Collar Connection: This section establishes a direct link to the smart collar adorned by the pet, offering insights and control over the collar's functionalities.
  • Health and Activities: This part furnishes users with detailed information regarding the pet's well-being. This encompasses aspects like health records, mood indicators, and graphical representations of various activities.

alt text

Health & Activities: In the dedicated "Health & Activities" section, users gain access to vital data pertaining to each pet's health, meticulously measured by our advanced smart collar technology. If there hasn't been a previous connection with the smart collar, this section remains devoid of data. This segment functions as a comprehensive repository, providing insights into the pet's physical condition and behavioral patterns. It offers a holistic view of the pet's health and activities, ensuring pet owners have a robust understanding of their furry companion's overall well-being. In addition to real-time monitoring, the system allows for the continuous addition of new health records, such as illnesses, treatments, and various activities


alt text

Health data of pets will be recorded and stored as a history through graphs while the smart collar is active, which includes:

  • Mood of the Pet: Indicates the pet's mood each time, whether they are happy, hungry, or feeling lonely.
  • Heart Rate of the Pet: Monitors the pet's heart rate, providing insights into their cardiovascular health.
  • Movement and Energy Expenditure: Tracks the pet's activity levels and how much energy they expend throughout the day.
  • Resting Periods of the Pet: Displays the pet's periods of rest, helping to understand their sleep patterns and overall well-being.

NOTIFICATION🛎

Within the notification section, there are both consolidated and distinct notification pages is offered, encompassing:

alt text

  • Pet Alerts: Immediate alerts when someone reports encountering your cherished pet or when a nearby pet is declared missing, ensuring swift awareness. Health notifications tailored to your pet's well-being, delivering crucial updates and insights.
  • Events: A dynamic hub for notifications regarding the latest events, personalized recommendations, and timely alerts as your scheduled events draw near, ensuring you never miss out on exciting happenings.
  • Groups: Stay seamlessly connected with notifications on novel or suggested groups, coupled with timely alerts pertaining to activities on your posts within a group, fostering an engaged and interactive community.
  • Others: System-related notifications for other miscellaneous updates and information.

SETTING⚙️

alt text

In the application settings, users can customize various settings within the app to enhance performance, functionality, or user experience according to their preferences and personal needs. This includes account settings, notification settings, help and support, and about the app.


alt text

The account settings page consists of a total of 3 sections, which include the General, About Me, and Groups sections.

  • General: In this section, users can edit information that requires verification, such as username, password, email, phone number, and date of birth. The system will perform checks to prevent the creation of accounts with duplicate information.
  • About Me: In this section, users can modify personal information such as their name, gender, and current location. This enhances the functionality of the application and aligns it more closely with users' needs, particularly in features like pet finding, which can help users locate others nearby.
  • Group: In this last section, users can unblock the groups which were previously blocked by them.

Machine Learning Design

Overview of machine learning and training model frame work.

Data set

kaggle.com https://www.kaggle.com/code/gleblevankov/meow-meow

  • For our project, we utilize a dataset sourced from Kaggle (kaggle.com). This dataset comprises 440 sound recordings capturing meows emitted by cats in diverse contexts. The recordings involve 21 cats from two breeds, Maine Coon and European Shorthair, responding to three distinct stimuli, which serve as labels for prediction: hungry, isolated, and happy.

Cat sound

  • Example Sound of Hungry cat.

Sound wave hungry

Mel frequency cepstrum coefficient

  • Example Sound of Isolated cat.

Sound wave Isolated

Mel frequency cepstrum Isolated

  • Example Sound of Happy cat.

Sound wave Happy

Mel frequency cepstrum Happy

Features Extraction form Cat sound

To effectively process audio data, we techniques by splitting the audio into short segments and computing frequency spectra for each segment. This process results in a sequence of frequency spectra, each representing a small slice of time.

  • By stacking these spectra together, we create a spectrogram, which visually displays the frequency content of the audio signal over time.

  • Furthermore, we utilize methods like the Mel Frequency Cepstrum Coefficient (MFCC) to extract features from the audio.

  • MFCC involves the same process of splitting the audio into segments and computing frequency spectra. However, it specifically focuses on capturing the essential characteristics of the audio signal's frequency content as it changes over time.

  • By leveraging MFCC, we can effectively represent the audio data for classification tasks.

  • Mel frequency cepstrum
  • Mel frequency cepstrum coefficient

Features Extraction from Cat sound

Model Classification Architecture

Considered as the backbone of Classification Our model's backbone for classification is the Convolutional Neural Network (CNN). CNNs are particularly effective for image and audio data due to their ability to automatically learn spatial hierarchies of features.

  • The input dimension for our model is 160x120, representing the MFCC coefficients.
  • The CNN architecture consists of convolutional layers for feature extraction, pooling layers for dimensionality reduction, and fully connected layers for classification.
  • The model comprises a total of 82,972,163 trainable parameters.

Convolutional Neural Network model

Convolutional Neural Network model

  • weight total 82,972,163 parameters
    • all parameter are trainable

Training Process

During the training process, the model learns to minimize a predefined loss function by adjusting its parameters In our case, the model achieved an accuracy of 70.20% on the test data, with a loss of 1.0762.

  • Accuracy of our model on test data : 70.20202279090881 %

A confusion matrix is a valuable tool for assessing the performance of a classification algorithm. It visualizes and provides a summary of true positive (TP), true negative (TN), false positive (FP), and false negative (FN) predictions.

  • From the confusion matrix, various performance metrics can be calculated, including accuracy, precision, recall, and F1-score.
    • Accuracy = (TPs + TNs) / (TPs+TNs+FPs + FNs)
    • Precision = TPs / (TPs + FPs)
    • Recall = TPs/(TPs+FNs)
    • F1 = 2 x (Precision x Recall)/(Precision + Recall)

Machine Learning Pipeline Design Overview:

In our project, we implement a comprehensive Machine Learning (ML) pipeline using Amazon Web Services (AWS) for the creation, training, deployment, and re-training of models

Pipeline flow

Training Process

Build model

  1. Creat Project and build sturcture for model in AWS then Commit Code to AWS Load Training Data set in Amazon s3 with codeBuild to Start Pipeline.
  1. Training Model in SageMaker Pipeline:
  • The training process begins with the initiation of the SageMaker pipeline, which orchestrates the training of models. This pipeline operates on an ml.p3.8xlarge instance, equipped with 4 NVIDIA V100 GPUs, each with 16 GB of RAM, totaling 64 GB VRAM. This powerful configuration enables efficient model training. The estimated duration for model training is approximately 24 hours.

  • Within the SageMaker environment, we manage two models simultaneously: the existing (old) model and the new ground truth model. This setup allows for the comparison and evaluation of the performance between the two models, facilitating iterative improvements in our machine learning algorithms.

  1. we will get Registry of Amazon SageMaker Model that are trained,includes details such as model versions, training configurations, evaluation metrics, and other relevant information.

Deploy Process

  1. Model Selection and Approval:
  • Once a model demonstrates high or acceptable accuracy during evaluation, we proceed to select it for deployment. This selection process involves careful consideration of the model's performance metrics. Upon approval, we commit the chosen model and initiate the deployment process. This involves building the necessary artifacts for deployment, ensuring that the model is ready to be deployed into production.
  1. Deployment to Amazon SageMaker Inference Endpoint:
  • After selecting a model with satisfactory accuracy, we proceed with its deployment to an Amazon SageMaker inference endpoint. This endpoint is powered by an ml.g4dn.xlarge instance equipped with a single NVIDIA V100 GPU boasting 16 GB GPU RAM. It operates continuously, running 24/7 to serve the inference endpoint, ensuring uninterrupted availability for processing inference requests.
  1. SageMaker endpoint model will be monitored to measure prediction accuracy every weeks or days according to our setting.

ground truth
  • if model model made incorrect predictions , Users can edit and correct incorrect predictions, saving the corrected data to an S3 bucket. This corrected data serves as baseline ground truth and contributes to a new dataset for training future models.

Retrain Process

  1. If accuracy of model lower then our threshold , Amazon CloudWatch Event will alert and Trigger Pipeline Build model.
  1. Trigger Sagemaker Pipeline that run in ml.p3.8xlarge will use the new ground truth that user has updated to re-training old model and new model.

Flutter (Front End)

flutter

Flutter is an open source framework by Google for building beautiful, natively compiled, multi-platform applications from a single codebase. From their website

We choose Flutter as our framework to develop our mobile application because of

  • Cross-Platform Consistency: we can build for both IOS and androin using the same code.
  • Modular Architecture: widgets is very easy to work with.
  • Expressive Code: the programming language Dart is simple, fast enough, static type, and has an interesting sound null safety.
  • Extensive Plugin Ecosystem: the community is big, so we have a lot of other people's code to use.

Rust (Both on Collar Software and Lambda)

rust

According to their website Rust has good

  • Performance: Rust is blazingly fast and memory-efficient: with no runtime or garbage collector, it can power performance-critical services, run on embedded devices,
    and easily integrate with other languages.
  • Reliability: Rust’s rich type system and ownership model guarantee memory-safety and thread-safety — enabling you to eliminate many classes of bugs at compile-time.
  • Productivity: Rust has great documentation, a friendly compiler with useful error messages, and top-notch tooling — an integrated package manager and build tool, smart multi-editor support with auto-completion and type inspections, an auto-formatter, and more.

We choose Rust as our main language for developing backend side code, because of

  • It's fast, memory safe, which are good for embeded devices.
  • It's a joy to write, cargo is super easy to work with.
  • Rust community is growing, and many big companies seems to want to adopt it (e.g. Microsoft seeks Rust developers to rewrite core C# code).
  • Rust's ownership model and fearless concurrency support make it well-suited for building scalable and concurrent backend systems.

Database Design

PostgreSQL

example image

PostgreSQL is an advanced, enterprise-class open-source relational database that supports both SQL (relational) and JSON (non-relational) querying. It is a highly stable database management system backed by more than 20 years of community development.

MongoDB

example image

MongoDB is a source-available, cross-platform, document-oriented database. Classified as a NoSQL database product, MongoDB utilizes JSON-like documents with optional schemas. MongoDB is developed by MongoDB Inc., and current versions are licensed under the Server Side Public License (SSPL). MongoDB is currently the 5th most popular database engine.

Database Schema

We will divide the database design into two parts: SQL and NoSQL.

SQL using PostgreSQL

example image

No SQL using MongoDB

example image

Entities

User_Owner

Entity for member login system data.

Community_Groups

Entity of all groups' data in the application, which includes group name, group purpose, and image path.

Post

Entity of all posts in the application, which includes message, image path, date, event name, event description, and location.

Post_Comment

Entity of all comment of post in the application, which includes message and, image path.

Post_Like

Entity of likes on all posts in the application, which includes reaction.

Profile_User

Entity of all users in the application, which includes full name, nickname, gender, phone number, and address.

Profile_Pet

Entity of all users' pets in the application, which includes name, birthdate, breed, gender, weight, color, diseases, vaccination status, neutering status, and pet type.

Vaccine_History

Entity of vaccination history for all pets in the application, which includes vaccine name and vaccination date.

Health_History

Entity of health history for all pets in the application, which includes text and date.

RealTime_Sensor

Entity of data received from all sensors in the application, which includes user ID, serial collar ID, heart rate, and GPS

Relations

User_Community_Groups

For this relation, it means which group(s) the user belongs to.

PettySync Application System Design

This section describes the system design of the PettySync application. It includes the High-Level Design and Cloud Services Design.

High Level Design

Capacity Estimation and Constraints

Traffic Estimates

There are about 2.8 million pets in Thailand. Suppose 1% of the pet owners use the application. That would be 28,000 users.

Storage Estimates

Suppose each user uploads 1 image/video per day. That would be 28,000 images/videos per day. Assuming each image/video is 10 MB, that would be 280 GB of data per day. That would be 102 TB of data per year.

Design Consideration

  1. Our application is read-heavy. We need to optimize for read operations. We can use a NoSQL database for this. We can use a relational database for the user data. We can use a cache for caching the images/videos. We can use a message queue for handling the requests asynchronously.
  2. Our application needs to support both iOS and Android. We can use a cross-platform framework like Flutter for this. We use Flutter because it is fast and it uses Dart which is a modern language and supports both strong and weak typing allowing for faster development.

System Architecture

Microservices architecture is used for the system because it is scalable, maintainable, and testable. It helps us separate the concerns between the Community features and the Pet Collar features as they use different technologies. Importantly, each service can scale indepedently without tight coupling. The diagram below shows the high-level architecture of the system.

Microservice Architecture Diagram of PettySync

1. User Service

This service is responsible for user management. It includes user profile management, and retrieval of user data, including user images and videos.

2. Group Service

This service is responsible for group management. It includes group creation, group joining, and group browsing.

3. Event/Post Service

This service is responsible for event and post management. It includes event creation, event browsing, and post creation, post deletion, and post liking. This service also handles image and video uploaded along with the posts.

4. Pet Profile Service

This service is responsible for pet management. It includes pet profile management, pet health monitoring, and pet vaccination record.

5. Comment Service

This service is responsible for comment management. It includes comment creation, comment deletion, and comment liking on posts.

6. Feed Generation Service

It includes generating the user feed based on the user's joined groups and trending posts. It also handles groups and events feed generation and recommendation for the user.

7. Notification Service

This service is responsible for sending notifications to the user. It includes notifications for new comments, new likes, new posts, and lost pets reported by other users.

8. Mood Analysis Service (Machine Learning Service)

This service is responsible for analyzing the mood of the pet based on the voices sent from the collar. It uses machine learning to analyze the mood of the pet and stores the voices data for further model retraining.

9. Lost Pet/Pet Location Service

This service is responsible for lost pet management. It includes lost pet reporting, lost pet browsing, and pet location tracking.

10. Collar Data Service

This service is responsible for managing the data from the pet collar. It includes pet location tracking, and pet health monitoring. This raw data is processed and stored in the database to be shown on the application.

11. Authentication Service

This service is responsible for user authentication. It includes user login, user registration, and user password reset.

Cloud Services

The PettySync services both for the community and the pet collar are hosted on the cloud. The cloud services are used to store the data, run the application, and provide the infrastructure for the application. Amazon Web Services (AWS) is used for the cloud services. AWS is chosen because it is the most popular cloud service provider and it provides a wide range of services that are required for the application. The development team is also familiar with AWS services.

Cloud Services for Mobile Application

Diagram showing cloud services used in microservices responsible for the mobile application

The above diagram shows the cloud services used for the mobile application. Each service uses a serverless architecture to provide the required functionality. Furthermore, the services are decoupled and can scale independently.

  • Amazon Cognito: Used for user authentication and authorization.
  • Amazon API Gateway: Used to create, publish, maintain, monitor, and secure APIs at any scale.
  • AWS Lambda: Used to run code without provisioning or managing servers and can scale automatically providing high availability and reliability.
  • Amazon RDS: PostgreSQL database used to store the data.
  • Amazon S3: Object storage used to store the images and videos.
  • Amazon SNS: Used to send push notifications to the mobile application and other services.
  • Amazon SQS: Used to decouple the services and provide a reliable and scalable message queue. This service is used to queue up new posts and events data for feed generation.
  • Amazon Location Service: Used to provide location-based services, maps, but not tracking. We do tracking using data from MongoDB. Tracking service is too expensive.
  • Amazon Location SDK: Used to integrate location-based services into the mobile application.
  • REDIS: Used to cache the data and provide a low-latency access to the frequently accessed data. This is used to cache the feed data for faster feed retrieval.

Cloud Services for Pet Collar Data Service

Diagram showing cloud services used in microservices responsible for the pet collar device

  1. AWS IoT Core: Used to connect the pet collar and IoT devices to the cloud. It provides a secure and reliable connection between the devices and the cloud. The devices can send the data to the cloud and receive the commands from the cloud through the MQTT protocol.
  2. AWS Lambda: Used to run the code to process the data received from the pet collar.
    1. Dumper #1 validates and processes the data received from the pet collar and stores it in the Mongo DB TimeSeries database.
    2. Dumper #2 is scheduled to retrieve the data from the TimeSeries database and stores it in the Amazon S3 for long-term storage. The old data is deleted from the TimeSeries database to save the storage space.
    3. Hearrate, Move, Location functions query data from the MongoDB and process it to be able to show on the application UI then store the processed data in the database.
  3. AWS EC2: It is a virtual machine used to host MongoDB TimeSeries database.
  4. Amazon S3: Used to store the data received from the pet collar and IoT devices for long-term storage. In the future, we can use the old data from the Amazon S3 for the historical analysis, reporting, and machine learning.
  5. Amazon EventBridge (Not shown in diagram): Used to schedule AWS Lambda functions to run at a specific time to perform the required tasks.
    1. Dumper #2 is scheduled to run once in a while to retrieve the data from the TimeSeries database and store it in the Amazon S3.
    2. Hearrate, Move, Location functions are also scheduled to run at a specific time to process the raw data and store it in the User database.

Cloud Services for Mood Analysis and Machine Learning

We use AWS SageMaker to build, train, and deploy machine learning models. The SageMaker provides a fully managed service that covers the entire machine learning workflow to label and prepare your data, choose an algorithm, train the model, tune and optimize it for deployment, make predictions, and take action. Below is the diagram showing the cloud services used for mood analysis and machine learning.

Diagram showing cloud services used in microservices responsible for Mood Analysis and Machine Learning

  1. Pet collar client sends voice data to the AWS IoT Core using MQTT protocol.
  2. AWS IoT Core sends the voice data to the AWS Lambda function. AWS Lambda function forwards it to SageMaker Inference Model hosted on Amazon EC2 to get the mood analysis result.
  3. AWS Lambda function receives the mood analysis result from SageMaker Inference endpoint and stores the result in the database. It also sends the voice to Amazon S3 to be used for retraining the model. The mood result table is composed of the following columns:
    1. id: The unique identifier of the mood analysis result.
    2. user_id: The unique identifier of the user.
    3. mood: The mood analysis result.
    4. created_at: The date and time when the mood analysis result is created.
    5. updated_at: The date and time when the mood analysis result is updated.
    6. voice_id: The unique identifier (S3 Object key) of the voice data.
    7. is_corrected: A flag to indicate if the mood analysis result is corrected by the user.
  4. User can access the mood analysis result from the mobile application and can correct the result if it is wrong. The corrected data is used to retrain the model.

Cost Estimation

Assumptions

  • The cost is calculated based on the AWS pricing in the Asia Pacific (Singapore) region.
  • Daily active users: 28,000
  • Each user has a pet collar device.
  • Each collar device sends a message every 5 minutes. Message size is 182 bytes.
  • Each user uploads a post per day.
  • A post contains an image or a video of size 10 MB.
  • Assume, there are 100,000 read requests per day for each service.
  • Database utilization is almost 100%.
  • The cost of the database is calculated based on the Amazon RDS pricing for PostgreSQL database.
  • The cost of the storage is calculated based on the Amazon S3 pricing.
  • The cost of the API Gateway is calculated based on the number of requests and the data transfer out. Assume, 1 million requests per day.

Estimated Cost

Total is 7227.1 USD per month, or about 260,000 baht/month, roughly 3,000,000 baht/year. The most expensive cost is the database, especially AWS S3 for media storage and Amazon ElastiCache (REDIS)

More details from AWS Pricing Calculator

SageMaker Operation Cost

Amazon EC2 ml.g4dn.xlarge instance specs

We use ml.g4dn.xlarge instance for inference. It has 4 vCPUs, 16 GiB memory, and 1 GPU with 16 GB vRam. The cost of the instance is $0.736 per hour. We use the instance for 24 hours a day, 30 days a month. The monthly cost of the instance is $529.92, or about 19,000 baht/month.

SageMaker Training Cost

Amazon EC2 ml.p3.8xlarge instance specs

We use ml.p3.8xlarge instance for training the model. It has 32 vCPUs, 244 GiB memory, and 4 GPUs with 64 GB vRam. The cost of the instance is $12.24 per hour. Suppose we train the model for 24 hours a day, 1 day a month. The monthly cost of the instance is $293.76, or about 10,000 baht/month.

Monitoring and Logging

We use Amazon CloudWatch to monitor the application and the cloud services. CloudWatch provides the logs and metrics for the application and the cloud services.

Amazon RDS Multi-AZ Deployment

We use Amazon RDS for the PostgreSQL database. Amazon RDS Multi-AZ with one standby replica is used to provide high availability and failover support for the database. The standby replica is used for disaster recovery and to minimize the downtime during the maintenance. The primary database is synchronously replicated across Availability Zones to the standby replica to provide data redundancy, failover support, and to minimize latency during system backups.

API Design

Post/Event Ranking

\[ \text{score}(\text{post}) = \frac{\sqrt(1+\text{post.likes})}{1+\text{post.likes}} \times \frac{\alpha\times\log(1+\text{post.likes})}{1+\log(1+\beta\times(\text{time.now}-\text{post.time}))} \]

The above equation defines how we score each post, \(\alpha\) is how much we care about the likes and \(\beta\) is how much we care about how recent the post is. These 2 values can be adjusted to suit our needs. Below is an example of how the equation work.

LikesTime\(\alpha\)\(\beta\)Score
0020.851
1520.851.057109
100360020.850.99312
10360020.850.765811
200180020.851.171232

The post with higher score will be recommended to user.

Group Ranking

\[( \text{score}(\text{group}) = \alpha\times\text{group.members}) \times (\beta\times\text{group.recent_acts}) \]

The above equation defines how we score each group, \(\alpha\) is how much we care about the amount of members in a group and \(\beta\) is how much we care about how much recent activites a group has. These 2 values can also be adjusted to suit our needs. Below is an example of how the equation work.

MembersRecent Activities\(\alpha\)\(\beta\)Score
102011.1513
10001011.151015
50020011.15800
90010011.151050

The group with higher score will be recommended to user.

Application API

We will use REST API for application's side API. In the following section will be the draft API endpoint with a data schema if needed.

interface ExampleSchema {
    a: string   // required field 'a' with type 'string'
    b?: number  // optional field 'b' with type 'number'
}

Social API

Retrieving data

GET /api/self will return the user info of the caller (User)

GET /api/users/{communityId} will return a list of users in a community

interface User {
    firstname: string
    lastname: string
    nickname: string
    gender: string
    location: Location
    profilePicture: string // URL of the image
}

inteface Users {
    data: User[]
    pagination: {
        next?: string
        prev?: string
    }
}

GET /api/explore will return a recommended paginated list of communities

GET /api/communities will return a paginated list of communities

interface Community {
    thumbnail: string // URL of the image
    name: string
    description: string
    members: number
    likes: number
    posts: number
}

interface Communities {
    data: Community[]
    pagination: {
        next?: string
        prev?: string
    }
}

GET /api/posts will return a paginated list of posts

  • Use this on both global feed and community feed
  • Event is also a post, we can get only the events by specify isEvent=true
interface Comment {
    owner: string,
    content: string
}

interface EventPost {
    owner: string
    images?: string[] // URL of the image 
    header: string
    description: string
    joined: number
    datetime: DateTime
    shared: number
    comments: Comment[]
}

interface Post {
    owner: string
    images?: string[] // URL of the image 
    header: string
    description: string
    likes: number
    shared: number
    comments: Comment[]
}

interface Posts {
    data: Post[] | EventPost[]
    pagination: {
        next?: string
        prev?: string
    }
}

GET /api/user will return the user information

interface User {
    profileImage: string // URL of the image
    name: string
    role: string
}

Creating data

POST /api/signup for creating a new user

interface NewUser {
    username: string
    phone: string
    birhday: Date
    email: string
    password: string
    confirmPassword: string
}

POST /api/communities for creating a new community

interface NewCommunity {
    thumbnail: string // URL of the image
    name: string
    description: string
}

POST /api/posts for creating a new post

interface NewPost {
    images?: string[] // URL of the image 
    header: string
    description: string
    isEvent: boolean
    datetime?: DateTime // only use this if isEvent is true
}

Mutating data

PUT /api/self for updating the user information

interface UpdateUser {
    firstname: string
    lastname: string
    nickname: string
    gender: string
    location: Location
}

PUT /api/self/pic for updating the user profile picture

interface UpdateUserProfilePic {
    profilePicture: string // URL of the image
}

DELETE /api/communities/{id} for deleting a community

DELETE /api/posts/{id} for deleting a post

PUT /api/communities/{id} for editing a community

interface UpdateCommunity {
    thumbnail?: string // URL of the image
    name?: string
    description?: string
}

PUT /api/posts/{id} for editing a post

interface UpdatePost {
    images?: string[] // URL of the image 
    header?: string
    description?: string
    isEvent?: boolean
    datetime?: DateTime // only use this if isEvent is true
}

POST /api/posts/{id}/like for liking a post

POST /api/posts/{id}/share for sharing a post to their own feed

POST /api/posts/{id}/comment for commenting a post

interface NewComment {
    owner: string,
    content: string
}

Pet API

Retrieving data

GET /api/pets will return a list of pets of a certain user

interface Pet {
    image: string
    breed: string
    color: string
    dateOfBirth: Date
    gender: 'Male' | 'Female'
    weight: number
    isSterilized: boolean
}

interface Pets {
    data: Pet[]
    pagination: {
        next?: string
        prev?: string
    }
}

GET /api/pets/location will return a gps location of the pet (both lost and not lost)

interface PetLocation {
    current: GPS
    history: GPS[]
}

GET /api/pets/health will return the health information of certain pet

interface PetHealth {
    heartrate: number
    calories: number
    rest: number
    healthrecords: {
        datetime: DateTime
        content: string
    }[]
}

GET /api/pets/health/mood will return mood histort of the pet

interface PetMood {
    data: { datetime: DateTime, value: MoodValue }[]
    summary: [MoodValue, number][]
}

GET /api/pets/health/heartrate will return heart rate history of the pet

interface PetHeartRate {
    range: [number, number]
    restingHeartRate: number
    data: { datetime: DateTime, value: number }[]
}

GET /api/pets/health/calories will return calories history of the pet

interface PetCalories {
    data: { datetime: DateTime, value: number }[]
}

GET /api/pets/health/rest will return reset history of the pet

interface PetRest {
    data: { datetime: DateTime, value: number }[]
}

GET /api/pets/vaccines will return a list of vaccines that a pet has

interface Vaccine {
    date: Date
    description: string
}

interface Vaccines {
    data: Vaccine[]
    pagination: {
        next?: string
        prev?: string
    }
}

Creating data

POST /api/pets for adding a new pet

interface NewPet {
    image: string
    breed: string
    color: string
    dateOfBirth: Date
    gender: 'Male' | 'Female'
    weight: number
    isSterilized: boolean
}

POST /api/pets/health/record/{petname} for adding a new health record to certain pet

interface NewPetHealthRecord {
    datetime: DateTime
    content: string
}

POST /api/pets/vaccines/{petname} for adding a new vacccine to certain pet

interface NewVaccine {
    date: Date
    description: string
}

Mutating data

PUT /api/pets/{petname} for editing a pet information

interface UpdatePet {
    image?: string
    breed?: string
    color?: string
    dateOfBirth?: Date
    gender?: 'Male' | 'Female'
    weight?: number
    isSterilized?: boolean
}

PUT /api/pets/health/record/{petname}/{id} for editing a certain pet's health record

interface UpdatePetHealthRecord {
    datetime?: DateTime
    content?: string
}

PUT /api/pets/vaccines/{petname} for editing a certain pet's vaccine

interface UpdateVaccine {
    date?: Date
    description?: string
}

Collar API

MQTT, or Message Queuing Telemetry Transport, is a lightweight and open-source messaging protocol designed for efficient communication between devices in a distributed and resource-constrained network. It follows a publish-subscribe model, allowing devices to publish messages to specific topics, and other devices to subscribe to those topics to receive relevant information. MQTT is known for its simplicity, low bandwidth usage, and support for unreliable or intermittent networks. It is widely used in Internet of Things (IoT) applications, where devices need to exchange data in a scalable and reliable manner. MQTT's design makes it suitable for scenarios where low latency and minimal network overhead are essential, making it a popular choice for various IoT implementations.

We will use "Fan-In" pattern as stated on this article from AWS.

fan-in

Collar will have this topic schema collar/{cat | dog}/{deviceId}|{gps | sound | heartrate} e.g. collar/cat/fed38152-6595-48c1-aaea-ebc0d937a19d/{gps} and the payload will look like this

// For gps, every 5min send gps location with timestamp
{
    lat,
    long,
    timestamp,
}[]
// For sound, send sound recorded (in byte array format) in certain period
{
    70 db c9 dc f4 2a 76 dc 46 47 6c fd e2 5c a6 ea 
    f7 85 4f b7 59 aa b4 47 b3 ea 97 74 1d 23 f6 5e 
    d7 43 c5 84 8a 4b 66 ba 46 95 fc d1 64 47 82 77 
    2c 57 12 73 98 cf 07 57 b7 02 5e c1 aa 31 1f 23 
    96 19 bf 23 cc 4f fa 41 e1 78 4d 0a 82 31 29 76 
    18 43 b7 68 e7 11 52 e8 e1 8b 38 70 5a 71 ff 61 
    3a 7e 5f e5 b5 23 87 80 7a 7c 81 48 88 36 36 db 
    57 67 22 bd 4e c3 29 34 db 79 6a 4c c1 65 1d dc 
    39 38 3a c4 db b1 e9 d4 ec 87 71 18 e1 68 fb 9e 
    a4 59 04 4e c9 30 a9 ac f6 eb 36 52 f1 4a e5 df 
    9b d6 08 9b 06 cc 8a 53 de fc ab f5 b0 53 7c 22 
    7d f3 c8 8b 8f 92 04 43 36 cb 60 45 e6 d8 09 bd 
    b7 6e 35 37 35 21 a6 0f ...
}
// For heartrate, every 10s send heartrate with timestamp
{
    bpm,
    timestamp
}[]

Then we will publish this to the broker using QOS 1 (at least once).

Collar & IoT

Devices and sensors used in collars.

Collar Requirements

Hardware

We want a small box that will be attached to the dog or cat collar. So

  • It should be small and light as much as possible (weight <50g, should not be bigger than 80 · 30 · 20 mm)
  • Long lasting battery (minimum >24 hours)
  • Can alway connect to the internet (>95% of the battery time)
  • Every sensors will be integrated into the box. (We need to build a custom PCB)
  • Waterproof

Software

  • Can use MQTT to send the data to the server every 5 minutes. (QOS 1, at least once)
  • Trigger the microphone to record the sound when there's a sound that exceed the threshold
  • Store the GPS data every 5 minutes.
  • Store the heart rate data every 10 seconds.
  • Can go in power save mode, when the pet is lost (only sending GPS data)

Sensors

Heart Rate

From this Article | ECG vs PPG for heart rate monitoring

  • PPG (photoplethysmography) use a light-based technology to sense the rate of blood flow.
  • ECG (electrocardiography) measure the electric signal generated from the heart.

Dealing with Dog and Cat fur

from this Research | IoT for Living Sheep.

  • For convenient wearing and high reliability PPG sensor type is better.
  • They measure pulse and blood oxygen saturation by using sheep tissue to cause different light transmittance when the blood vessels beat.
  • The heart rate sensor is composed of light source (they use green LED because the absorption characteristics of hemoglobin.) and photoelectric converter.
  • They emitted green LED captured light signal then converted into an electrical signal, amplified, and outputted

Since this method works on animals like sheep, which have thick fur, as well as dogs and cats, it is an interesting method to use.

Structure of PPG Heart Rate Sensor

  • LED Chip AM2520 (Green)
  • Optical Receiver Chip APDS-9008
  • Electrical Signal Amplifier

GPS / LTE

SIM7080G NB-IoT / Cat-M / GNSS (This can also provide GPS)

Specs

  • SIM Card 1x slot
  • GNSS positioning (GPS, GLONASS, BeiDou, and Galileo)
  • Data rate
    • Cat-M (LTE-M): Uplink 1,119 Kbps, Downlink: 589 Kbps
    • NB-IoT: Uplink 150 Kbps, Downlink: 136 Kbps

SIM Provider in Thailand

Data usage Assumption (1 Collar in 1 Day)

Uploading datas from Collar's sensors to Data Center.

Voice

  • Voice record length 10 seconds + MQTT Struct = ~70 KB
  • Around 10 Voice records upload per day
  • Voice Data Usage (per day) = 70KB x 10 = ~700 KB

Heart Rate

  • Heart rate payload + MQTT Struct = ~20 Bytes
  • Heart rate data updates every 10 seconds
  • Heart rate Data Usage (per day) = 20B x 8,640 = ~172 KB

GPS Position

  • GPS Position payload + MQTT Struct = ~50 Bytes
  • GPS Position updates every 5 minutes
  • GPS Position Data Usage (per day) = 50B * 288 = 14.4 KB

Microphone

For recording pet's voice then send to ML server to classified pet's emotional.

Voice Sound Detection Sensor Module

This is for triggering the voice recorder module for recording pet's voice, Since We don't want to record all the time.

Fermion: Voice Recorder Module

This is the voice recorder module for recording pet's voice.

Specs

  • Sampling Rate: 48kbs
  • Frequency Response: 20-20KHz
  • Storage: 16MB
  • Support about 40 minutes voice recording

Accelerometer

For tracking pet's activity, movement.

Accelerometer/Gyro Module (MPU6050)

Specs

  • 3-axis accelerometer (x, y, z)
  • 3-axis gyroscope (x, y, z)
  • In-built Temperature sensor

Processor

Raspberry Pi Pico

The Raspberry Pi Pico is a microcontroller board, and its features are tailored towards specific use cases where a compact, low-cost, and power-efficient solution is required.

Brief Overview, Datasheet


Battery

Lithium Polymer (LiPo) Battery type.

Advantages

  • LiPo battery is flexible and can be manufactured in various shapes and size, This flexibility makes them suitable for applications where space is limited.
  • High energy density meaning they can store more energy in a given volume or weight.

Since our collar must be small, lightweight and space is limited. From the advantages of LiPo batteries that can hold a lot of energy and can change shape Therefore it seems like a good option to use.

The battery model we are interested in

  • YDL 3.7V 1000mAh 503450 Lipo Battery Rechargeable Lithium Polymer x 2
    • Voltage: DC 3.7V; Capacity: 1000mAh
    • Material: Lithium Polymer; Net Weight: 22g
    • Size: 50 x 34 x 6mm / 1.97" x 1.34" x 0.24" (LWT)

Power assumption

  • Raspberry Pi Pico: ~50mA (Active),
  • Accelerometer/Gyro Module: ~4mA (Active)
  • Voice Sound Detection Sensor Module: ~5mA (Active)
  • Voice Recorder Module: 15mA (Active)
  • SIM7080G NB-IoT / Cat-M / GNSS: 15mA (Active)
  • PPG Heart Rate Sensor: 5mA (Active)
  • Sleep mode (PICO/SIM/GPS): 30mA (Sleep)

\( P_{\text{active}} = 50 + 4 + 5 + 15 + 15 + 5 = 94 \ \text{mA} \) and \( P_{\text{sleep}} = 30 \ \text{mA} \)

\( T_{\text{active}} = 0.8 \) (80% active time) and \( T_{\text{sleep}} = 0.2 \) (20% sleep time)

\[ \text{Average Power Consumption} = (P_{\text{active}} \times T_{\text{active}}) + (P_{\text{sleep}} \times T_{\text{sleep}}) \] \[ \text{Average Power Consumption} = (94 \ \text{mA} \times 0.8) + (30 \ \text{mA} \times 0.2) \]

Now, calculate the battery life:

\[ \text{Battery Life (hours)} = \frac{C_{\text{battery}}}{\text{Average Power Consumption}} \]

Substitute the given values and adjust for two batteries:

\[ \text{Battery Life (hours)} = \frac{2000 \ \text{mAh}}{(0.8 \times 94 \ \text{mA} + 0.2 \times 30 \text{mA})} \]

\[ \text{Battery Life (hours)} = \frac{2000 \ \text{mAh}}{81.2 \ \text{mA}} \approx 24.6 \ \text{hours} \]

Which include of power saving mode these batteries can supply our collar's sensors for at least 24hrs.

Floorplan

Floorplans of PettySync's Headquarter and branch.

Headquarter Floor 1

headquarter floor-1 plan image

Headquarter Floor 1 Plan

The first floor of headquarter is divided into six sections:

  1. Server Room
    • For installing data center equipment and servers.
  2. IT Department
    • For IT department employees.
  3. Marketing
    • For Marketing department employees.
  4. Finance
    • For Finance department employees.
  5. Co-working Space
    • For Supports working together and relaxing for employees in every department.
  6. Guest (non-color-area)
    • General guest reception area.

Headquarter Floor 2

headquarter floor-2 plan image

Headquarter Floor 2 Plan

The second floor of headquarter is divided into four sections:

  1. Network Management
    • For installing and controlling network equipment.
  2. Human Resource
    • For Human Resource department employees.
  3. Management
    • For Management department employees.
  4. Co-working Space
    • For Supports working together and relaxing for employees in every department.

Branch

branch plan image

Branch Floorplan

The branch floorplan is divided into four sections:

  1. IT Department
    • For IT department employees and installing network equipment.
  2. Marketing
    • For Marketing department employees.
  3. Co-working Space
    • For Supports working together and relaxing for employees in every department.
  4. Guest (non-color-area)
    • General guest reception area.

Network Design Overview

Overview of network system design and services for both headquarter and branch.

Network Services

Work From Home

  • Employees working from home can access the company network with a VPN.

Branch Connection

  • Connecting between headquarter and branch with WAN Internet ISP.

Internet

  • WLAN / LAN for every department.

Data Center

  • For storing information in organization.

3-Tier Topology Architecture

The architecture used in the design is 3-tier architecture, consisting of the core layer, the distribution layer, and the access layer.

3-tier network architecture image

3-Tier Network Topology Architecture

Core Layer

  • Considered as the back bone of networks

Distribution Layer

  • Works as the bidge of Access Layer and Core Layer

Access Layer

  • Connected to the end devices (Computers, Printers, Servers etc)

Benefits

  • Redundancy: Multiple links across multiple devices provides better redundancy. If one switch is down, we have another alternate path to reach the destination.
  • Scalability: Easily expand network by connecting more access switches in access layer.

Logical Topology

network logical topology image

Logical Network Topology of Headquarter and Branch

🔴 Headquarter

Core Layer

  • 2 Core routers connect to the internet and network between branch via WAN provided by 2 internet service providers.
  • 2 Firewalls connect to the 2 core routers and serve as a bridge between the core and distribution layers. The firewalls also configure IPSec VPN to support employees who work remotely.

Distribution Layer

  • 2 Distribution switches to perform redundancy; if any one breaks, can use another route. This layer connects to the core layer and distributes the network to the access layer.

Access Layer

  • Access switches for each department to connect to access points to broadcast wireless signals and supports LAN for various employee devices such as computers, printers.
  • Each access switch is connected to 2 distribution switches for redundancy.

VLAN

VLAN NumberVLAN NameSubnetMax Devices
10Management192.168.10.0/24254
20Human Resource192.168.20.0/24254
30Marketing192.168.30.0/24254
40Finance192.168.40.0/24254
50Co-working space192.168.50.0/24254
60Guest192.168.60.0/24254
100IT Department192.168.100.0/24254
101Server192.168.101.0/24254
102Network Management192.168.102.0/24254

🔵 Branch

Core Layer

  • The core router connects to the Internet and the headquarter through an Internet service provider. And the firewall is connected to the distribution layer.

Distribution Layer

  • 2 Distribution switches connect from the core layer to the access layer.

Access Layer

  • Access switches for each department to connect to access points to broadcast wireless signals and supports LAN for various employee devices.
  • Each access switch is connected to 2 distribution switches for redundancy.

VLAN

VLAN NumberVLAN NameSubnetMax Devices
30Marketing192.168.30.0/24254
50Co-working space192.168.50.0/24254
60Guest192.168.60.0/24254
100IT Department192.168.100.0/24254

Physical Topology

Headquarter Floor 1 Physical Topology

headquarter floor-1 physical image

Headquarter Floor 1 Physical Topology

  • On the first floor of the headquarter, equipment is mostly placed in the access layer in various departments such as access points, servers, storage, and routed up to the network room on the second floor.
  • Access points will be connected with a CAT6 cables (green line) that can support speeds of up to 1 Gbps.
  • Servers and storage, are connected with fiber optic cables (red line). That supports speeds up to 10 Gbps.

Headquarter Floor 2 Physical Topology

headquarter floor-2 physical image

Headquarter Floor 2 Physical Topology

  • Almost all network devices in the core layer, distribution layer Installed in the network room on the 2nd floor and routed to the equipment in the access layer. Distributed to various departments on both floors 1 and 2.
  • 2 core routers connected to internet service providers And devices that require high bandwidth such as firewalls, distribution switches and access switches are connected with fiber optic cables (red line).

Branch Physical Topology

branch physical image

Branch Physical Topology

  • Since the branch has only 1 floor, network equipment is installed in the IT department. The devices in the core layer, distribution layer, and access switches that require high bandwidth are connected with fiber optics (red line). As for access points distributed in various departments, they will be connected with CAT6 (green line). Same as headquarter.

WLAN Heatmap

The heat map shows the coverage and clarity of the 2.4 GHz wireless signal on both headquarter and branch. The signal coverage is very good.

Headquarter Floor 1 WLAN Heatmap

headquarter floor-1 heatmap image

Headquarter Floor 1 WLAN Heatmap

Headquarter Floor 2 WLAN Heatmap

headquarter floor-2 heatmap image

Headquarter Floor 2 WLAN Heatmap

Branch WLAN Heatmap

branch heatmap image

Branch WLAN Heatmap

Security Policy

Security policies that help increase internet security for employees.

VPN 2-Factor Authentication

fortivpn client image

FortiToken Mobile and FortiClient VPN

For employees who need to connect to VPN Must install FortiClient VPN, FortiToken Mobile.

  • FortiClient VPN is used to connect to a VPN where each employee must enter a username, password and token (one-time password) in order to connect.
  • FortiToken Mobile for receiving token (one-time password) via phone.

Web Filtering

webfiltering image

Web Filtering setup in Firewall

  • Block websites that fall into unwanted categories, such as websites with dangerous content, gambling websites, etc.
  • Block malicious URLs that may be viruses.

Network Devices

List of network equipment used in the headquarter and branch.

Core Router

Cisco ASR 1002-X

SPECIFICATIONDETAIL
ModelCisco ASR 1002-X
Rack Height2RU
System Bandwidth5G (default) / 10G, 20G,36G (upgrade)
Router Processor (RP)Dual-core 2.13Ghz processor
Build-in Gigabit Ethernet port6 x SFP ports
RedundancySoftware (license purchase separately)
Cisco ASR 1000 Series ESP1 ESP slot
SIP and Ethernet line cardIntegrated ASR 1000-SIP10, not upgradable
Rack-mounting19-inch
DRAM Memory4GB-shared across RP, ESP, and SIP
Flash Memory8 GB
Shared port adapters3 SPA slots
External USB flash memory4-GB USB flash-memory support
Price35,000 BAHT
Amount3
Referencehttps://www.andovercg.com/datasheets/cisco-asr1000-aggregation-routers-2.pdf

Cisco ASR1000-SIP40 (Upgrade Shared Port Adapter Interface Processor for Cisco ASR 1002-X)

SPECIFICATIONDETAIL
ModelASR1002-SIP40
Device TypeExpansion module
Form FactorPlug-in module
Expansion Slots4 (total) / 4 (free) x expansion slot
Compatible Slots1 x expansion slot
Width16.7 in
Depth14.2 in
Height1.6 in
Weight3.9 kg
Price33,700 BAHT
Amount3
Referencehttps://www.cisco.com/c/en/us/products/collateral/routers/asr-1000-series-aggregation-services-routers/datasheet-c78-731632.html

SPA-1X10GE-L-V2 (Shared Port Adapter for Cisco ASR1000-SIP40)

SPECIFICATIONDETAIL
ModelSPA-1X10GE-L-V2
Product CompatibilityCisco ASR 1000 Series Router and others
Port Density per SPAOne 10 Gigabit Ethernet port
Physical Interface10-Gbps XFP optics
Features and Functions
1Full-duplex operation
2Up to 8000 VLANs per SPA
3Bridge protocol data unit (BPDU), Cisco Discovery Protocoland VLAN Trunking Protocol (VTP) filtering
Width17.15 cm
Depth18.49 cm
Height2.03 cm
Weight0.34 kg
Price5,500 BAHT
Amount12
Referencehttps://www.cisco.com/c/en/us/products/collateral/interfaces-modules/shared-port-adapters-spa-interface-processors/product_data_sheet0900aecd804dc62d.html

Distribution Switch

Cisco C9200-24PXG-E

SPECIFICATIONDETAIL
ModelCisco C9200-24PXG-E
Ports24 ports full PoE+ (8 mGig ports up to 10G, 16 ports up to 1G)
Switching capacity352 Gbps
Uplink moduleCisco C9200-NM-4X (4x 1G/10G network module)
Price120,000 BAHT
Amount4
Referencehttps://www.cisco.com/c/en/us/products/collateral/switches/catalyst-9200-series-switches/nb-06-cat9200-ser-data-sheet-cte-en.html

Access Switch

Cisco CBS220-24T-4X-EU-1

SPECIFICATIONDETAIL
ModelCisco CBS220-24T-4X-EU-1
Port Configuration24 ports (1 Gigabit Ethernet)
Additional Ports4 ports 10 Gigabit Ethernet ports (4X)
Power over Ethernet (PoE)Supports PoE+ (Power over Ethernet Plus)
Price14,200 BAHT
Amount13
Referencehttps://www.cisco.com/c/en/us/products/collateral/switches/business-220-series-smart-switches/datasheet-c78-744915.html

Access Point

Cisco C9105AXI-EWC-S

SPECIFICATIONDETAIL
ModelC9105AXI-EWC-S
Interface1x 100, 1000, 2500, 5000 Multigigabit Ethernet (RJ-45)
Radios
1802.11n version 2.0 4x4 MIMO with four spatial streams PHY data rates up to 1.5 Gbps
2802.11ac 8x8 downlink MU-MIMO with eight spatial streams PHY data rates up to 3.4 Gbps
3802.11ax 8x8 uplink/downlink MU-MIMO with eight spatial streams PHY data rates up to 5.38 Gbps
WLAN Controller compatibleCisco 3504 WLAN Controller
Power Consumption25.5W
Dimensions (W x D x H)9.17 x 9.17 x 1.58 in.
Weight1.71 kg
Price9,500 BAHT
Amount22
Referencehttps://itk.co.th/access-point/cisco-access-point/cisco-aironet/c9105axi-ewc-s

WLAN Controller

Cisco AIR-CT3504-K9

SPECIFICATIONDETAIL
ModelAIR-CT3504-K9
Ports4
Data Link ProtocolEthernet, Fast Ethernet, Gigabit Ethernet, IEEE 802.11b, PPP, IEEE 802.11a, IEEE 802.11g, 10 Gigabit Ethernet, IEEE 802.11n, IEEE 802.11ac Wave 2, IEEE 802.11ac Wave 1
Performance Throughput4 Gbps
Capacity Maximum number of access points150 ¦ Maximum number of clients: 3000 ¦ VLANs supported: 4096
Power Over Ethernet (PoE)Supported PoE
PowerAC 120/230 V (50/60 Hz)
Dimensions (WxDxH)4.394 cm x 34.13 cm x 21.59 cm
Weight2 kg
Price75,000 BAHT
Amount1
Referencehttps://itk.co.th/access-point/cisco-access-point/cisco-wireless-controller/air-ct3504-k9

Firewall

Fortinet FortiGate 120G

SPECIFICATIONDETAIL
ModelFortinet FortiGate 120G
PortsGigabit Ethernet 20 Ports ¦ 10 Gigabit Ethernet 4 Ports
Firewall Throughput(1518 / 512 / 64 byte UDP packets): 39 / 39 / 28 Gbps
IPsec VPN Throughput (512 byte)35 Gbps
Price165,500 BAHT
Amount3
Referencehttps://www.fortinet.com/content/dam/fortinet/assets/data-sheets/fortigate-120g-series.pdf

Devices Total Cost

DevicePriceAmountTotal (฿)
Core Router (upgraded)90,7003272,100
Distribution Switch120,0004480,000
Access Switch14,20013184,600
Access Point9,50022209,000
WLAN Controller75,000175,000
Firewall165,5003496,500
1,717,200

On-Prem Datacenter

Functions

  • Web Server: The web server is used to host the company's website and web applications.
  • Email Server: The email server is used to send and receive emails.
  • Git Repository: The Git repository is used to store the company's source code.
  • Stored Employee Data: The stored employee data is used to store the company's employee data.
  • Stored Product Data: The stored product data is used to store the company's product data.
  • Stored Communication Data: The stored communication data is used to store the company's communication data.
  • Stored Document Management: The stored document management is used to store the company's document management data.
  • Stored Security Data: The stored security data is used to store the company's security data.

Data Server Estimation

  • Project Document: The project document requires less than 100GB of storage space.
  • Source Code Repository Server: The source code repository server requires less than 100GB of storage space.
  • GitLab: The GitLab requires about 2.5GB of storage space for installation and 8GB of RAM for up to 1000 users.
  • Project Repository: The project repository requires less than 100GB of storage space.
  • Employee Data: The employee data requires about 20GB per user.
  • Summary: The summary of the data server estimation is about 2.2TB.

Specification

  • Availability 99.9% (3 nines) downtime 8.76 hours/year

Data Protection

  • RAID-5
    • Hard drives: 5x 2.4TB Hard drive
    • Total Usable Capacity: 9.6TB
    • Protection: 2.4TB
    • Speed gain: 4x read speed, no write speed gain
    • Fault tolerance: 1-drive failure

Network for Datacenter

Datacenter Network

Datacenter Network

Network for Datacenter

Network

  • The server is connected to 4 ports LAN access switch with fiber optic cables to support high bandwidth. and connected to storage with 2 LAN ports

Datacenter devices

  • Dell PowerEdge R750xs is the server for the datacenter network.
  • 2.4TB 10k 512e SAS ISE 12Gbps 2.5in Hot Plug Hard Drive is the hard drive for the datacenter network.
  • APC Smart-UPS C SMC3000RMI2U is the UPS for the datacenter network.
  • Synology 12-bay Plus series Redundant power, AMD Ryzen V1780B quad-core processor, 8GB DDR4 ECC is the NAS for the datacenter network.

Cluster Network

Cluster Network

  • Ubuntu 20.04 LTS is the operating system for the cluster network.
  • Kubernetes is the container orchestration platform for the cluster network.
  • Docker is the containerization platform for the cluster network.

Datacenter Devices

List of datacenter devices.

Server

SPECIFICATIONDETAIL
ModelDell PowerEdge R750xs Specification
CPU2 x Intel® Xeon® Silver 4314 2.4G, 16C/32T, 10.4GT/s, 24M Cache, Turbo, HT (135W) DDR4-2666
RAM64GB (2x 32GB) RDIMM, 3200MT/s, Dual Rank, 16Gb BASE
HDD4x 480GB SSD SATA Read Intensive 6Gbps 512 2.5in Hot-plug AG Drive, 1 DWPD
RAIDPERC H755 with rear load bracket
OPTICALNo Optical Drive (Optional)
NIC2x 1Gb LOM + Broadcom 5720 Quad Port 1GbE BASE-T Adapter, OCP NIC 3.0
POWERDual, Hot-Plug, Fully Redundant Power Supply (1+1), 1100W, Mixed Mode
CHASSIS2U, 2.5 inch Chassis with up to 16 Hot Plug Hard Drives, Trusted Platform Module 2.0 V3, + LCD Bezel + Half Length, Low Profile, 5 x16 + 1 x4 slots, ReadyRails Sliding Rails with Cable Management Arm
MANAGEMENTiDRAC9 Datacenter 15G with OpenManage Enterprise Advanced
Price240,740 BAHT
Amount1
Referencehttps://www.quickserv.co.th/

Hard Drive

SPECIFICATIONDETAIL
Model2.4TB 10k 512e SAS ISE 12Gbps 2.5in Hot Plug Hard Drive
Device TypeHard drive - hot-swap
Capacity2.4 TB
Form Factor2.5"
InterfaceSAS 12Gb/s
Features512 emulation ( 512e )
Drive TransferRate 1.2 GBps (external)
Spindle Speed10000 rpm
Interfaces1 x SAS 12 Gb/s
Compatible Bay2.5"
Price16,800 BAHT
Amount5
Referencehttps://www.dell.com/en-us/shop/24tb-10k-512e-sas-ise-12gbps-25in-hot-plug-hard-drive/apd/400-begi/storage-drives-media

NAS Storage

SPECIFICATIONDETAIL
ModelSynology 12-bay Plus series Redundant power, AMD Ryzen V1780B quad-core processor, 8GB DDR4 ECC
Processor : AMD Ryzen V1780B 64-bit 4-core 3.35 (base) / 3.6 (turbo) GHz
RAM : 8 GB DDR4 ECC UDIMM
Compatibility : 3.5″ SATA HDD, 2.5″ SATA SSD
LAN RJ-45 1GbE : 2
LAN RJ-45 10GbE : 1
USB 3.2 Gen 1 : 2
Price114,300 BAHT
Amount1
Referencehttps://itstorepro.com/synology-12-bay-rackstation-4-core-8gb-rs2423rpplus/

UPS

SPECIFICATIONDETAIL
ModelAPC Smart-UPS C SMC3000RMI2U
Main Input Voltage230 V
Main Output Voltage230 V
Rated power in W2100 W
Rated power in VA3000 VA
Price38,000 BAHT
Amount1
Referencehttps://www.apc.com/th/en/product/SMC3000RMI2U/apc-smartups-c-line-interactive-3kva-rackmount-2u-230v-8x-iec-c13+1x-iec-c19-outlets-usb-and-serial-communication-avr-graphic-lcd/

Devices Total Cost

DevicePriceAmountTotal (฿)
Server240,7401240,740
Hard Drives16,800584,000
NAS Storage114,3001114,300
UPS38,000138,000
477,040