Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
BIBO (D) [1 BUG, 2 TODOs]
09-26-2020, 04:10 PM
Post: #31
RE: BIBO (D)
(09-24-2020 01:05 PM)zhihao Wrote:  talk2thinker.sh
Code:
work() {
    read $newcasepfn till meet blank line

    triage()
}

triage() informs think about the request.
Code:
$tspfn: sage tasks

triage() {
    set $casecnt as the number of cases

    switch $casetype {
        case "insert":
            insert_case()
        case "delete":
            delete_case()
        case "query":
            query_case()
        case "select":
            select_case()
    }

    set $sage_user as sage2
    use program auntie  to register $tspfn
}

triage and work should handle return status $? well. Otherwise the service would not work well. The return status handling has been messed up in the re-factoring. I am fixing them.
Find all posts by this user
Quote this message in a reply
09-26-2020, 05:07 PM
Post: #32
RE: prada -- D
(09-26-2020 12:24 PM)lingu Wrote:  
(09-25-2020 12:51 AM)zhihao Wrote:  
(09-24-2020 08:26 PM)lingu Wrote:  
(09-24-2020 02:08 PM)zhihao Wrote:  tellThinker() informs think about the request.
Code:
tellThinker() {
    set $casecnt as the number of cases

    switch $casetype {
        case "insert":
            insert()
        case "delete":
            delete()
        case "query":
            query()
    }
}

There is a 'select' function.
added a 'select' function to tellThinker()

(09-24-2020 08:26 PM)lingu Wrote:  Pls design the 'select' function. You can ask collaborators if you are not sure what 'select' is expected to do.

select function designed as follows:

select_case() {
clear file $tspfn

OK.

Quote: set $reqcaseid as request case id

Pls change to
Code:
$reqcaseid = requested case id

Quote: for each case; do
set option $tycano, $reqtype and $reqcaseid for procone.py
done

Pls change to
Code:
register tasks:
        procone.py --tycano=$tycano --reqtype=$reqtype --reqcaseid=$reqcaseid

Quote: done

getresults()
}
[/code]
RR lingu

OK.

updated as follows:
Code:
select_case() {
    clear file $tspfn
    $reqcaseid = requested case id
    for each case; do
      register tasks:
        procone.py --tycano=$tycano --reqtype=$reqtype --reqcaseid=$reqcaseid
    done
    getresults()
}
Quote this message in a reply
09-26-2020, 05:11 PM
Post: #33
RE: BIBO (D)
I tried select with a caseid without a match, but it still returns 200.
Code:
16:09:45 lingu@g1b-2:/thinker/globe/soft/bibo/processed> ( cat sel_no_match.json; sleep 10 ) | ncat trajan.d-thinker.org 20050
{
"code": 200,
"msg": "ok",
}

16:10:08 lingu@g1b-2:/thinker/globe/soft/bibo/processed> cat sel_no_match.json
{"type":"select","query":"","caseid":"67be261c9e6311eabceb005056","insert":{}}

16:10:14 lingu@g1b-2:/thinker/globe/soft/bibo/processed>
Find all posts by this user
Quote this message in a reply
09-26-2020, 05:18 PM (This post was last modified: 09-26-2020 05:18 PM by lingu.)
Post: #34
RE: BIBO (D)
select_case does not work.

zhihao -5s lingu -2s

Note that -5s is a serious warning and may result in salary reduction.
Find all posts by this user
Quote this message in a reply
09-26-2020, 06:23 PM
Post: #35
RE: BIBO (D)
i've made select_case work.

zhihao - pls design and implement a test for select, and add it to test_crds
Find all posts by this user
Quote this message in a reply
09-26-2020, 06:30 PM
Post: #36
RE: BIBO (D)
插入的返回值内不能有children,已将其删除。

目前查询功能返回404。试了第三次,可以正常查询了
Code:
[zhihao@limbo30-1 processed]$ ( cat chendengchang-with-blank-line.json;sleep 18 ) | ncat trajan.d-thinker.org 20050
{
"code": 404,
"msg": "not found",
"children": [
]
}

[zhihao@limbo30-1 processed]$

200 OK 和 404 error的返回值格式有一点问题,最后的的key后面应该没有逗号。
202009261747/zhihao: 已修复该问题

Code:
[zhihao@limbo30-1 processed]$ ( cat del_zengxingliang.json;sleep 18 ) | ncat trajan.d
-thinker.org 20050
{
"code": 404,
"msg": "not found",                                                                  }

[zhihao@limbo30-1 processed]$ ( cat zengxingliang.json;sleep 18 ) | ncat trajan.d-thinker.org 20050
{
"code": 200,
"msg": "ok",
}
Quote this message in a reply
09-26-2020, 06:40 PM
Post: #37
RE: BIBO (D)
(09-26-2020 06:30 PM)zhihao Wrote:  插入的返回值内不能有children,已将其删除。

目前查询功能返回404。试了第三次,可以正常查询了

[zhihao@limbo30-1 processed]$ ( cat chendengchang-with-blank-line.json;sleep 18 ) | ncat trajan.d-thinker.org 20050

dont use that any more. use 'make test'.
Find all posts by this user
Quote this message in a reply
09-29-2020, 03:29 PM
Post: #38
RE: BIBO (D)
(09-24-2020 01:05 PM)zhihao Wrote:  目前BIBO的运行比较复杂,要启动simpleserv和Data Thinker,并联通端口。
另外,建议请把BIBO变成一个服务,用systemctl start bibo.service启动。
首文添加BIBO backend service:
BIBO backend service为BIBO系统的后台服务。
Quote this message in a reply
10-09-2020, 10:21 PM (This post was last modified: 10-09-2020 10:21 PM by lingu.)
Post: #39
RE: BIBO (D)
(09-24-2020 01:05 PM)zhihao Wrote:  BIBO系统目前部署在$bibo_base: /thinker/globe/soft/bibo

志豪 - 抱歉我错误认为bibo_base是你改了值,但其实我们原来设计的就是在/thinker/globe/soft/bibo,此处我忘记了。

现在我们将bibo_base改为/thinker/local/soft/bibo 另外bibo_share是/thinker/globe/soft/bibo 请创建一个讨论 BIBO work environment 列出这些变量。
Find all posts by this user
Quote this message in a reply
10-10-2020, 11:27 AM
Post: #40
RE: BIBO (D)
(10-09-2020 10:21 PM)lingu Wrote:  
(09-24-2020 01:05 PM)zhihao Wrote:  BIBO系统目前部署在$bibo_base: /thinker/globe/soft/bibo

志豪 - 抱歉我错误认为bibo_base是你改了值,但其实我们原来设计的就是在/thinker/globe/soft/bibo,此处我忘记了。

现在我们将bibo_base改为/thinker/local/soft/bibo 另外bibo_share是/thinker/globe/soft/bibo 请创建一个讨论 BIBO work environment 列出这些变量。

已创建BIBO work environment
Quote this message in a reply
Post Reply 


Forum Jump: