SystemArchitecture

Download Report

Transcript SystemArchitecture

Course OD601
通信软件开发与管理
学时:32
学分:2
讲师:罗文彬
1
罗文彬讲座
All Rights Reserved
Class Subject
 Communication Overview
 System Architecture Overview
 Performance and Reliability
 Operation, Administration, & Maintenance
 Development Methodology
 ISO9000/TL9000
 CMMI
 Project Management
2
罗文彬讲座
All Rights Reserved
Software Structure (1)
A software system consists of multiple
software tasks. In theory all the tasks can
be accomplished in one single process.
•Main Process
•Task 1
•Task 2
•Task 3
•Task 5
3
•Task 4
罗文彬讲座
All Rights Reserved
Software Structure (2)
To make the software system more
effective and manageable, software tasks
are divided into multiple processes.
The same principle applies to multiple
functions and threads within a process.
Process 1
Process 2
Process 3
Process 5
4
Process 4
罗文彬讲座
All Rights Reserved
Inter-Process Communication
Data has to be passed through different
processes to accomplish the desired software
tasks. The efficiency of inter-process
communication is very critical to the system
performance and reliability in a real-time
communication system.
sending
process
read
•write
receiving
process
•Shared
memory
5
罗文彬讲座
All Rights Reserved
Message Handler
For inter-process communication (IPC), every
process must create a share memory queue to
allow other processes can write data into it.
To be efficient and convenient, a Message
Handler process can be created to support the
following IPC functionalities in a uniform way:
• Message queue registration
• Message queue creation
• Message queue management
• Message read/write functions
6
罗文彬讲座
All Rights Reserved
Network System Architecture
Communication Software System is a
collection of processes arranged so that data
can be passed in and out of the system with
highest efficiency and reliability.
Input traffic
handler
Initialization
7
Output traffic
handler
Application
Protocol
Provisioning
measurement
alarm
罗文彬讲座
•NMS/OSS
All Rights Reserved
System Initialization (1)
Initialization (INIT) process is the first process
to be brought up for the communication
software system. It then initialize all the
other processes in sequence.
8
罗文彬讲座
All Rights Reserved
System Initialization (2)
The software system usually initialized in
two phases. Each process will initialize the
global resource such as shared memory,
static data, threads or message queues in
the first phase. Once all the processes
complete the global resource initialization
then the entire system can be brought up
with all the processes activated at the same
time.
9
罗文彬讲座
All Rights Reserved
System Initialization (3)
•INIT
•PROC B
•PROC A
•PROC C
Shared
Memory
Phase 1 Initialization: Global Resource
Process ID, shared memory creation,
message queue creation & association
Phase 2 Initialization:
load configuration data, shared memory attachment,
heart beat
10
罗文彬讲座
All Rights Reserved
System Initialization (4)
Once all the processes successfully initialized, the
INIT process will monitor all the processes through
periodical heartbeat mechanism. If heartbeat
failed on a process, INIT will either recover the
particular process or the entire system based on
designed initialization algorithm.
•PROC A count
•PROC B count
•PROC C count
•PROC A
11
•INIT
Peg count
Peg count
•PROC B
罗文彬讲座
Peg count
•PROC C
All Rights Reserved
System Initialization (5)
Process could lose heartbeat because:
• Process dies
• Process too busy (infinite loop)
Level 1 recovery, INIT kills the process which loses
consecutive heartbeats, and re-initialize the process.
Level 2 recovery, INIT re-initialize the process and its
global resource.
Level 3 recovery, INIT re-start the whole system.
Level 4 recovery, INIT trigger OS re-boot.
12
罗文彬讲座
All Rights Reserved
Protocol Handler
Level 1 – Physical Layer (ie. RS232)
Physical Layer handles bit stream
transmission through wire and connector.
Level 2 – Packet layer (ie. Ethernet)
Packet Layer gets the bit stream from
physical layer and generates packets data
through firmware on the chip and circuit
board.
13
罗文彬讲座
All Rights Reserved
Input/Output Handler
Level 3 –Link Layer
Link layer is responsible for managing the
links by block/unblock links, open/close links,
get packet data from links, and put packet
data onto the links. Link layer also monitors
the link status. In case of link failure, it
informs the application layer so that the
application layer is able to take appropriate
actions.
14
罗文彬讲座
All Rights Reserved
Application Handler (1)
Message Parsing
Application process get the input message
from link layer and decode the message for
processing by the application logic. Once the
application logic is done then the result will be
encoded into an output message and sends out
to the network through link layer.
Since every message/packet has to be decoded
and encoded, the message parsing function is
also very critical to the overall performance.
15
罗文彬讲座
All Rights Reserved
Application Handler (2)
Application Logic
Application logic usually defined in finite
state machine or threads to process the
incoming messages in parallel to increase the
system throughput.
•FSM
•Threads
16
罗文彬讲座
All Rights Reserved
Network Subscriber Database
17
罗文彬讲座
All Rights Reserved
Subscriber Database (1)
Network Centralized Subscriber Database
Economy drive technology growth and
network usage growth. People cannot live
without the communication network today.
Network with more than 100 millions users
are not uncommon. It is more efficient to
manage the subscriber’s data in a network
centralized database. Network components
or applications can access the centralized
data base in real-time.
18
罗文彬讲座
All Rights Reserved
Subscriber Database (2)
Network Centralized Database Design
• Data Independence
• Data Segmentation
• Data Replication
• Data Consistency
• Data Schema Upgrade
• Backup & Recovery
19
罗文彬讲座
All Rights Reserved
Subscriber Database (3)
Database Independence
To increase database usage for different
applications, the database should be
independent from the application logic. The
data schema, data storage and data access
interface should be open standard such as SQL,
LDAP, XML, CORBA, etc.
Data
Data
Data
APP1
APP2
APP3
Data
Server
APP1
20
罗文彬讲座
APP2
APP3
All Rights Reserved
Subscriber Database (4)
Database Segmentation
For very large database, the data have to be
divided onto multiple data servers. With data
segmented on different servers, a routing
mechanism is needed to route the data query
to the corresponding data server.
•Segment 1
•Segment 2
•Segment 3
•Application
Server
21
罗文彬讲座
All Rights Reserved
Subscriber Database (5)
Database Replication
To increase database reliability for large
network centralized database, the database
must be replicated across geographic locations.
The database can be replicated in multiple
times for adding reliability.
22
罗文彬讲座
All Rights Reserved
Subscriber Database (6)
Database Consistency
Data replication may failed due to network
congestion, or data server overload. The
replicated data will become inconsistent when
replication failure happen. To ensure the data
consistency, data audit mechanism needs to be
in place to check the data in background and
report errors when inconsistent data is found.
The inconsistent data can be fixed either
manually or automatically.
23
罗文彬讲座
All Rights Reserved
Subscriber Database (7)
Database Schema Upgrade
Data schema upgrade is a very complicated item
in the replicated and segmented database. The
new schema and interface change has to be
backward compatible so that the entire
database can be upgraded gradually.
Application
Server
24
Application
Server
罗文彬讲座
All Rights Reserved
Subscriber Database (8)
Database Backup & Recovery
Single database failure can recover from the
mate. Double database failures have to recover
from the third copy of database.
Application
Server
25
Application
Server
罗文彬讲座
All Rights Reserved
OA&M Process
Alarm Message
Each process should report alarm condition
to the network management system when
system failure detected.
Measurement
Along with the incoming traffic processing,
some key statistic data should be collected for
off-line study or investigation.
Provisioning
A interface to the upstream system is
needed to support the data provisioning.
26
罗文彬讲座
All Rights Reserved
OA&M Network Architecture
•Network Fault Management
•PROC 1
MEAS
•NFM
Alarm
Measurement
•PROC 2
•OA&M
•Provision Data
•PROC 3
•OSS
LOG
Operation Support System
27
罗文彬讲座
All Rights Reserved