웹서핑중 미디 튜토리얼 발견: http://dihardja.de/wp/?p=9

앞부분 예제 작성하다 귀찮아서 그루비로 작성하니 저 많던 라인이 이렇게 줄어 버린다.

import javax.sound.midi.*

def synth = MidiSystem.getSynthesizer()
synth.open()
def rcvr = synth.getReceiver()

def d = java.sql.Date.valueOf( "2010-05-03")
def cal = new GregorianCalendar();
cal.setTime(d)
def dayOfWeek = cal.get(Calendar.DAY_OF_WEEK)

if( dayOfWeek == Calendar.MONDAY)
    println "Monday !"

자료 구조 인코딩 관련 용어이다.

데이터를 저장하고 전달하는 관점에서

  • 자료 구조나 객체 등의 데이터를 바이트 스트림으로 변환하는 것을 Serialization
  • 이 바이트 스트림을 다시 원래의 데이터로 복원하는 것을 Deserialization

이라고 한다.

이렇게 Serialization을 하는 이유는

  • 파일, 버퍼 등에 저장하거나
  • 네트워크로 전달할 수 있도록

하기 위함이다.

Deserialization을 하는 이유는

  • 파일, 버퍼 등에 저장했거나
  • 네트워크로 전달 받은 바이트 스트림을

다시 원 상태의 데이터로 원복하여 사용하기 위함이다.

이와 비슷한 용어로 RPC 메커니즘에서 사용하는 마샬링(marshalling), 언마샬링(unmarshalling)이 있다.

참고

구글 앱 엔진(Google App Engine) 줄여서 GAE라고들 부른다.
GAE는 파이썬과 자바를 지원한다.
따로 서버 관리가 필요 없기 때문에 개인 개발자는 개발에만 집중하면 되므로 매력적이라고 할 수 있다.

Google App Engine lets you run your web applications on Google's infrastructure.

  • App Engine applications are easy to build, easy to maintain, and easy to scale as your traffic and data storage needs grow.
  • With App Engine, there are no servers to maintain:
    • You just upload your application, and it's ready to serve your users.

You can serve your app from your own domain name (such as http://www.example.com/) using Google Apps. Or, you can serve your app using a free name on the appspot.com domain. You can share your application with the world, or limit access to members of your organization.

Google App Engine supports apps written in several programming languages.

  • With App Engine's Java runtime environment, you can build your app using standard Java technologies, including the JVM, Java servlets, and the Java programming language—or any other language using a JVM-based interpreter or compiler, such as JavaScript or Ruby.
  • App Engine also features a dedicated Python runtime environment, which includes a fast Python interpreter and the Python standard library.
  • The Java and Python runtime environments are built to ensure that your application runs quickly, securely, and without interference from other apps on the system.

With App Engine, you only pay for what you use.

  • There are no set-up costs and no recurring fees.
  • The resources your application uses, such as storage and bandwidth, are measured by the gigabyte, and billed at competitive rates.
  • You control the maximum amounts of resources your app can consume, so it always stays within your budget.

App Engine costs nothing to get started.

  • All applications can use up to 500 MB of storage and enough CPU and bandwidth to support an efficient app serving around 5 million page views a month, absolutely free.
  • When you enable billing for your application, your free limits are raised, and you only pay for resources you use above the free levels.

출처: 구글 코드 구글 앱 엔진 소개 페이지

Mapper나 Reducer가 퍼센트 변화 없이 가만 있을 때가 있다.
아래 상황을 숙지하고 진행상황을 항상 알 수 있도록 하자.

진행 상황 관련 연산

  • 입력 레코드 읽기 할 때
  • 출력 레코드 쓰기 할 때
  • Reporter 클래스의 setStatus() 메서드로 상태를 설정 할 때
  • Reporter 클래스의 incrCounter() 메서드로 카운터를 증가시킬 때
  • Reporter 클래스 progress() 호출

+ Recent posts