소소한 IT

2002년 약 2달 간의 인도 배낭여행.

인도 여행과 문화, 종교, 신화 등에 대한 책과 다큐멘타리를 즐겨 봐 왔었다.


그리고 한 동안 관심이 멀어졌다가....


오랜 만에 만난 '신도 버린 사람들'.


제목을 보면 불가촉 천민이 생각 났고, 그래서 인도 불가촉천민의 생활상을 담은 책이려거니 했다.

하지만 내용은 엄격한 신분제도에서 불가촉 천민임에도 불구하고 고통스러운 환경을 극복해 나가는 다큐이다.


- p113, 

가난하지만 자연과 여유가 있는 고향에서 살자고 하는 아내 소누와 답답하고 불편하지만 돈과 도전이 있는 대도시 뭄바이로 가자고 하는 남편 다무의 말다툼.

항상 이런 갈등과 고민 속에서 선택하는 것이 인생이다.


- p278-279

힌두교의 신분제 폐지와 만민평등을 주장하는 인도의 지도자 '바바사헤브'. 

차별의 종교인 힌두교를 버리고 평등의 종교인 불교로의 개종식.

장엄하면서도 숭고하고 비장한, 그리고 신성하기까지 한 분위기가 느껴지는 행사.

많은 불가촉천민들이 참여한 행사이다.



- p293

"아빠가 하고 싶은 얘기는 한 가지뿐이야. 뭘 하든 최고가 되라는 것. 도둑이 되고 싶어? 좋아. 하지만 솜씨가 대단해서 모든 사람들이 인정하게 만들어야 해. 온 세상 사람들이 너를 보고 '야, 진짜 훌륭한 도둑이다! 어쩜 이렇게 솜씨가 대단할까?'라고 감닽하게 만들란 말이야."

>>> 아이들에게 해 주고 싶은 말이다.


학위는 운저년허 같은 거라고 설명했다. 면허를 따고 계속 운전을 해야지. 그럼 그걸 그냥 썩히나?

>>> 나 자신에게 하고 싶은 말이다.  박사학위를 마치고 일로 바쁜 아들에게 어머니가 그만 좀 쉬라고 닦달을 할 때, 아버지 '다무'가 한 말이다. 박사학위는 운전면허와 같다. 그래서 장롱면허가 아닌 계속 운전을 해서 운전면허가 쓸모 있도록 해야 한다는 것이다. 그래. 그렇다. 박사학위는 운전면허와 같은 것이다. 1종 보통을 땄다면, 대형도 따보고, 중장비도 도전해 보는 거다.







1. 작업목록


12/13, 

- docker 설치

- git 설치

- docker에서 ignite(이미지) 설치

  . docker run 했는데, permission denied가 나와서... docker run --previleged docker.io/apacheignite/ignite 으로 설치함

>> Docker에서 설치한 경우 ignite 접근에 어려움 있음(예: 아마도.... 접근 코드에서 docker exec ... 등과 같은 command 추가 필요)


- ignite zip 파일 다운로드 후 압축 해제 > IGNITE_HOME 환경변수 추가

- ignite

- Maven 설치 > MAVEN_HOME 추가


- ignite 참고 > http://ggfabric.blogspot.kr/
                 > Hello World : http://ggfabric.blogspot.kr/2015/12/apache-ignite-hello-world-example.html
                 > 

- ignite cluster testing >  $ bin/ignite.sh examples/config/example-ignite.xml




2. 기타

    • 기업: 상용 기업 https://www.gridgain.com/
    • source .bash_profile


<12/23>


1. ignite 설치함(unzip)

2. 빌드함.

3. bin/ignite.sh examples/config/example-ignite.xml   >>> 첫번째 콘솔부터 이렇게 해야 그리드 노드가 하나씩 추가 연결됨


# Unpack the source package
$ unzip -q incubator-ignite-1.0.0-src.zip
$ cd incubator-ignite-1.0.0-src
 
# Build In-Memory Data Fabric release (without LGPL dependencies)
$ mvn clean package -DskipTests



<12/30>

- VMware에서 이클립스 돌리니, 너무 느려 서버에 다시 설치하고 테스트한다.

- eclipse 설치하고 http://ggfabric.blogspot.kr/ 에 나오는 HelloWorld 예제 테스트함.

- dependency는 이클립스에서 입력창을 통해 입력함.

- eclipse 에러 나서 maven 연결함.(import > General > Archive file >/home/kwangik/software/apache-ignite-1.8.0-src/modules/core/target/ignite-core-1.8.0.jar 선택 ) 

- Configure > Convert to Maven project > pom.xml(dependency 추가)

- Build Path > Add Library > Maven Managed Dependencies

- 문법 에러는 안나는데, run하면 에러 투성이... 콘솔 에러 메세지를 보니 


>> run 하면...

 import org.apache.ignite.*;



public class IgniteNodeStartup {


public static void main(String[] args) throws IgniteException {

Ignition.start("examples/config/example-ignite.xml");

}

}



>> 이런 메세지...

Exception in thread "main" class org.apache.ignite.IgniteException: Failed to instantiate Spring XML application context (make sure all classes used in Spring configuration are present at CLASSPATH) [springUrl=file:/home/kwangik/software/apache-ignite-1.8.0-src/examples/config/example-ignite.xml]

at org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:927)

at org.apache.ignite.Ignition.start(Ignition.java:350)

at HelloWorld.main(HelloWorld.java:8)



- Spring 설치 관련인지.. 알아보고 있음...



그런데 보니...

이렇게 모두 pom.xml 파일에 설정을 해줘야 한다. 그렇게 하니 iginte 서버가 실행되고 console 창에 메세지가 나온다. ...


<dependency>
    <groupId>org.apache.ignite</groupId>
    <artifactId>ignite-core</artifactId>
    <version>${ignite.version}</version>
</dependency>
<dependency>
    <groupId>org.apache.ignite</groupId>
    <artifactId>ignite-spring</artifactId>
    <version>${ignite.version}</version>
</dependency>
<dependency>
    <groupId>org.apache.ignite</groupId>
    <artifactId>ignite-indexing</artifactId>
    <version>${ignite.version}</version>
</dependency>




Learned with Apache Ignite

출처: http://bguru.tistory.com/19


- server/ client mode made easy with ipfinder, singleton server node
- one machine has to be one server with multiple secvices
- one machine has one client with mutiple services.
- without ipfinder, server nodes are clusted. each nodes are trying to be synced its cache.
- in/out parameter should he externalizable
- default IGNITE_HOME is /tmp/ignite, to run multiple nodes inone machine, it should be different for each.






<In-Memory Data Grid의 발전형 모습? - Apache Ignite


출처: http://nightdev.tistory.com/5



바야흐로 오픈소스의 전성시대이다.

Apache Ignite 1.0 이 2015년 2월 17일에 출시되었다.

GridGain에서 소스의 코어 부분을 통채로 도네이션 한것으로 보인다. 오픈소스코어를 활용하여 시장을 넓혀갈 생각을 하고 있는 듯한데, 기존의 IMDG보다 매우 재미있는 기능을 많이 가지고 있어, 분산 컴퓨팅 기반의 Scale-Out 이나 Streaming Processing 등을 구현하기에 매우 유리한 점이 많이 있다.

https://ignite.incubator.apache.org/ 

In-Memory Data Grid Features:
  • Distributed In-Memory Caching
  • Lightning Fast Performance
  • Elastic Scalability
  • Distributed In-Memory Transactions
  • Distributed In-Memory Queue and Other Data Structures
  • Web Session Clustering
  • Hibernate L2 Cache Integration
  • Tiered Off-Heap Storage
  • Distributed SQL Queries with Distributed Joins

흥미로운 부분들을 하나씩 기술하여 본다.

1) IMDG와 GRID Computing을 동시에 지원한다. 
2) Distributed Publish / Subscribe 기능을 지원한다. 
3) In-Memory Distributed Queue를 지원한다. 
4) Off-Heap Storage를 지원하여, 대량 데이터를 메모리상에 보관할수 있으며, JVM 제약이 없다. 
5)  Distributed Event Processing을 지원한다. 
6) Memory에 있는 데이터에 대한 SQL Query와 Join을 지원한다. 
7) 위의 기능들을 한번에 사용할 수 있다.

제대로 지원만 된다면 현존하는 IMDG들을 All-Kill할수 있는 SPEC인데, 아직까지 Near-Cache의 지원여부는 확인되지 않았다. Near-Cache가 사실, 성능에 가장 Critical하다.

In-Memory Cached Data Set에 Query를 사용하는 예제이다.

1
2
3
4
5
6
7
8
9
10
11
12
13
Ignite ignite = Ignition.ignite();
 
// Get an instance of named cache.
GridCache<Long, Person> cache = ignite.jcache("cacheName");
 
// Create query which selects salaries based on range.
CacheQuery<Map.Entry<Long, Person>> qry =
    cache.queries().createSqlQuery(Person.class, "salary > ? and salary <= ?");
 
// Execute queries for salary ranges.
print("People with salaries between 0 and 1000: ", qry.execute(0, 1000).get());
 
print("People with salaries between 1000 and 2000: ", qry.execute(1000, 2000).get());


Distributed Event Features:
  • Subscribe Local and Remote Listeners
  • Enable and Disable any Event
  • Provide Local and Remote Event Filters
  • Group Event Notifications into Batches
Streaming Features:
  • Programmatic Querying
  • Customizable Event Workflow
  • At-Least-Once Guarantee
  • Sliding Windows
  • Data Indexing
  • Distributed Streamer Queries
  • Co-Location With In-Memory Data Grid
Distributed Messaging Features:
  • Support for Topic-Based Publish-Subscribe Model
  • Support for Direct Point-to-Point Communication
  • Pluggable Communication Transport Layer
  • Support for Message Ordering
  • Cluster-Aware Message Listener Auto-Deployment
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Ignite ignite = Ignition.ignite();
 
IgniteMessaging rmtMsg = ignite.message(ignite.cluster().forRemotes());
 
// Add listener for unordered messages on all remote nodes.
rmtMsg.remoteListen("MyOrderedTopic", (nodeId, msg) -> {
    System.out.println("Received ordered message [msg=" + msg + ", from=" + nodeId + ']');
 
    return true; // Return true to continue listening.
});
 
// Send ordered messages to remote nodes.
for (int i = 0; i < 10; i++)
    rmtMsg.sendOrdered("MyOrderedTopic", Integer.toString(i));