SAP CRM呼叫中心和Hybris Backoffice的轮询设计
在CRM的呼叫中心里,每隔1秒会有一个poll:
the browser polls at regular intervals (typically once per second) to the server and will thus get the information that the new event (alerting phone call) has occurred.
Hybris backoffice
打开backoffice, 什么都不干,每隔一段时间有一个roundtrip到java端:
response:
发起这些zkau轮询的js文件cockpitNGAdapter.js在temp folder下面:
这些request的purpose:
http://forum.zkoss.org/question/109480/continuous-requests-for-zkau/
ABAP
BC系列有很多sample report,要使用这些report需要表里具有sample data。SAP提供了标准的report来生成这些sample data。
(1) SAPBC_DATA_GENERATOR program for filling SFLIGHT and SBOOK tables
(2) SAPBC_DATA_GENERATOR_ALE program for ALE demo programs
(3) SFLIGHT_DATA_GEN program for filling STICKET and SNVOICE tables
(4) BCALV_GENERATE_ALV_T_T2 program for filling ALV_* tables (a few ALV test programs)
Hybris
Hybris安装包里有很多.impex文件,在安装过程中这些.impex文件会被执行,里面包含的sample data会被导入到数据库里。
参考:
(1) 通过Impex实现CRM和Hybris的轻量级data exchange
(2) Data migration approach in CRM, C4C and Hybris
比如这个product id为300938的product:
如果想查看所有关于这个product的sample data:
搜出来48个和product相关的文件,包含该product各个维度的sample data:
impex的内容很难读:
采用如下report 研究asynchronous RFC call的性能提升:
PARAMETERS: num TYPE i OBLIGATORY DEFAULT 10.
DATA:ls_line TYPE zjerry1,
lv_start TYPE i,
lv_end TYPE i,
lv_taskid TYPE c LENGTH 8,
lv_index TYPE c LENGTH 4,
lv_finished TYPE i,
lv_count TYPE i.
START-OF-SELECTION.
PERFORM solution2.
FORM solution2.
DELETE FROM zjerry1.
GET RUN TIME FIELD lv_start.
DO num TIMES.
lv_index = sy-index.
lv_taskid = 'Task' && lv_index.
CALL FUNCTION 'ZINSERT' STARTING NEW TASK lv_taskid PERFORMING callback ON END OF TASK
EXPORTING
iv_index = CONV comm_product-product_id( sy-index ).
ENDDO.
WAIT UNTIL lv_finished = num.
GET RUN TIME FIELD lv_end.
lv_end = lv_end - lv_start.
WRITE: / 'Solution2: ' , lv_end COLOR COL_NEGATIVE.
SELECT COUNT( * ) INTO lv_count FROM zjerry1.
ASSERT lv_count = num.
ENDFORM.
FORM callback USING p_task TYPE clike.
ADD 1 TO lv_finished.
ENDFORM.
function module ZINSERTmonitor的是一个比较费时的操作,在末尾会有一个DB的insertion:
DATA: ls_line TYPE zjerry1,
lv_cal TYPE timestamp,
lv_cal1 TYPE timestamp.
GET TIME STAMP FIELD lv_cal.
DO 10000 TIMES.
lv_cal = lv_cal + 1.
lv_cal = ( lv_cal * 13 ) / 12.
DO 100 TIMES.
GET TIME STAMP FIELD lv_cal1.
lv_cal = lv_cal * 13 / 17.
ENDDO.
ENDDO.
ls_line-code_value = iv_index.
INSERT zjerry1 FROM ls_line.
ASSERT sy-subrc = 0.
COMMIT WORK AND WAIT.
DB的结构非常简单:
如果在report 里直接调用ZINSERT, response time为4.493 seconds.
如果在DO 2 TIMES里调用两次ZINSERT, 两次function module call是依次执行的,response time为8.493 seconds
如果用report 以参数2 以异步的方式调用ZINSERT 2次,report 本身的response time为3.074 seconds:
number = 3:
number = 5:
- 点赞
- 收藏
- 关注作者
评论(0)