Closed Bug 1162031 (messages-nga-services) Opened 10 years ago Closed 8 years ago

[Meta][Messages][NG] Migrate business logic to bridge-based services

Categories

(Firefox OS Graveyard :: Gaia::SMS, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: julienw, Unassigned)

References

Details

(Keywords: meta, Whiteboard: [p=3])

No description provided.
Depends on: 1163955
Hi Wilson, I have some concern about the threads library while doing some testing in message app: - I added a tiny service with method doing nothing and call method while rendering messages, including requesting the message/contact/FB at the same moment. The callback returned successfully, but with a significant delay(about 3 sec, on flame/master). I can image the busy main thread might pend the worker return, but it there any way to tune it except put everything into service? - Is it possible to call other services in another service? Because in message app some service will access another service directly, but this lib seems unable to request other service as client in the service, but maybe I'm wrong...
Flags: needinfo?(wilsonpage)
I create a WIP[1] for simply launch the first view. Considering the communication might be affect if main thread is busy(see comment 1), I apply another solution that request and cache all draft at first and render thread when cache ready. This approach might introduce less change from current codebase, and the most important point is reduce the request draft service from requesting draft in every thread to only 1 time. The drawback is maintaining the cache and we might another async way to update thread. [1] https://github.com/steveck-chung/gaia/commit/66e60a32b62024910061458a77b6a08724d1894b
Some profiling data from Raptor with 10 runs in each case: - Master with no data workload Metric Mean Median Min Max StdDev p95 -------------------------------- -------- -------- -------- -------- ------ -------- coldlaunch.navigationLoaded 948.100 945.000 903.000 1003.000 31.735 1003.000 coldlaunch.willRenderThreads 981.000 977.000 941.000 1035.000 30.738 1035.000 coldlaunch.navigationInteractive 983.500 979.500 943.000 1038.000 30.657 1038.000 coldlaunch.visuallyLoaded 1099.200 1090.500 1057.000 1170.000 34.070 1170.000 coldlaunch.fullyLoaded 1213.500 1205.500 1165.000 1284.000 36.131 1284.000 coldlaunch.contentInteractive 1507.100 1493.000 1460.000 1582.000 42.231 1582.000 coldlaunch.uss 12.720 12.800 12.300 12.900 0.227 12.900 coldlaunch.objectsInitEnd 1564.300 1547.500 1521.000 1643.000 41.475 1643.000 coldlaunch.pss 17.690 17.800 17.300 17.900 0.207 17.900 coldlaunch.rss 30.850 30.950 30.400 31.000 0.211 31.000 - Master with light data workload Metric Mean Median Min Max StdDev p95 -------------------------------- -------- -------- -------- -------- ------- -------- coldlaunch.navigationLoaded 961.400 971.500 915.000 1009.000 33.314 1009.000 coldlaunch.willRenderThreads 996.000 1004.500 946.000 1042.000 34.246 1042.000 coldlaunch.navigationInteractive 998.900 1007.500 948.000 1045.000 34.683 1045.000 coldlaunch.visuallyLoaded 1330.900 1331.000 1278.000 1407.000 42.049 1407.000 coldlaunch.contentInteractive 1839.700 1830.000 1761.000 1918.000 42.083 1918.000 coldlaunch.objectsInitEnd 1878.600 1867.000 1797.000 1963.000 43.327 1963.000 coldlaunch.fullyLoaded 3178.600 3206.000 2951.000 3310.000 116.996 3310.000 coldlaunch.pss 21.610 21.350 20.700 23.700 0.815 23.700 coldlaunch.rss 35.260 35.050 34.300 37.300 0.806 37.300 coldlaunch.uss 16.370 16.150 15.500 18.400 0.801 18.400 - Master with light data workload and 5 drafts Metric Mean Median Min Max StdDev p95 -------------------------------- -------- -------- -------- -------- ------ -------- coldlaunch.navigationLoaded 966.600 951.000 917.000 1040.000 40.302 1040.000 coldlaunch.willRenderThreads 1000.900 985.000 954.000 1069.000 39.006 1069.000 coldlaunch.navigationInteractive 1003.600 987.500 957.000 1072.000 39.126 1072.000 coldlaunch.visuallyLoaded 1334.400 1325.000 1284.000 1413.000 37.985 1413.000 coldlaunch.contentInteractive 1840.500 1826.000 1801.000 1914.000 40.864 1914.000 coldlaunch.objectsInitEnd 1879.500 1868.500 1837.000 1954.000 41.362 1954.000 coldlaunch.fullyLoaded 3346.300 3336.000 3274.000 3496.000 59.960 3496.000 coldlaunch.uss 16.130 16.000 15.300 18.400 0.840 18.400 coldlaunch.rss 35.050 34.900 34.200 37.300 0.846 37.300 coldlaunch.pss 21.370 21.300 20.500 23.600 0.844 23.600 - Using Bridge with no data workload Metric Mean Median Min Max StdDev p95 -------------------------------- -------- -------- -------- -------- ------ -------- coldlaunch.navigationLoaded 983.400 977.500 950.000 1025.000 25.168 1025.000 coldlaunch.willRenderThreads 1018.000 1012.000 985.000 1059.000 24.511 1059.000 coldlaunch.navigationInteractive 1018.900 1012.500 986.000 1060.000 24.509 1060.000 coldlaunch.visuallyLoaded 1478.600 1461.500 1421.000 1602.000 55.189 1602.000 coldlaunch.fullyLoaded 1590.900 1566.500 1525.000 1744.000 66.806 1744.000 coldlaunch.contentInteractive 1886.000 1882.500 1822.000 2005.000 53.965 2005.000 coldlaunch.uss 13.770 13.750 13.700 13.900 0.078 13.900 coldlaunch.objectsInitEnd 1942.500 1934.000 1865.000 2046.000 56.646 n/a coldlaunch.rss 32.490 32.500 32.400 32.600 0.083 32.600 coldlaunch.pss 18.910 18.900 18.800 19.100 0.094 19.100 - Using Bridge with light data workload Metric Mean Median Min Max StdDev p95 -------------------------------- -------- -------- -------- -------- ------ -------- coldlaunch.navigationLoaded 975.600 980.500 907.000 1023.000 31.277 1023.000 coldlaunch.willRenderThreads 1012.300 1015.500 950.000 1060.000 29.685 1060.000 coldlaunch.navigationInteractive 1013.300 1016.500 951.000 1061.000 29.685 1061.000 coldlaunch.visuallyLoaded 1686.100 1702.500 1558.000 1816.000 79.464 1816.000 coldlaunch.contentInteractive 2215.600 2232.500 2052.000 2337.000 95.604 2337.000 coldlaunch.objectsInitEnd 2254.700 2273.000 2089.000 2377.000 96.951 2377.000 coldlaunch.fullyLoaded 3437.900 3449.500 3320.000 3510.000 55.423 3510.000 coldlaunch.uss 17.910 17.900 16.900 18.900 0.468 18.900 coldlaunch.pss 23.250 23.300 22.300 24.200 0.452 24.200 coldlaunch.rss 37.070 37.100 36.100 38.100 0.473 38.100 - Using Bridge with light data workload and 5 drafts Metric Mean Median Min Max StdDev p95 -------------------------------- -------- -------- -------- -------- ------ -------- coldlaunch.navigationLoaded 992.200 992.000 954.000 1019.000 20.104 1019.000 coldlaunch.willRenderThreads 1028.600 1028.000 987.000 1055.000 20.141 1055.000 coldlaunch.navigationInteractive 1029.600 1029.000 988.000 1056.000 20.141 1056.000 coldlaunch.visuallyLoaded 1769.900 1769.500 1685.000 1831.000 42.616 1831.000 coldlaunch.contentInteractive 2276.300 2277.000 2200.000 2358.000 46.866 2358.000 coldlaunch.objectsInitEnd 2312.200 2315.000 2235.000 2394.000 46.893 2394.000 coldlaunch.fullyLoaded 3470.500 3455.000 3390.000 3571.000 62.309 3571.000 coldlaunch.uss 17.070 16.800 16.100 18.800 0.851 18.800 coldlaunch.rss 36.200 36.000 35.200 37.900 0.850 37.900 coldlaunch.pss 22.390 22.150 21.400 24.100 0.850 24.100
Flags: needinfo?(wilsonpage)
You're correct, we're having issues getting messages between threads when the main-thread is busy. I raised this concern in the last Gaia meeting and mentioned that I was working with platform to come up with a fix. When app is idle these communications are super fast. I'll keep you up-to-date, apologies for this :(
Depends on: 1166198
(In reply to Wilson Page [:wilsonpage] from comment #4) > You're correct, we're having issues getting messages between threads when > the main-thread is busy. > > I raised this concern in the last Gaia meeting and mentioned that I was > working with platform to come up with a fix. > > When app is idle these communications are super fast. > > I'll keep you up-to-date, apologies for this :( Wilson are you talking about bug 1164539 ?
Flags: needinfo?(wilsonpage)
(In reply to Francisco Jordano [:arcturus] [:francisco] from comment #5) > (In reply to Wilson Page [:wilsonpage] from comment #4) > > You're correct, we're having issues getting messages between threads when > > the main-thread is busy. > > > > I raised this concern in the last Gaia meeting and mentioned that I was > > working with platform to come up with a fix. > > > > When app is idle these communications are super fast. > > > > I'll keep you up-to-date, apologies for this :( > > Wilson are you talking about bug 1164539 ? Yep
Flags: needinfo?(wilsonpage)
See Also: → 1164539
Hi Wilson, While playing threads lib with iframe thread mode, I could not make this service start up. To be more precisely, I add the small html markup and iframe as target. The test html contains threads lib for server side and a script with service method inside. But the script never load actually. I can't find any error message in the log, is there anything I might missed for setting a iframe service?
Flags: needinfo?(wilsonpage)
(In reply to Steve Chung [:steveck] from comment #7) > Hi Wilson, > > While playing threads lib with iframe thread mode, I could not make this > service start up. > To be more precisely, I add the small html markup and iframe as target. The > test html contains threads lib for server side and a script with service > method inside. But the script never load actually. I can't find any error > message in the log, is there anything I might missed for setting a iframe > service? - Do you have code I can look at? - Have you looked at the tests/ to see how we're doing it? [1] - You should usually let the threads-manager create the iframe for you, but if that is not possible you can pass do stuff a little more manually [1]. [1] https://github.com/gaia-components/threads/blob/master/test/child-thread.test.js#L66-L114
Flags: needinfo?(wilsonpage)
Depends on: 1168441
Depends on: 1169150
Depends on: 1169543
No longer blocks: 1155509
Let's make this meta bug for all of our services .
Alias: messages-nga-services
Blocks: messages-nga
Keywords: meta
Summary: [Messages][New Gaia Architecture] use the bridge with a shared worker → [Meta][Messages][NG] Migrate business logic to bridge-based services
Depends on: 1167226
Depends on: 1169558
Depends on: 1169573
Depends on: 1169541
Depends on: 1162028
No longer depends on: 1162028
Depends on: 1179628
No longer depends on: 1169558
No longer depends on: 1169541
Depends on: 1179705
Depends on: 1180591
Depends on: 1180592
No longer depends on: 1163955
Depends on: 1201016
Depends on: 1219264
Depends on: 1223363
Depends on: 1224514
Mass closing of Gaia::SMS bugs. End of an era :(
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
Mass closing of Gaia::SMS bugs. End of an era :(
You need to log in before you can comment on or make changes to this bug.