'시작하기'에 해당되는 글 5

  1. 2015.06.12 ActiveMQ
  2. 2015.04.08 Vert.x 시작하기
  3. 2014.05.22 matplotlib 맛보기
  4. 2014.05.06 Elasticsearch 맛보기
  5. 2013.10.21 Bottle: Python Web Framework

ActiveMQ

오픈소스 메시징/통합패턴 서버

다양한 언어 지원
STOMP, AMQP, MQTT
JMS 1.1 and J2EE 1.4


- 2015-06-12 현재 apache-activemq-5.11.1가 최신

그런데 실행이 안됨. 에러도 발생 안함.

apache-activemq-5.11.1> bin\activemq
Java Runtime: Oracle Corporation 1.7.0_09 C:\Program Files\Java\jdk1.7.0_09\jre
  Heap sizes: current=1013632k  free=996854k  max=1013632k
    JVM args: -Dcom.sun.management.jmxremote -Xms1G -Xmx1G ...

Extensions classpath:
  [...]
ACTIVEMQ_HOME: ...\apache-activemq-5.11.1\bin\..
ACTIVEMQ_BASE: ...\apache-activemq-5.11.1\bin\..
ACTIVEMQ_CONF: ...\apache-activemq-5.11.1\bin\..\conf
ACTIVEMQ_DATA: ...\apache-activemq-5.11.1\bin\..\data
Usage: Main [--extdir <dir>] [task] [task-options] [task data]

Tasks:
    browse                   - Display selected messages in a specified destination.
    bstat                    - Performs a predefined query that displays useful statistics regarding the specified broker
    create                   - Creates a runnable broker instance in the specified path.
    decrypt                  - Decrypts given text
    dstat                    - Performs a predefined query that displays useful tabular statistics regarding the specified destina
tion type
    encrypt                  - Encrypts given text
    export                   - Exports a stopped brokers data files to an archive file
    list                     - Lists all available brokers in the specified JMX context
    purge                    - Delete selected destination's messages that matches the message selector
    query                    - Display selected broker component's attributes and statistics.
    start                    - Creates and starts a broker using a configuration file, or a broker URI.
    stop                     - Stops a running broker specified by the broker name.

Task Options (Options specific to each task):
    --extdir <dir>  - Add the jar files in the directory to the classpath.
    --version       - Display the version information.
    -h,-?,--help    - Display this help information. To display task specific help, use Main [task] -h,-?,--help

Task Data:
    - Information needed by each specific task.

JMX system property options:
    -Dactivemq.jmx.url=<jmx service uri> (default is: 'service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi')
    -Dactivemq.jmx.user=<user name>
    -Dactivemq.jmx.password=<password>


확인 결과 5.10.0부터 발생

5.9.1은 제대로 실행됨.

apache-activemq-5.9.1> bin\activemq
Java Runtime: Oracle Corporation 1.7.0_09 C:\Program Files\Java\jdk1.7.0_09\jre
  Heap sizes: current=1013632k  free=996854k  max=1013632k
    JVM args: -Dcom.sun.management.jmxremote -Xms1G -Xmx1G ...
Extensions classpath:
  [...]
ACTIVEMQ_HOME: ...\apache-activemq-5.9.1\bin\..
ACTIVEMQ_BASE: ...\apache-activemq-5.9.1\bin\..
ACTIVEMQ_CONF: ...\apache-activemq-5.9.1\bin\..\conf
ACTIVEMQ_DATA: ...\apache-activemq-5.9.1\bin\..\data
Loading message broker from: xbean:activemq.xml
 INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@e34a3c: startup date [Fri Jun 12 22:51:42 KST 2015]; root of con
text hierarchy
 INFO | PListStore:[...\apache-activemq-5.9.1\bin\..\data\localhost\tmp_storage] started
 INFO | Using Persistence Adapter: KahaDBPersistenceAdapter[...\apache-activemq-5.9.1\bin\.
.\data\kahadb]
 INFO | Apache ActiveMQ 5.9.1 (localhost, ID:pantarei-PC-20301-1434117106014-0:1) is starting
 INFO | Listening for connections at: tcp://...:61616?maximumConnections=...
 INFO | Connector openwire started
 INFO | Listening for connections at: amqp://...:5672?maximumConnections=...
 INFO | Connector amqp started
 INFO | Listening for connections at: stomp://...:61613?maximumConnections=...
 INFO | Connector stomp started
 INFO | Listening for connections at: mqtt://...:1883?maximumConnections=...
 INFO | Connector mqtt started
 INFO | Listening for connections at ws://...:61614?maximumConnections=...
 INFO | Connector ws started
 INFO | Apache ActiveMQ 5.9.1 (localhost, ID:...-20301-1434117106014-0:1) started
 INFO | For help or more information please see: http://activemq.apache.org
 WARN | Store limit is 102400 mb (current store usage is 0 mb). The data directory: ...\apa
che-activemq-5.9.1\bin\..\data\kahadb only has 31427 mb of usable space - resetting to maximum available disk space: 31427 mb
ERROR | Temporary Store limit is 51200 mb, whilst the temporary data directory: ...\apache-
activemq-5.9.1\bin\..\data\localhost\tmp_storage only has 31427 mb of usable space - resetting to maximum available 31427 mb.
 INFO | ActiveMQ WebConsole available at http://localhost:8161/
 INFO | Initializing Spring FrameworkServlet 'dispatcher'
 INFO | jolokia-agent: No access restrictor found at classpath:/jolokia-access.xml, access to all MBeans is allowed


http://localhost:8161/


- 데모

http://activemq.apache.org/web-samples.html

apache-activemq-5.9.1> bin\activemq xbean:examples/conf/activemq-demo.xml


http://localhost:8161/demo



Vert.x 시작하기

- Installation

1. Vert.x requires JDK 1.7.0 or later.

(JRE가 아닌 Full JDK나 for Developers 옵션을 선택해야 한다.)

> java version


2. Unzip.
3. Add the Vert.x bin/ to PATH.


> vertx version
2.1.5 (built 2014-11-13 15:15:56)


- Testing the install

> vertx run server.js



====>자바 컴파일 필요없는거

각 구현체 설정 파일, 구현 엔진

jruby, jpython, rinho
java compile이 필요없다.

matplotlib 맛보기

- 설치

- 확인

  

Elasticsearch 맛보기

초간단 맛보기

https://www.elastic.co

설치

Download and unzip

 

실행

Run bin/elasticsearch

 

설정

7.15.2[각주:1] elasticsearch.yml에 xpack.ml.enabled: false 추가

org.elasticsearch.ElasticsearchException: X-Pack is not supported and Machine Learning is not available for [windows-x86]; you can use the other X-Pack features (unsupported) by setting xpack.ml.enabled: false in elasticsearch.yml

 

확인

http://localhost:9200/

{
  "status" : 200,
  "name" : "Quicksilver",
  "version" : {
    "number" : "1.1.1",
    "build_hash" : "f1585f096d3f3985e73456debdc1a0745f512bbc",
    "build_timestamp" : "2014-04-16T14:27:12Z",
    "build_snapshot" : false,
    "lucene_version" : "4.7"
  },
  "tagline" : "You Know, for Search"
}

 

이걸로 끝!

 

하나 더 실행하면 9201로 실행됨.

 

- 1.5.2 버전에서는 JDK 1.7이 필요한데, 1.8을 권장함.

 

  1. 2021-12-07 [본문으로]

Bottle: Python Web Framework

http://bottlepy.org
Bottle is a fast, simple and lightweight WSGI micro web-framework for Python. It is distributed as a single file module and has no dependencies other than the Python Standard Library.

- Installation
http://bottlepy.org/docs/dev/tutorial.html#installation
C:\Python33\Scripts> pip install bottle //easy_install도 가능
Downloading/unpacking bottle
  Downloading bottle-0.11.6.tar.gz (60kB): 60kB downloaded
  Running setup.py egg_info for package bottle

Installing collected packages: bottle
  Running setup.py install for bottle

Successfully installed bottle
Cleaning up...


- Hello world


IDLE 쉘상에서 직접 실행하면 잘 안됨.(Flask - Hello world처럼)

- 설치 간단, 의존성 없음.
IDLE로 실행시 Ctrl-C로 내릴 수 있음.(Flask 안됨)========>이거 =-=>별도 파일로 만들어서 실행시켜보자.
리로딩도 된다고 함. 소스 수정하고 F5 누르면 재시작 됨.
자체 템플릿 엔진 제공, 다른 템플릿 엔진도 사용 가능
Dictionary를 리턴하면 json형태로 응답한다.

내가 찾던거다!!!

- 참고 자료
http://bottlepy.org/docs/0.11/
http://bottlepy.org/docs/dev/tutorial.html

API Reference
http://bottlepy.org/docs/dev/api.html

Tutorial: Todo-List Application
http://pantarei.tistory.com/3539
http://bottlepy.org/docs/dev/tutorial_app.html