2015年7月16日 星期四

Software-Defined Networking (SDN) Layers and Architecture Terminology

Introduction

     Software-Defined Networking (SDN) is a term of the programmable networks framework. The key differences between SDN and the common network are abstraction and virtualization. SDN separates the network function into management plant, control plane and data plane. The goal of SDN is to leverage this separation, and the associated programmability, in order to reduce complexity and enable faster innovation at all planes.


Terminology

  • Forwarding Plane (FP) - The collection of resources across all network devices responsible for forwarding traffic.
  • Control Plane (CP) - The collection of functions responsible for controlling one or more network devices. CP instructs network devices with respect to how to process and forward packets. The control plane interacts primarily with the forwarding plane and, to a lesser extent, with the operational plane.
  • Management Plane (MP) - The collection of functions responsible for monitoring, configuring, and maintaining one or more network devices or parts of network devices. The management plane is mostly related to the operational plane (it is related less to the forwarding plane).

SDN Model View


  • ForCES

The IETF Forwarding and Control Element Separation (ForCES) framework [RFC3746] consists of one model and two protocols. ForCES separates the forwarding plane from the control plane via an open interface, namely the ForCES protocol [RFC5810], which operates on entities of the forwarding plane that have been modeled using the ForCES model [RFC5812].
The ForCES model [RFC5812] is based on the fact that a network element is composed of numerous logically separate entities that cooperate to provide a given functionality (such as routing or IP switching) and yet appear as a normal integrated network element to external entities.
ForCES models the forwarding plane using Logical Functional Blocks (LFBs), which, when connected in a graph, compose the Forwarding Element (FE). LFBs are described in XML, based on an XML schema.
  • NETCONF/YANG

The Network Configuration Protocol (NETCONF) [RFC6241] is an IETF network management protocol [RFC6632]. NETCONF provides mechanisms to install, manipulate, and delete the configuration of network devices.
NETCONF protocol operations are realized as remote procedure calls (RPCs). The NETCONF protocol uses XML-based data encoding for the configuration data as well as the protocol messages. Recent studies, such as [ESNet] and [PENet], have shown that NETCONF performs better than SNMP [RFC3411].
Additionally, the YANG data modeling language [RFC6020] has been developed for specifying NETCONF data models and protocol operations. YANG is a data modeling language used to model configuration and state data manipulated by the NETCONF protocol, NETCONF remote procedure calls, and NETCONF notifications.
YANG models the hierarchical organization of data as a tree, in which each node has either a value or a set of child nodes. Additionally, YANG structures data models into modules and submodules, allowing reusability and augmentation. YANG models can describe constraints to be enforced on the data. Additionally, YANG has a set of base datatypes and allows custom-defined datatypes as well.
  • OpenFlow

OpenFlow is a framework originally developed at Stanford University and currently under active standards development [OpenFlow] through the Open Networking Foundation (ONF). Initially, the goal was to provide a way for researchers to run experimental protocols in a production network [OF08]. OpenFlow has undergone many revisions, and additional revisions are likely. The following description reflects version 1.4 [OpenFlow]. In short, OpenFlow defines a protocol through which a logically centralized controller can control an OpenFlow switch. Each OpenFlow-compliant switch maintains one or more flow tables, which are used to perform packet lookups. Distinct actions are to be taken regarding packet lookup and forwarding. A group table and an OpenFlow channel to external controllers are also part of the switch specification. With respect to Figure 1, the OpenFlow switch specifications [OpenFlow] define a DAL for the forwarding plane as well as for CPSI.
The OF-CONFIG protocol [OF-CONFIG], based on the YANG model [RFC6020], provides a DAL for the forwarding and operational planes of an OpenFlow switch and specifies NETCONF [RFC6241] as the MPSI. OF-CONFIG overlaps with the OpenFlow DAL, but with NETCONF [RFC6241] as the transport protocol, it shares the limitations described in the previous section.

2014年12月13日 星期六

Introduction to REST & JSON

What is REST?

Representational State Transfer (REST) is a style of software architecture for distributed systems.

 使用 REST 為設計架構的系統我們就稱為 RESTful系統

 RESTful Web Services(或稱RESTful Web API)是以HTTP為基礎,必且有以下三個特色
  1. 所有的API或是以Resource的形式存在,例如 htttp://www.test.com/examples/12345
  2. 這個服務可以接受與返回某個MIME-TYPE,最常見的是JSON格式,也可以回傳PNG/JPG/TXT等格式。
  3. 對資源的操作會支援各種請求方法 (例如GET, POST, PUT, DELETE)

What is JSON?

JavaScript Object Notation (JSON) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate” – JSON.org


JSON
XML
Data Structure
Data Structure
No validation system
XSD
No namespaces
Has namespaces (can use multiples)
Parsing is just an eval
•Fast
•Security issues
Parsing requires XML document parsing using things like XPath
In JavaScript you can work with objects – runtime evaluation of types
In JavaScript you can work with strings – may require additional parsing
Security: Eval() means that if the source is not trusted anything could be put into it.
Libraries exist to make parsing safe(r)
Security: XML is text/parsing – not code execution.

2014年9月4日 星期四

Machine Type Communication

Machine Type Communication (MTC) is a form of data communication which involves one or more entities that do not necessarily (or not much) need human interaction. The MTC is also known as Machine to Machine Communication (M2M) and Internet of Things (IoT).

What are the MTC applications?

Sensor 
Smart Meter
Actuator

What are the MTC features?

–Different market scenarios (smart meter v.s. phone)
–Data communications (low traffic v.s. burst traffic)
–Lower costs and effort
–Potentially very large number of communicating terminals
–Low Mobility
–Time Controlled
–Infrequent Mobile Terminated (Mostly MO)
–MTC Monitoring
–Secure Connection
–Group Based MTC Features (Policing, Addressing)


MTC is benefit to both telecom operators and vendors. Vendors are expected to profit from selling M2M-capable devices, and operators earn profit by increased throughput at non-rush hour. For service providers, MTC is an opportunity for fast deploying service onto the current user services network.

2014年8月24日 星期日

MTP on Android

What is MTP?

MTP stands for “Media Transfer Protocol.” After Android 3.x, Android uses this protocol, it appears to the computer as a “media device.” The media transfer protocol was widely promoted as a standardized protocol for transferring audio files to digital music players using Windows Media Player and similar applications. It was designed to allow other media player companies to compete with Apple’s iPod and iTunes.

The Problem in MTP

File dir = Environment.getExternalStoragePublicDirectory("TempDir");
File file = new File(dir, "test.txt");
FileUtils.writeStringToFile(file, "Hello World");

If you’d execute the code above, the file would be created but it wouldn’t show up in the Windows Explorer (or whatever tool you’re using the view the device’s contents).
To make the file show up, after closing it use the following code (API documentation):
MediaScannerConnection.scanFile(ctx, new String[] { file.getAbsolutePath() }, null, null);

Notes:
The external storage is scanned automatically when the Android device is booting (e.g. after a restart).
If you pass a directory (instead of a file) to scanFile(), the directory will show up as file in Window Explorer, so don’t do this.

2014年7月15日 星期二

Standard for National Communications Commission in Taiwan

Certification Standard

  1. LP0002
  2. PLMN01 (GSM and DCS Mobile Phone Standard)
  3. PLMN02
  4. PLMN08
  5. PLMN09 (3G Mobile Phone Standard)
  6. PLMN10 (4G LTE Mobile Phone Standard)
  7. IS2032-1
  8. IS2045-0
  9. IS2037-0
  10. IS2050
  11. CNS14958-1
  12. CNS14959

 PLMN10 (2013/10/15)

5.14 Public Warning System,PWS
 5.14.1 本項測試適用手持式行動臺設備。
 5.14.2 公眾告警廣播簡訊功能應具有下列通道:
  5.14.2.1 通道4370為顯示中文公眾告警廣播簡訊,且不可關閉。
  5.14.2.2 通道4380為業者測試公眾告警廣播簡訊。
  5.14.2.3 通道4383為顯示英文公眾告警廣播簡訊,且不可關閉。
 5.14.3 設備應具有告警聲響信號,並符合下列規定:
  5.14.3.1 告警聲響信號型式為2段聲響,並間隔0.5秒。每段聲響為2秒聲響後有2次1秒聲響,每次聲響間隔0.5秒。
  5.14.3.2 告警聲響信號須符合下列第5.14.3.2.1節或第5.14.3.2.2節之規定:
   5.14.3.2.1 設備具有混音能力,必須同時以基頻853Hz和960Hz混音產生聲響傳送。
   5.14.3.2.2 設備只有單音能力,必須以960Hz單音產生聲響傳送。
  5.14.3.3 告警聲響信號僅限使用於公眾告警廣播簡訊功能。
 5.14.4 設備應具有告警振動信號,並符合下列規定:
  5.14.4.1 告警振動信號型式為2段振動,並間隔0.5秒。每段振動為2秒振動後有2次1秒振動,每次振動間隔0.5秒。
  5.14.4.2 告警振動信號僅限使用於公眾告警廣播簡訊功能。
  5.14.4.3 告警聲響信號與告警振動信號間得不同步。
5.14.5 公眾告警廣播簡訊之接收處理必須優先於設備其他功能。

2014年7月14日 星期一

Patentable Invention

Copyright- Expression of idea
Patent- Embodiment of idea


Patentability and Patent Eligible

35 U.S.C. 101 Inventions patentable. “Whoever invents or discovers any new and useful process, machine, manufacture, or composition of matter, or any new and useful improvement thereof, may obtain a patent therefor, subject to the conditions and requirements of this title.”

MacKay Co. v. Radio Corp., 306 U.S. 86,94(1939).

A.MT Test (Machine-or-Transformation Test)
Process  is tied to a particular machine or apparatus
Process ransforms a particular article into a different state or thing




Non-Patentability

1. abstract ideas

"principle, in the abstract, is a fundamental truth; an original cause; a motive; these cannot be patented, as no one can claim in either of them an exclusive right.", LeRoy v. Tatham, 14How.156,175 (1853).

Rubber-Tip Pencil Co. v. Howard, 20wall.498,507(1874).

2. natural phenomena
Association for Molecular Pathology v. Myriad Genetics, 569 U.S. 12-398 (2013).

3. natural products

4. laws of nature
Mayo Collaborative Services v. Prometheus Laboratories, Inc. 566 U.S. 10-1150(2012).


2014年7月1日 星期二

Modify OpenCV Tutorial Project

OpenCV Tutorial 2 – Mixed Processing




1. Enter the src folder, and then open Tutorial2Activity.java

2. At the top of the file, add:

private static final int VIEW_MODE_THRESH = 3;
private MenuItem mItemPreviewThresh;


3.In the method “onCreateOptionsMenu”, add:

mItemPreviewThresh = menu.add(“Thresh.”);

4.In the method “onCameraFrame”, add:


case VIEW_MODE_THRESH:
mRgba = inputFrame.rgba();
       int maxValue = 255;
       int blockSize = 61;
       int meanOffset = 15;
       Imgproc.adaptiveThreshold(
              inputFrame.gray(),
              mIntermediateMat,
              maxValue,
              Imgproc.ADAPTIVE_THRESH_MEAN_C,
              Imgproc.THRESH_BINARY_INV,
              blockSize,
              meanOffset );
       Imgproc.cvtColor( mIntermediateMat, mRgba, Imgproc.COLOR_GRAY2RGBA, 4 )


5.In the method “onOptionsItemSelected”, add:
else if (item == mItemPreviewThresh) {
mViewMode = VIEW_MODE_THRESH;
}