Sunteți pe pagina 1din 25

Table Of Content

CHAPTER 1: INTRODUCTION
1.1 Background
1.1.1 Blockchain
1.1.2 Ethereum
1.2 Objectives
1.3 Purpose, Scope, and Applicability
1.3.1 Purpose
1.3.2 Scope
1.3.3 Applicability
1.4 Achievements
1.5 Organisation of Report
CHAPTER 2: SURVEY OF TECHNOLOGIES CHAPTER
3: REQUIREMENTS AND ANALYSIS
3.1 Problem Definition
3.2 Requirements Specification
3.2.1 Intended Audience And Reading Suggestions
3.2.2 Project Scope
3.2.3 Overall Description
3.2.3.1 Product Perspective
3.2.3.2 Product Features
3.2.3.3 User Class And Characteristics
3.2.3.4 Operating Environment
3.2.4 System Features
3.2.4.1 Description And Priority
3.2.4.2 Stimulus/Response Sequences
3.2.4.3 Functional Requirements
3.2.5 External Interface Requirements
3.2.5.1 User Interfaces
3.2.5.2 Hardware Interfaces
3.2.5.3 Software Interfaces
3.2.5.4 Communication Interfaces
3.2.6 Non Functional Requirements
3.2.6.1 Performance Requirements
3.2.6.1.1 E-R Diagram
3.2.6.1.2 Normalization
3.2.6.2 Safety Requirements
3.2.6.3 Security Requirements
3.2.6.4 Software Quality Attributes
3.3 Planning and Scheduling
3.4 Software and Hardware Requirements
3.5 Preliminary Product Description
3.6 Conceptual Models
CHAPTER 4: SYSTEM DESIGN
4.1 Basic Modules
4.2 Data Design
4.2.1 Schema Design
4.2.2 Data Integrity and Constraints
4.3 Procedural Design
4.3.1 Logic Diagrams
4.3.2 Data Structures
4.3.3 Algorithms Design
4.4 User interface design
4.5 Security Issues
4.6 Test Cases Design
INTRODUNTION
Blockchain is said to be one of the most significant technologies of the last decade,
enabling business transformations in almost every domain. But what is blockchain? It is
referred to as a distributed ledger, append-only database shared between different nodes in
the network. Ledgers were used a long time ago before blockchain appeared. Each sheet
had a unique number, so one could not remove or replace the data in the ledger. Periodical
checks of the ledger state enabled transparency in operations preventing fraud and
tampering. Besides classical ledgers there were also digital ones. Nevertheless,
blockchain brought everything to a new level. Traditional and even digital ledgers could
still be corrupted or lost. Block- chain technology in its turn presented a shared distributed
ledger that is fault tolerant due to its distributed nature and immutability (what is satisfied
by cryptographic algorithms built into blockchain). It means that everybody in the
network holds own copy of the ledger and nobody could change the data without notifying
the rest of the participants.

1.1 Background
In this chapter, we will provide all the necessary background needed for further reading
of this work. We will briefly describe blockchain and Ethereum. Then we will cover
Solidity as a smart contract programming language and provide an example of a smart
contract. Finally, we will introduce Business Process Model and Notation as a tool for
capturing the business processes.

1.1.1 Blockchain
Blockchain is a distributed append-only database that operates in a peer-to-peer network.
It means that every peer in the network owns the full or partial copy of the database [2, 3].
The distributed architecture of the blockchain increases fault tolerance, even if some
nodes will be removed from the network, it still can operate in a usual way. If somebody
wants to change something in blockchain he creates a transaction that is broadcasted to all
nodes and in the network, is verified and only then appended to the blockchain. It takes
some time, so transactions do not come in the order they were generated by users. It may
happen that in two different points in the network the same transaction is created twice,
which is called “double-spend attack” in Bitcoin [5]. Due to distributed nature of
blockchain it should have a mechanism that arranges the order of incoming transactions.
Usually transactions are grouped in blocks and considered to happen at the same moment
of time. However, in this setting different nodes can create blocks consisting of different
set of transactions and add it to blockchain, so which block should be considered as the
last one and valid? Hence, blockchain protocol introduces a concept called “Proof of
Work” - a special mathematical puzzle one need to solve to append the block to the
blockchain [4]. It is computationally hard and requires a node to spend some time and
resources to solve it. It is a “right” to participate in blockchain. Since not every user is
interested in solving the mathematical puzzle to add the transaction to the blockchain, but
network requires such “workers” to operate, an incentive was introduced to engage those
“workers”. In general, this process is called mining and nodes that do a Proof of Work to
add block to the chain are called miners. Miners are the crucial part of the blockchain
ecosystem as they create a capability of processing certain number of transactions per
minute.
Another important aspect of blockchain system is that every user maintains a pair of keys
that verify ownership and allow to transfer units of account or digital tokens to other users.
This is accomplished through asymmetric cryptography, when one key is public and
second is private, known only to its holder. The former is shared with the network and is
used as a personal address to which other users can send digital assets, whereas the latter
one is used to create a unique digital signature and create transaction on the blockchain.
Public-private key schema ensures the validity of ownership, because only the person who
holds the private key can create a valid digital signature and create transaction to transfer
value over the net- work. In addition, this schema allows users to operate as anonymous
entities, not exposing their real identities. High fault tolerance and consensus mechanism
enable blockchain to operate in anonymized untrusted environment where ownership and
value transfer is verified by the system.

1.1.2 Ethereum
Ethereum is a decentralized platform that runs smart contracts: applications that run
exactly as programmed without any possibility of downtime, censorship, fraud or third-
party interference [7]. These apps run on a custom built blockchain, an enormously
powerful shared global infrastructure that can move value around and represent the
ownership of property.
The runtime environment for smart contract is Ethereum Virtual Machine. It is completely
isolated, that means that smart contract code has no access to network, file system or any
other process. Smart contracts have limited access to other contracts running in Ethereum.

1 Accounts
There are two types of Ethereum accounts: external accounts and contract accounts. Both
types share the same address space and are treated equally by Ethereum Virtual Machine.
External accounts are controlled the public-private key pairs used by humans to access
the accounts. Contract accounts are controlled by the smart contract code that is stored in
this address. The address of external account is determined from the public key whereas
contract address is created upon deployment and is derived from the creator address.
Every account has a persistent key-value store. Also, every account has balance that can
be changed by sending transactions that include Ether - a cryptocurrency backed by
Ethereum platform.
2 Transactions
A transaction is a message sent from one account to another. It can include payload and
Ether. If the target account stores smart contract code, that code is executed with the
payload provided as input parameters. If the target account is the zero-account (has
address 0), the transaction triggers the creation of new contract. The payload of such
transaction should be a EVM bytecode and is executed. The execution output is
permanently stored as the smart contract code. Therefore, to create a smart contract
transaction should contain not the actual code, but the code that will return the smart
contract code.
3 Gas
Gas is a special unit of measure which purpose is to limit the resources needed to execute
the smart contract code. While the EVM executes the code, the gas is gradually depleted
according to specific rules. To send a transaction, certain amount of Ether must be paid
for the gas consumed by the execution. The creator of the transaction defines the gas
price, because he needs to pay the following amount in Ether: gas amount multiplied by
gas price. Transactions with higher gas price get higher priority in the execution queue. It
is interesting to note that this payment should be made upfront with the transaction itself.
If there is any gas left, its cost will be refunded. If the amount of consumed gas exceeded,
then the exception is triggered and all modifications are reverted to the previous state.
Therefore, it is necessary to wisely plan the amount of gas consumed by a smart contract,
because in the latter case gas will not be refunded.
4 Storage, memory and stack
Every account has a persistent memory area which is called storage. Storage is a key-value
store. Both key and value is 256-bit word. It is not possible to enumerate storage from the
contract. It is costly to read from the storage. Write operations to storage are more
expensive than read operations. A contract has access to only its own storage.
Another memory area is called memory. For each message call smart contract receives a
clear instance of memory. Memory is linear and can be addressed in a byte level. Read
operations are limited to the size of 256 bits. Write operations can be either 8 bits or 256
bits wide. When memory is expanded it adds and offset equal to 256 bits and the gas for
extension must be paid. Memory cost increases quadratically.
The Ethereum Virtual Machine is a stack machine, so all computations are performed on
a memory area called stack. It has maximum size of 1024 elements and stores words of
256 bits. Access to stack is limited to 16 top elements. It is not possible to access arbitrary
elements without first removing the top of the stack.
7 Message calls
Smart contracts can call other contracts or send Ether to external accounts with help of
message calls. Message calls are similar to transactions: they have source, target, payload,
Ether, cost gas and return data. A called contract will receive cleared memory instance and
a access the payload - it is provided in a separate memory area called calldata. Call are
limited to the depth of 1024 because of the EVM stack peculiarities.
There is a specific type of a message call - a delegatecall. It allows to execute target address
code in the context of the calling contract. Using delegate calls contracts can dynamically
load code from a different address at runtime. It makes possible to implement libraries for
smart contracts.
8 Logs
Ethereum provides a way to store logs about transactions. The information is stored in a
specially indexed data structure. Smart contracts cannot access the logs. However, logs
can be accessed from outside the blockchain in an efficient and cryptographically secure
way. Therefore, peers in the network can check the logs without downloading the whole
block- chain.

1.2 Objectives
 Low Commission Fees
 Incentive System of Ratings and Bounces
 Improved Security Measures
 Automated Identity Verification
 Creating Virtual Tour

1.3 Purpose, Scope And Applicability


The description of Purpose, Scope, and Applicability are given below:

1.3.1 Purpose
This project is concerned about real-estate business, where the whole ecosystem
developed in decentralized manaer that promotes
Shor-term loadging between Landlord and Tenants to conclude short-term real estate
rental contracts.
This will increases security measures, save lot of money that charged to both party
by real-estate broker as commission to introduce both party to each other, and as the whole
process is verified by blockchain, this will reduce mis-understaings often occurs between
landlords and tenants as landlord will be able to clearly state their rule and this application
also promotes the modern world travelers idea of “ Hand Luggage ”.
The limitaion that is present in the whole system is time constrain as blockchain need
time to approve and add the transaction to the ledger and return unique hash of it user has
to wait for it.

1.3.2 Scope
Project ecosystem most closely matches the expectations of young people of generation
Y: more adventures, exciting experiences, fewer formalities and pre-known routes. In the
modern world, most travelers choose the idea of "hand luggage" and full flexibility of
movement without burdening themselves with limitations. Having a smartphone and
access to the Internet, the traveler and the real estate owner will always be able to
negotiate and conclude a smart rental contract, and also to make a payment transaction
among themselves. It is convenient, simple and reliable for both parties. The use of crypto
currency in the transactions along with traditional methods of payment significantly
expands the possibilities for both sides.
“Generation Y (Millennials) - a generation born after 1981, met the new millennium at
a young age, characterized primarily by deep involvement in digital technology. And for
this generation traveling is one of life's priorities, higher than, for example, buying your
own home or buying a car. 44% of Millennials would spend free money on travels2.”

Project will make it possible to solve and simplify the problems that most of the guests
and landlords face. All this will not only save money on rental housing when traveling,
but will also open new countries and continents, for people who can’t and do not want to
spend large sums on expensive group journeys and tours. We expect that our ecosystem
will be able to significantly expand the existing short-term lodging market, improve
security, establish a high level of trust between users and will promote the development
of tourism both within countries and on the international level.

Now it is clearly evident that the generation Y is on the peak of technological innovation.
This generation of active young people is the main driving force in determining the vector
of development, not only of technology, but also of the future way of life of mankind.
With their flair, they choose the technologies of the future and promising ideas even at
the moment when those are at the earliest stages of inception.

1.3.3 Applicability
Project ecosystem is based on Full Node and Lite Client architecture. Full Nodes do all
the computational work and connect with Lite Clients. Computational core, based on
Node.js meets all the necessary requirements for reliable operation and fast transactions.
PostgreSQL combined with PostGIS is used for storing profile information, as well as
geographical locations. Using Fetch service provides quick access to required
information. IPFS protocol is used as a storage system for pictures and virtual tours of the
rented properties. API interface, provided by Full Nodes is used to connect Lite Clients
with Full Nodes. Lite Clients are mobile apps, for smartphones and tablets. Two
platforms, supported by ecosystem are Android and iOS where we first build this app for
Android user only. The combination of these time-tested technologies along with
Ethereum based smart contracts provides the overall reliability and speed of the entire
Project ecosystem.

PRINCIPLE OF OPERATION
Guests and real estate owners meet in the application ecosystem. The guest transfers the
full amount of the lease in application coin to a temporary wallet. The parties conclude a
smart contract for a short-term lease (on Ethereum) with the entry and its confirmation in
the blockchain.

Project ecosystem receives 4% of the amount of a smart contract as a commission. 30%


of the commission paid is returned in the form of bonuses to the guest and the property
owner. Thus, the real commission is 2.8%. The real estate owner receives transactions for
rent in app coin from a temporary wallet (every day for the day ahead).

The real estate owner can exchange received app coin for BTC, ETH and fiat money
(USD, EUR, JPY and CNY). As the number of rental smart contracts increases, the stable
demand for app coin among guest’s increases, thus the coin price starts to grow actively.
This growth and value are secured by the unique opportunities that the project’s
ecosystem provides to all its users.

EXAMPLES OF PROCESSES

Reservation and check-in of the guest:

The guest finds a suitable accommodation option in the application ecosystem and pays
for a reservation in app coin. Coins are transferred to a temporary wallet. A smart contract
containing all the terms is concluded between the guest and the property owner. Upon
check-in, the host gives keys to the guest and uses the application in his phone to scan the
QR code from the guest's phone screen. The system perceives this as "check-in" and app
coin are transferred from a temporary wallet to the wallet of the property owner. The guest
receives the right to use the property for the duration of the contract.
Check out of the guest and feedback:

When a guest leaves the rented property, the host, using the application in his phone,
scans the QR code from the guest's phone screen and receives the keys back. The system
sees this as a "check out". Guest leaves the rented room. The property owner and the guest
leave feedbacks for each other. Both sides get bonuses in app coin from application
ecosystem for leaving feedbacks. The platform generates user ratings based on reviews
and related data.

1.4 Achievements

While working on this project I learnt some of the core features of blockchain
technology stack that how people are working on it and the way it making foundation of
our next generation og web that is web3.0; I also come to know about other new
technology stack like React, Angular, Ionic, and the dependecy management using
Nodejs and framwork like Truffle, Drizzle and new programming language like solidity,
web3.js and tools like Ganache, Metamask as chrome extension and new file management
system like IPFS and the most important thing is a whole new decentralized DB called as
OrbitDB to store application data in full decentralized way which make our application
more robust.
This application help Landlord and tenants to made their agreement simple and
provides better understanding between them. This new ecosystem is oriented on the
markets of developing countries that attract travelers / tourists and have a great growth
potential.

1.5 Organisation of Report

This paper is divided into five chapters. Chapter 2 covers survey of technology that
are used while developing this project: Truffle, Ethereum, smart contracts. Chapter 3
describes the business processes of a real estate company and presents the domain model
that will be used in the proof-of-concept application. In Chapter 4 we discuss and define
which parts of the modeled business processes can be moved to the blockchain. Then, we
design and implement a proof-of-concept hybrid application that reflects the business
processes modeled in Chapter 3. We cover the technicalities related to smart contracts,
their deployment and integration with a traditional web application. Additionally, as a
part of Chapter 4, we discuss a tampering-resilient document storage. We consider IPFS
and Ethereum Swarm as two possible options, compare them and integrate one of this
solutions into our hybrid application.
Survey OF Technology
“In the modern world, already half of humanity are active users of the Internet , almost
4.33 billion active Internet users till -2019,Jan in world and In India only 493 million
users having Internet where 293 million resides in urban having Internet and 200
million in rural India.”

1. Ethereum provides smart contract to develop decentralized application with more


robust manaer using solidity language like any other object oriented programming
language.
2. IPFS and SWARN are two file storage system which facilitates the service of
storing your file data in peer-to-peer network with unique hash, but as for this
applicaiton we will go with IPFS as it’s internal arhitecture is more robust than
SWARN Because IPFS is good at delivering large chunks of data with high
throughput and high latency. Swarm is also good at delivering small chunks of data
with low latency, which is necessary for some anticipated applications.
3. Truffle, Drizzle, Tendermint, Embark these are the framework which supports,
help and make your backend that is smart contract development easier and more
over that they segrigate things for you and make your code, logic more concrete
and Here we are going to use Drizzle as our basic framework for contract
development Beacuse it not only provides features above listed but also help you
to manages your application state with respect to, what is happaing in you
blockchain network that help you to do internal routing and build you application
stack more predictable.
4. React, Angular, Vue these are some front-end technology present in now days
which helps you to take you application UI/UX to new level and make it more
attractive, interactive and easy to use.Here we will use as React in our development
stack as it’s more light weight than other two stack and promotes re-useability of
your component and more over that it work with component and irrespective of
other two stack it maintains state and properties for all it’s component and also
provides features like Redux and other lifecycle hook for each component where
you can sacle your application more easily.
5. Web3.js currently this is the only js librery found that help us to make connect our
front-end application with our deployied smart contract and make call to their
function using ABI artifact generated by truffle suit while compiling developed
smart contract.
6. MetaMask this is the browser extension which is mendatory to installed in the
browser as extnsion of it to make anthis is the browser extension which is
mendatory to installed in the browser as extnsion of it to make any transaction
happen in our application beacuse otherwise user has to become a full node to use
all features of application.
7. Ganache, Kovan, Rinkeby, or Goerli are some of the blockchain testnet provider
which works under the hood and you deploy your smart contract on these networ
first to test your application inseted of making it to directly deployed in main
Ethereum network which cause real ether for deployment as well as for testing
Transactions in Ganache UI

also.Here, we will use Ganache as our test network because it maintains the
blockchain ledger and also creates the whole setup for your test network in one
click using GUI or by one command in using ganache-cli. It also provides you
mnemonic to seed your metamask wallet with fake 100ETH ether.

8. OrbitDB, Post-greSQl, MongoDB, MySQL these are some Database provider


which help you to build you database scheme and table to store your application
data where MySQL is SQL query language and other are NOSQL we are going to
use OrbitDB as our DataBase storage where it store our data in following manaer:
 log: an immutable (append-only) log with traversable history. Useful for "latest
N" use cases or as a message queue.
 feed: a mutable log with traversable history. Entries can be added and removed.
Useful for "shopping cart" type of use cases, or for example as a feed of blog
posts or "tweets".
 keyvalue: a key-value database just like your favourite key-value database.
 docs: a document database to which JSON documents can be stored and indexed
by a specified key. Useful for building search indices or version controlling
documents and data.
 counter: Useful for counting events separate from log/feed data.

Requirements and Analysis

3.1 Problem Definition


In the current situation on the short-term rental market, misunderstanding often occurs
between the property owner and the guest. This is primarily due to the fact that the
property owner does not publish full information about the property. As a result, when
the guests arrive, they may be very disappointed. We cannot change the human factor,
but we can improve technical and technological factors and through this make the market
as transparent as possible.

The main problems faced by property owners are the difficulties associated with
increasing occupancy of facilities by guests, high commissions, security problems, trust,
difficulty in billing and linking the transactions with bank cards, as well as difficulties in
obtaining the feedback and positive ratings.

The real estate owners do not have the ability to fully show the property on a simple photo
the way it looks like in reality, and because of this, sometimes they face problems with
the guests. This understatement often entails guest discontent, and, as a consequence, a
bad review, low rating and poor occupancy.

Difficulties traditionally encountered by the guests are high commissions for services,
problems of trust due to lack of feedback, reliability of the contract, security, old and
irrelevant photos. The owners have few reviews, if any, and the payment possibilities for
accommodation are minimal.

Application ecosystem is created to solve most of the existing problems in the industry
and to bring the process of real estate rent to a new level of development.

3.2 Requirements Specification


The purpose of this document is to build an online system to Rent propeties and promotes
less hand luggage for travelers which lead to global turism increment.

3.2.1 Intended Audience And Reading Suggestions


This project is a prototype for the House Renatl system and it is restricted within the
college premises. This has been implemented under the guidance of college professors.
This project is useful for the Real Estate team and as well as to the Tenants.

3.2.2 PROJECT SCOPE


The purpose of the online flight management system is to ease flight management and to
create a convenient and easy-to-use application for passengers, trying to buy airline
tickets. The system is based on a relational database with its flight management and
reservation functions. We will have a database server supporting hundreds of major cities
around the world as well as thousands of flights by various airline companies. Above all,
we hope to provide a comfortable user experience along with the best pricing available.

3.2.3 Overall Description


This contains the overall descrption of the whole project as stated below:

3.2.3.1 Product Perspective


A distributed airline database system stores the following information.
 House details:
It includes the House details and it’s rule declared by landlord at time of advertising
it on application platform along with the location or location on map , whereas
business intelligence will state the number of days booked/available to that home
between tenants booked etc.
 Customer description:
It includes customer code, name, address and phone number. This information may
be used for keeping the records of the customer for any emergency or for any other
kind of information where customer can be landlord or tenants irrespective of them.

 Reservation description:
It includes tenants details, code number, landlord details, date of check-in, date of
check-out.

3.2.3.2 Product Features

 LOW COMMISSION FEES


Existing platforms, which are intermediaries in the renting process, take a fairly high
percentage as a commission. Now short-term rental market average total commission
(combined commission for guest and landlord) are in the range of 9% - 158. On the
application platform, the total commission fees will be 4% (2.0% paid by the guest and
2.0% by the landlord). Thus, we will be able to provide better and more innovative
services, and reducing commission 2-3 times at the same time.

 THE INCENTIVE SYSTEM OF RATINGS AND BONUSES


Slightly less than half of active Airbnb listings have rating (47%), but of those who have
it, almost 60% have a rating of 5 out of 5. 89.3% of rated landlords have a rating of 4.5
or higher9.

Application offers a system of bonuses that guests and hosts receive


for making certain actions in the system: an identification process,
a detailed description of the home, adding photos, writing reviews,
etc.

Putting ratings on the economic rails, will allow guests to


receive more profitable offers and to save money. The owners,
receiving reviews and ratings, will be able to reach the full level
of their real load much quicker and thus earn more money, since
even lower- rated ads get higher rental loads than those which do
not have reviews at all.

For each feedback both guest and the owner will also collect app coin, which they can
use for future trips.
The size of the bonus is determined by both the rating given by the opposite side as a
review, and by the number of leased days and nights. Users will be able to receive up to
30% of the commission paid back in the form of bonuses.
15

 IMPROVED SECURITY MEASURES


In order to provide additional security and increase the level of loyalty and trust
between the guest and the host, when the guest checks in, host gives the guest the
keys and uses the application in his phone to scan the QR code from the guest's
phone screen. Thus, the owner receives confirmation that the person who made
the booking is in front of him. Also, this action is registered in the system as a
check-in. After that, the rent fee for the first day of placement is transferred from
the temporary deposit wallet to the host's wallet, and then transfers are made
every day for the day ahead.

At the time guest departures from the apartment and returns the keys to the owner,
it is possible to repeat this process, confirming the check-out to the system.

 AUTOMATED IDENTITY VERIFICATION


According to the LearnAirbnb.com report, almost half of the owners (46.5%) did
not have a confirmed ID10. Completely authorized hosts receive an average of 3
times more reviews than the ones who did not fully complete authorization, which
increases the guest flow and the overall loyalty of customers. Our ecosystem will
solve this problem by implementing an automatic ID confirmation system using
face recognition technology. To confirm their identity, persons will need to take
a picture of their face and a document proving their identity.

3.2.3.3 User Class And Characteristics


Users of the system should be able to retrieve rental information between listed
house and appartment with the given date/time of check-in and check-out from
the database. A route from tenants to booked rental will be directed in map. The
system will support two types of user privileges, Tenants, and Landlord. Tenants
will have access to tenants functions, and the landlord will have access to both
tenants and property management functions.
The tenants should be able to do the following functions:
 Make a new reservation
• One-way
• Multiple House booking at the same time where check-out day is
same as check-in day for different rental property but not for same
• Flexible Date/time
• Confirmation

 Cancel an existing reservation


 View his itinerary

The Landlord should have following management functionalities:


16

 Tenants Functions.
• Get all tenants who have house reserved on a given property.
• Get all house for a given tenants.
• View house schedule.
• Get all tenants whose check-in and check-out times are on time/delayed.
• Calculate total income for a given property.
 Administrative
• Add/Delete a property
• Add a new property
• Update rule and regulation for property.
• Update check-out/in times for house in rule and day when one can take
his property for rent.

3.2.3.4 Operating Environment


Operating environment for the home rental application as listed below:
 Operating System: Windows, Linux, MacOsx
Recommended: Linux or MacOsx;
 MetaMask Extension in Browser
 Orbit DB
 Truffle
 Drizzle
 Ganache GUI and cli
 React and React.js
 Nodejs and npm
 Web3.js
 IDE or any text editor of your choice as I am using Visual Studio Code

3.2.4 System Features

3.2.4.1 Description And Priority


In this section we will disccuss some of our core features of apllication that how
our smart contract is going to work and how the internal listing of property and
reservation of rental will happen.

As shown in above figure client is lite client and there is full node developed
which have all business logic of application and if there is any file IO happens
will be managed by IPFS and all data entry related to DB will happen through
DB interface made to orbit-db using nosql that is a collecction will be created in
17

the document of json will be stored and all the transaction will be minied in block
by truffle and can be seen in ganache cli or GUI with corresponding block-hash.

Architecture of Application

3.2.4.2 Stimulus/Response Sequences


 User can view listed propert for rental and can applay filter according to
their prefernce
 To book a rental or list their property user must be registered and logged-
in to application
 User can register himself as tenants or landlord where tenanats can become
landlord after a time if he wants but landlord can’t.
 User can use real ether wallet for their transaction or alternatively have
option for card also and can also able to use app coin earned by giving
feedback or by purchasing them at store.
 Response for tenants
o After he serach and select one of the rental form result and can see
the rule and regulation of rental provided by landlord at time of
advertising.
o Can check feedback of other tenants given to that landlord before
making reservation.
o Confirm the reservation for selected rental.
o Has flexibilty for check-in and check-out.
o Can cancel his reservation before 24hrs otherwise he will be charged
for one day renatl.
18

o Will get bounces for giving feedback to landlord.


 Response for landlord
o He can list his property by submitting the standard form made for
property registeration and can be able to see listed property in
property list.
o Can accept or reject the deal of tenants made by tenants independent
of feedback given to tenants y other landlord at time of acceptence.
o Will get rent of next day before the day in recursive way.
o Will get bounces for giving feedback to tenants.

3.2.4.3 Functional Requirements


Guest comes to the app and do his kyc by
verifiying their identity and find good offer
Can get virtual tour of the landlord advertised
property to expericence
Make reservation and sent deal to landlord
By using app coin
Here they uses metamask to get their
transaction done and under the hood call
required funtion of your deployeid smart
contract.
As deal get accepted by landlord the required
amount get transfered to temporary wallet
of tenants and debited from tenants account
and deal get completed with unique qr-code
and transfered to both tenants and landlord
at registered mail for confirmation.
At time of check-in tenants scans the landlord
Qr-code and system receive it as check-in and
vice-versa that is landlord sacns qr-code of
tenants and system take it as check-out.
At time of chek-out both can give feedback
to each other and then only they get bounces
according to received feedback from each-
other.
19

3.2.5 External Interface Requirements

This describes the external resources required or the action that to be performed
in oreder to get this prototype start working are as follow:

3.2.5.1 User Interfaces


 Front-end technology: React, Web3.js, Material-UI
 Back-end technology: Truffle, Drizzle
 Tool Required: Ganache GUI, ganache-cli, truffle-cli
 DB Interface: Orbit DB, IPFS

3.2.5.2 Hardware Interfaces


 Windows but recommended Linux, MacOsx
 A browser which supports MetaMask, Web3.js

3.2.5.3 Software Interfaces


Following are the software used for the House Rental application.

Software used Description


Operating system We have chosen Windows beacuse of
less resources but the most
recommended os will be MacOSx for
its best performance.
Database To save the details of users and
property we are using orbit-db as it
provides more robut features than any
other NOSQL database.
Solidity To make smart contract we have
solidity language developed by
ethereum itself.
Material-UI To make UX better for application we
are using material ui for making
component in react and model.
IPFS Offers a solution for distributed file
storage and IPFS is more mature
solution in terms of scaling, adoption,
community and code maturity while
serving.
Ganache This is tool developed for build in
meomory blockchain to deploy and
test our smart contract before rolling
out to main-net.
20

Truffle with Drizzle This help us to maintain state of our


application and also support usto
write, test, deploy as well as config our
ABI and other config in very handy
way.

3.2.5.4 Communication Interfaces


This project supports chrome as well as firefox of web browsers because they
have MetaMask as their extension to install in browser store. We are using simple
electronic forms for the reservation forms, rental booking etc.

3.2.6 Non Functional Requirements


In systems engineering and requirements engineering, a non-functional
requirement (NFR) is a requirement that specifies criteria that can be used to
judge the operation of a system, rather than specific behaviour’s. They are
contrasted with functional requirements that define specific behaviour or
functions.

3.2.6.1 Performance Requirements


The steps involved to perform the implementation of airline database are as listed
below:

3.2.6.1.1 E-R Diagram


The E-R Diagram constitutes a technique for representing the logical
structure of a database in a pictorial manner. This analysis is then used to organize
data as a relation, normalizing relation and finally obtaining a relation database.

 ENTITIES: Which specify distinct real-world items in an application.

 PROPERTIES/ATTRIBUTES: Which specify properties of an entity and


relationships.

 RELATIONSHIPS: Which connect entities and represent meaningful


dependencies between them.
21

ER Diagram
22

3.2.6.1.2 Normalization
The basic objective of normalization is to reduce redundancy which means that
information is to be stored only once. Storing information several times leads to
wastage of storage space and increase in the total size of the data stored.
If a database is not properly designed it can give rise to modification anomalies.
Modification anomalies arise when data is added to, changed or deleted from a
database table. Similarly, in traditional databases as well as improperly designed
relational databases, data redundancy can be a problem. These can be eliminated
by normalizing a database.
Normalization is the process of breaking down a table into smaller tables. So that
each table deals with a single theme. There are three different kinds of
modifications of anomalies and formulated the first, second and third normal
forms (3NF) is considered sufficient for most practical purposes. It should be
considered only after a thorough analysis and complete understanding of its
implications.

3.2.6.2 Safety Requirements


If there is extensive damage to a wide portion of the database due to catastrophic
failure, such as a HASH not found, the recovery method restores a past copy of
the database that was backed up to archival storage (typically tape) and
reconstructs a more current state by reapplying or redoing the operations of
committed transactions from the backed up log, up to the time of failure.

3.2.6.3 Security Requirements


Security systems need database storage just like many other applications.
However, the special requirements of the security market mean that vendors must
choose their database partner carefully and verify for each hash mapping
correctly.

3.2.6.4 Software Quality Attributes

 Availability: The flight should be available on the specified date and


specified time as many customers are doing advance reservations.

 Correctness: The flight should reach start from correct start terminal and
should reach the correct destination.

 Maintainability: The administrators and flight in chargers should maintain


correct schedules of flights.
23

 Usability: The flight schedules should satisfy a maximum number of


customer’s needs.

3.3 Planning and Scheduling


Planning and scheduling is a complicated part of software development.
Planning, for our purposes, can be thought of as determining all the small tasks
that must be carried out in order to accomplish the goal. Planning also takes into
account, rules, known as constraints, which, control when certain tasks can or
cannot happen. Scheduling can be thought of as determining whether adequate
resources are available to carry out the plan.
One can see the Gantt chart and Program Evaluation Review Technique (PERT)
as shown below:

3.3.1 Gantt Chart:


A Gantt chart is a graphical depiction of a project schedule. It's is a type of
bar chart that shows the start and finish dates of several elements of a project that
include resources, milestones, tasks, and dependencies.

Applications Gantt Chart


24

3.3.2 PERT Chart:


A PERT chart is a project management tool that provides a graphical
representation of a project's timeline. The Program Evaluation Review Technique
(PERT) breaks down the individual tasks of a project for analysis.

Applications PERT Chart

3.4 Software and Hardware Requirements

 Software Requirements:
 Truffle 5+
 Ganache v2.0+
 Meta-Mask
 Hardware Requirements:
 OS (Recommended macOSx)
o Windows 10
o Linux
o macOSx
 RAM min: - 8GB DDR4
 Graphics Card min: - 4GB DDR4
o NVidia 1050
o Radeon 560x
25

 Processor: -
o Intel 8th gen i5
o Ryzen 5
 Clock Speed: - min: - 2GHz, recommended: - 3.6GHz
 Memory: - 10GB
 If Hardware wallet for Met-Mask

S-ar putea să vă placă și