Upload
sun-jin-jang
View
5.336
Download
0
Embed Size (px)
DESCRIPTION
GFS and GAE Architecture, RESTful Architecture
Citation preview
Smart TV
http://www.softwareinlife.com
Hybrid Appand
GAE RESTful Archi-tecture
대표이사 장선진@jangsunjin
- Mobile Phone: (+82) 010-4585-1770- E-Mail: [email protected]
Network Traffic
1 EB = 1,000,000,000,000,000,000 B = 1018 bytes = 1 billion gigabytes = 1 million terabytes
Exabytes per Month of Mobile Data Traffic by 2015
High-End Devices Can Multiply Traffic
The Network Effect
• Metcalfe's law: Network value rises by the square of the number of terminals.– Robert Metcalfe
• Metcalfe's law charac-terizes many of the network effects of communication tech-nologies and networks such as the Internet, so-cial networking, and the World Wide Web.
http://en.wikipedia.org/wiki/Robert_Metcalfehttp://en.wikipedia.org/wiki/Metcalfe's_law
Google App Engine Architecture
Google Server Cluster
Google File System
BigTable
Google App Engine DataStore
Blobstore Capabilities
Images Mail
Multitenancy OAuth
Channel
Memcache
Task Queues
URL Fetch
Users
XMPP
Google App Engine Runtime (Python, Java, GO)
Your GAE ApplicationPython / Java Frame-
work
AdminConsole
GAE SDKIDE
Google File System• GFS is optimized for Google's core data storage and usage
needs (primarily the search engine), which can generate enormous amounts of data that needs to be retained;
• Google File System grew out of an earlier Google effort, "BigFiles", developed by Larry Page and Sergey Brin in the early days of Google, while it was still located in Stanford.
• Files are divided into chunks of 64 megabytes, which are only extremely rarely overwritten, or shrunk; files are usually appended to or read. It is also designed and opti-mized to run on Google's computing clusters, dense nodes which consist of cheap, "commodity" computers, which means precautions must be taken against the high failure rate of individual nodes and the subsequent data loss. Other design decisions select for high data throughputs, even when it comes at the cost of latency.
http://labs.google.com/papers/gfs.html
File A (80M)
Google File System Architecture
Chunk Data #1
(64M)
Chunk Data #2
(16M)
• Release: 2008.04• GAE SDK 1.5.1• Python 2.5.2
– C 기반의 확장을 지원하지 않음 .
• Django– Webapp 라는 간단한 웹
프레임웍 지원
Google App Engine 의 실행환경
Java 기반의 실행 환경Python 기반의 실행 환경
Release: 2009.08 GAE SDK 1.5.1 JDK 1.6
◦ EJB 와 같은 JavaEE 관련 기술을 모두 지원하지 않음 .
◦ Thread 생성을 지원하지 않음 .
Servlet(JSP)◦ Google Web Toolkit(GWT)
Java SDK◦ http://java.sun.com/javase/downloads/index.jsp
Google Web Toolkit◦ http://code.google.com/intl/ko-KR/webtoolkit/
Eclipse IDE◦ http://www.eclipse.org/downloads/
Google Plugin for Eclipse, for Eclipse 3.6 (Helios)◦ http://dl.google.com/eclipse/plugin/3.6
GAE for Java 개발 환경
• Java Data Objects (JDO)• Java Persistence API (JPA)• Java Server Faces (JSF)
1.1 - 2.0 **• Java Server Pages (JSP) +
JSTL ***• Java Servlet API 2.4• JavaBeans™ Activation
Framework (JAF)• Java Architecture for XML
Binding (JAXB)• JavaMail
GAE for Java 지원 기술 사항 XML processing APIs in-
cluding DOM, SAX, and XSLT
HTTP Session support (need to enable explic-itly)
JRuby (Ruby) Jython (Python) Quercus (PHP) Rhino (JavaScript) Spring Framework
**: JSF 1.2 and JSF 2.0 should also work if you set the com.sun.faces.enableMultiThreadedStartup context parameter to false to your web.xml file.*** JSP session beans are not supported; to en-able EL parsing, add <%@page isElIgnored="false" %> to your JSP.
http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine
• Enterprise Java Beans (EJB)
• JAX-RPC• JAX-WS• Java Database Connectiv-
ity (JDBC) **• Java EE™ Connector Ar-
chitecture (JCA)• Java Management Exten-
sions (JMX)• Java Message Service
(JMS)• Java Naming and Direc-
tory Interface (JNDI)
GAE for Java 미지원 기술 사항 Remote Method Invoca-
tion (RMI) Apache POI ICEFaces Hibernate
http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine
보안 ‘ sandbox’ 환경에서 구동- 쓰레드를 독자적으로 실행할 수 없음- 로컬 파일 시스템에 접근할 수 없음- Socket 오픈 할 수 없음
• JSR 을 중심으로 다음과 같은 표준 기술을 지원한다 .
GAE for Java 의 기술 표준
RESTful Architecture
• Representational State Transfer (REST) is a style of software architecture for distributed hypermedia systems such as the World Wide Web. The term Representational State Transfer was introduced and defined in 2000 by Roy Fielding in his doctoral dissertation.
RESTful Architecture Constraints• Client–server
– Clients are separated from servers by a uniform interface.
• Stateless– The client–server communication is further constrained by no client con-
text being stored on the server between requests. Each request from any client contains all of the information necessary to service the request, and any session state is held in the client.
• Cacheable– As on the World Wide Web, clients are able to cache responses.
• Layered system– A client cannot ordinarily tell whether it is connected directly to the end
server, or to an intermediary along the way.
• Code on demand (optional)– Servers are able to temporarily extend or customize the functionality of a
client by transferring logic to it that it can execute.
• Uniform interface– The uniform interface between clients and servers, discussed below, sim-
plifies and decouples the architecture, which enables each part to evolve independently.
RESTful Web Service
GET /item/0001
PUT /item/0001/01
DELETE /item/0001/
POST /item/0001
ITEM 0001
Data Action HTTP Method
Create POST
Retrieve GET
Update PUT
Delete DELETE
RESTful Web Service Design
Presentation Layer
Business Logic Layer
Data Access Layer
EIS Layer
JerseyOr
Spring REST
SpringCompo-
nent(Bean)
JDO(PMF)
DataStore
(BigTable)
Demo
XML Binding
• Simple Framework– Simple is a high perfor-
mance XML serialization and configuration frame-work for Java
– Its goal is to provide an XML framework that en-ables rapid development of XML configuration and communication systems.
http://jersey.java.net/http://simple.sourceforge.net/
• Jersey– Jersey is the open source,
production quality, JAX-RS (JSR 311) Reference Imple-mentation for building RESTful Web services.
– But, it is also more than the Reference Implementation. Jersey provides an API so that developers may extend Jersey to suit their needs.
XML
Thanks!• 모리스와 퍼거슨 (C. R. Morris and C. H. Ferguson, 1993) 은 과거 컴퓨터 산업의 경쟁에서
유수한 업체들의 성공과 몰락의 원인분석을 바탕으로 앞으로 다양한 산업경쟁에서 기업들이 어떠한 전략으로 기업을 운영해야하는지 제시하였습니다 .
• 여기서 이들은 개방형시스템 (Open System) 의 독점적 아키텍처 (Proprietary Architec-ture) 가 경쟁에서 승리하는데 가장 중요한 요소라고 이야기 하였습니다 .
Service Service
Service Service Service Service
Service Service Service Service
NewService Service
Sca
lability
Config
urab
le
Multi-tenant efficient
독점적인 서비스 아키텍처Proprietary Service Architecture
서비스 기반의 개방형 시스템Service Based Open System
SaaS
Serv
ice
Jang, Sun-Jin ([email protected])
감사합니다 .
http://code.google.com/p/devmento-gae-seminar