Kerberos는 하데스의 지옥문을 지키는 머리셋달린 개인데
MIT에서 제 3의 서버를 통한 인증을 하는 시스템을 만들면서 이 이름을 붙였다고 한다.
자료출처: REF http://slideplayer.com/slide/4791382/
Kerberos서버와 TGS서버가 따로 있는 것이 특징이다.
- 서버접속시에는 TGS서버에서 티켓만 받으면 접속이 가능하다
Kerberos는 하데스의 지옥문을 지키는 머리셋달린 개인데
MIT에서 제 3의 서버를 통한 인증을 하는 시스템을 만들면서 이 이름을 붙였다고 한다.
자료출처: REF http://slideplayer.com/slide/4791382/
Kerberos서버와 TGS서버가 따로 있는 것이 특징이다.
- 서버접속시에는 TGS서버에서 티켓만 받으면 접속이 가능하다
Form의 Validation을 체크할 때, 주로 spring의 validator기능을 사용해 왔지만,
jQuery에서도 Form-validation기능이 있다는 걸 알게되었다.
잘만 쓴다면, 서버까지 갔다오지 않고 바로 javascript에서 처리가 되니 장점이 존재한다.
기본적으로는 rules: 와 messages:를 정해주면 자동으로 체크 및 에러메시지가 출력된다.
예)
$("#basicForm").validate({ rules: { validForCheck : 'validForCheck',
rankingWeightCheck: 'rankingWeightCheck'
} messages: 또는 메시지를 아래 addMethod에 적을 수 있음. }); $.validator.addMethod("rankingWeightCheck", function(value) { return ($('#className').val() < 100 );
}, 'Please enter a Value under 100<br>');
javadoc_REF (많이쓸 클래스: async.client.mongoCollection)
- 부속: async-driver
<최근 dependency>
'org.mongodb:mongo-java-driver:3.4.2'
'org.mongodb:mongodb-driver-async:3.4.2'
이중화: https://nextus.tistory.com/26
aggregate사용법: 기초 REF , 프로그래밍 중에 사용법 REF
aggretate상세설명: REF
Async Code예제:REF
JAVA (Spring에서 aggregation 사용예제)
Criteria criteria = new Criteria("producerNo").is(producerNo);
MatchOperation match = Aggregation.match(criteria);
SortOperation sort = Aggregation.sort(Sort.Direction.DESC, "deliverStart");
Aggregation agg = Aggregation.newAggregation(match, sort);
AggregationResults<DeliverProduct> results = mongoTemplate.aggregate(agg, "deliverProduct", DeliverProduct.class);
List<DeliverProduct> productList = results.getMappedResults();
group의 경우
- 좀더 간단히 사용하려면 : REF (but, 추천은 아님)
<AssertJ의 javadoc_REF 기초REF>
import static org.assertj.core.api.Assertions.assertThat
.isEqualTo
.contains
.startWith
.endsWith
등 기존 junit assertTrue보다 유연하게 사용가능.
JUnit JavaDoc
JavaDoc : Assert class
@Parameters - 음 javadoc에서 잘 안보이네요.
@Test
@Parameters({
"10000, 8, 32",
"100000, 12, 128",
})
public void realUsage(int numSerials, int numDigits, int hashKeySize)
@DataPoints + @Theory
@DataPoints public static String[] dataPoints = new String[] { ... }; @DataPoints public static String[] generatedDataPoints() { return new String[] { ... }; } @Theory public void theoryMethod(String param) { ... }
(RxJava는 비동기와 multi-thread 주목적이므로 network개발로 분류) 기초:REF
데이타\처리 | Completable | Maybe | Single | Observable | Subject(외부에서 데이타주입가능) |
---|---|---|---|---|---|
Nothing | O | ||||
One | O | O | O | O | |
More | O | O | |||
Unlimited | O | O |
<Observable과 Maybe 많이쓸만한 함수: 주로 양쪽에 다 존재>
Observable.subscribe ( Observer 또는 Consumer )
Observer는 { onComplete(), onError(), + onNext(), onSubscribe() }
Observable.subscribeOn (데이터주입 Schedule쓰레드)
Observable.observeOn (데이터처리 Schedule쓰레드)
.onSubscribe (Cosumer<Disposable {dispose()} >
(static).defer (Callable supplier ) : .create대신의 공급자. REF
Flowable.doOnSubscribe ( Consumer<Subscription {cancel(),request(r) } } org.reactivestreams?.Subscription
FlowableOnSubscribe inteface도 존재.
Maybe.doOnSuccess( Consumer
.doOnComplete ( Action ) , .doOnSubscribe( Action
.doOnError (Consumer
.onErrorComplete ( Predicate
.timeout ( , , Scheduler )
(static) .defer ( Callable supplier) : 공급자 (in study)
(static) .just ( T )
(static) .error(E)
Scheduler & Scheduler.Worker(하나의 thread에서 순차적으로 처리하는 Scheduler)
ExecutorService exec = Executors.newSingleThreadedExecutor();
.newFixedThreadPool(5)//cpu+1
try {
Scheduler scheduler = Schedulers.from(exec);//parallelization에 최적.
.computation();//cpu+1 계산에적합
.io(); //cache도 해줌.cpu+1
.newThread()//간단
Flowable.just(1)
.subscribeOn(scheduler)
.observeOn(Schedulers.computation())
.map(v -> v + 1)
.subscribe(System.out::println); //blockingSubscribe(System.out::println);
} finally {
exec.shutdown();
}
Maybe와 Single의 차이는 complete의 존재여부? (from REF)
Flowable : item emit속도( reactive dataflow)가 조절 가능.
Flowable -> Single<List<T>> : toList() 도 좋음.
ES6 javascript 는 지원되는 브라우저가 많지 않아서 그 사용용도가 제한적이지만..
1. node.js를 이용한 서버개발
2. 관리자 페이지 (브라우저를 제한 가능)
등에서 사용이 가능하다.
Babel을 사용하면 es6파일을 es5로 변환시켜 준다. REF
기존 javascript대비 특이한 점들은....
1. class & extends 지원 ref
- class constructor에( options 사용가능: json 형식)
2. let , const 지원
- let은 함수도 지정이 가능한 var로서
let add = (a,b) => a+b ref (lambda도 지원) =>이다. (java는 ->임)
-let은 block scoping이 된다. (가능하면 let을 써야겠군요) REF (이하 3~5))
3. Promise (java의 Future느낌) , 그리고 tutorial.pdf에 의하면 Map,Set도 지원.
- .resolve() .reject() .all() 등
4. import / export : Babel등과 함께 사용: ref
5. template : ${변수} let message = `Hello ${name}!`;
6. module 지원: REF (webpack의 기능을 일부 담당가능)
배열을 파라미터로 전달.
- var
data = [1,2];
function
Test1(a,b)...;
==>
Test1(...data) : (이경우 ...을 spread라고 부른다 REF)
- 기존 parameter들은 지정하지 않아도, arguments변수에 자동으로 넘어갔지만
(...args) => { console.log(args); } 지원. (이경우 ...을 REST 파라미터 라고 부른다)
REF /server-thrift /client-thrift (기타 /client-decorator /server-decorator /client-custom-http-headers )
<주요 class 들> javadoc pkg: common.thrift, server.thrift, client.thrift
THttpService : (Thrift Http Service)
ThriftCompletableFuture (extends CompletableFuture<java> implements AsyncMethodCallback<thrift> )
CompletableFuture implements Future, CompletableStage. (그래서 CompletableStage공부도 필요)
<CompleteFuture의 기본 함수들>
.complete(returnValue)
.completeExceptionally(exception)
.thenApply (Func) : 결과값에 적용
.thenCompose (Func) : future에 적용? - 이것 자체도 Task가 됨 (333p)
.thenCombine (Func) : A task결과와 B task결과를 이용한 연산가능.
.thenAccept(Consumer)
(static) .supplyAsync ( Supplier<R> ) R:ReturnType
첫번째 stream에서 CompletableFuture<String>의 List를 가지고 있지만,
List<String>을 원한다면 기다린 후, Future들에서 값을 가져와야 하는데, 이 일을 해주는게 join이다.
별도의 stream 루프로 처리해야 Parallel처리가 된다.. 안그러면 supplier->join->supplier->join 순차적처리가 됨.
$ top -> 모니터링 화면이 뜨는데, 이 때 o를 입력하고 cpu라고 입력하면.. cpu많이쓰는 순서대로 정렬된다.
- angular과 달리, 단방향 data-binding임.
new Vue { :html element를 하나 물고 있는 느낌의 객체.(물론 el없이 js ES6 class처럼 사용도 가능)
el: ,
- template: ,
props: data전달 - REF:vuejs.org - $emit하고나서 props:로 데이타를 받음.
data: ,
created: , //instance가 생성되고 나서 호출되는 hook. REF'
- mounted:
- updated:
- destroyed: 이런 hook들도 존재.
watch:
computed: sort나 filter들을 적용해서 보여줄 수 있음.
methods:
validations: ($v로 인용가능)
components: REF
}
- ajax요청시에는 axios 를 사용. REF
- vuelidate : vue component의 validations: 을 check: REF
- vue-loader : webpack에서 사용하는 loader로서, css후처리등도 가능하다고 하는데... REF
- vee-validator 로 각종 html input등의 type/regex 체크 가능. REF
(plugin) - plugin제작가이드
- vue-router : 해당 component를 화면에 그려줌.
- vuex : 전역변수 routre/vuex REF
$router, $v (이하/위 참조), $emit(현재 instance에 event trigger)
======== API-list =====================================================
:is <component :is="componentId"> <component v-bind:is="currentView">
v-for REF
v-show
v-if
v-on:click => @on(click) 으로 이벤트 감지.
v-on:click="$router.push('/detail')":서브페이지로 이동.ps://router.vuejs.org
원복: $router.push('/') REF:rotuter.vuejs.orghtt
v-model 양방향 바인딩 지원. angular.js 처럼 .sync 키워드 필요.
v-bind
v-cloak