> For the complete documentation index, see [llms.txt](https://simian114.gitbook.io/blog/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://simian114.gitbook.io/blog/undefined-1/diary/2021/march/20210311.md).

# 20210311(목)

## 2021-03-11

### 1. 학습 날짜

* 2021-03-11

### 2. 학습 시간

* 11:00 \~ 24:30

### 3. 학습 범위 및 주제

* 백본 view, model, collection
* 루비온레일즈

### 4. 학습 목표

* war-index-view 끝내기

### 5. 학습 정리

* [with\_lock 을 이용한 동시접속 막기](https://simian114.gitbook.io/blog/undefined/rubyonrails/with_lock)
* [백본 모델에 메서드 정의하기](https://simian114.gitbook.io/blog/undefined/backbonejs/backbone-model)

### 6. 상세 학습 내용

* Active Job 을 이용해서 백엔드 스케줄링을 했다.
* 기본적으로 어렵지는 않다.. 간단하게 job 파일을 생성하고 원하는 시간을 set 하고 실행만 하게 하면 된다!
* 다만 어려운건 액션케이블이다...
  * 액션케이블을 이용해서 실시간으로 프론트와 백엔드간의 통신이 가능해지지만, 이 실시간 통신이라는게 그렇게 빠르지는 않아서 생기는 문제가 많이 있었다.
  * 생긴 문제 중 하나는 하나의 레코드에 두 명이상의 유저가 접근하는 문제
  * 이 문제를 해결하기 위해 with\_lock 을 사용했다.
* 백본 모델의 프로퍼티에 메서드 추가하기
  * 백본 모델의 프로퍼티에 메서드를 왜 추가할까>
  * 간단하다. 레일즈에서 application\_controller 에 메서드를 만들면 모든 컨트롤러에서 이 메서드를 상속받아 자유롭게 사용할 수 있는 것처럼 Backbone 모델에도 어딘가에 메서드를 정의해놓으면 만들어진 모델에서 사용할 수 있는데, 그게 바로 모델의 프로퍼티다

### 7. 오늘 학습 내용에 대한 개인적인 총평

* 이제 거의 끝났다... 빨리 마무리하자!

### 8. 다음 학습 계획

* war PR 대응 및 코드 리팩토링


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://simian114.gitbook.io/blog/undefined-1/diary/2021/march/20210311.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
