Dalvik
2016-05-07 20:51:46 1 举报
Dalvik是Google公司设计的一款Android操作系统的虚拟机。它专为移动设备优化,使得在有限的资源下也能运行复杂的应用程序。Dalvik虚拟机将Java字节码转换为机器语言,使得应用程序可以在各种硬件平台上运行。它的设计目标是高效、节省空间和快速。Dalvik虚拟机还提供了一种称为“垃圾收集”的功能,可以自动回收不再使用的内存,从而避免了内存泄漏的问题。此外,Dalvik还支持多个应用程序同时运行,每个应用程序都在自己的虚拟机实例中运行,互不干扰。总的来说,Dalvik是Android系统的核心组成部分,为Android设备的流畅运行提供了强大的支持。
作者其他创作
大纲/内容
SsHttpCall
+ enqueue()+ call()
NetInit
+ isInited
+ initTTNet()+ isTTNetnited()+ registerListener()+ removeLiistener()
启动器调度
class Context
RootRunner rootRunner;StoreObservables storeObservables;
其他开发者自己实现的Component
E
网络库新版本
ProloadCallAdapter
+ adapt+ responseType
cronet失败率上升报警
Preload
+ operation1(params):returnType- operation2(params)- operation3()
I18n
ItemState
ProloadRequestCallAdapter
+ delegateAdapter
+ adapt+ responseType+ addHeader()+ addReqiestId()
ReportState
D
失败率上升
开启httpdns
Dependencies
Framework共享类及资源
业务自查
解决记录问题
确定app版本和ttnet cronet版本
AbstractFeature
+ set()+ get()+ interruptTask()
Dependent
LeafObservable
C
ModelMixinVisitor
ModelMixinTemplatevisitClassElement(ClassElement element)
dependencies/父组件ToDoListPage依赖子组件ToDoListAdapter和Report
IStrategy
+ create(url):Retrofit- interceptors():List<Interceptor>- callAdapter()- client()- executor()
StatelessWidget
NetExecutor
+ execute()+ add()
ReportComponent
启动器调度通用参数的初始化,优先级应该比较高
I18nManagerServiceImpl
+ installCommonParams()
SocketRetrofitStrategy
+ create(url):Retrofit- client()
ProloadRetrofitStrategy
+ create(url):Retrofit- interceptor()- executor()-callAdapter()
发现crash
crash
在Api注解中定制缓存策略LoadPolicy:1.prefer_cache:优先从缓存获取2.prefer_preload:优先从预加载获取3.prefer-network:优先从网络获取5.cache_preload:先从缓存再从预加载6.preload_cache:先从预加载再从缓存7.force-cache:强制从缓存获取8.expire:过期时间preload_key/cache_key:业务方定制,用来唯一标识此请求的key
ActionTemplate
StreamBuilder
+ initState+ didUpdateWidget+ build
Socket服务端
Observable
registerObserverunregisterObserverattachToParentdetachFromParent
abstract class AbstractAdapter<T> implements AbstractLogi
B
完成合入
同一段物理内存空间
StoreConnector
+ build:Widget
ModelMixinTemplate
ActionMixinVisitor
ActionTemplatevisitClassElement(ClassElement element)
class Mounter
ModelMixin modelMixin;Observable observable;
DalvikVm普通APK进程
DalvikVmSystemServer进程
登记技术需求
class Logic implements AbstractLogic
_StoreStreamListener
+ createState:State
APK自有程序及资源
INetInitListener
+ beforeInit()+ complete()
State
Client
+ newSsCall()
CommonRetrofitStrategy
+ interceptors:List
+ create(url):Retrofit- interceptors():List<Interceptor>
服务器
StreamBuilderBase
反馈给ttnet同学
可缓存/可预加载的请求
第一种方式的key:为保证唯一性需要在类里面主动声明
ProloadManager
+ lruCache
+ put()+ get()+ lock+ unlock
class _PageState<T> extends State<_PageWidget<T>>
+initState(创建store)+didChangeDependencies(AppProvider注册store监听)+build(通过component.buildComponent创建view)+dispose(移除监听)
CommonParamsManager
- concurrentHashMap
+ init()+ addCommonParams()+ updateCommonParams()+ getParamsMap()
OkHttpRetrofitStrategy
+ create(url):Retrofit- celint()
SimpleElementVisitor
xxTemplate visitClassElement(ClassElement element)
根据在header中定制的cache-control来决定是否缓存
CommonParamsService
+ run()
ApiTask
+ delay()+ run()
abstract class AbstractComponent<T> implements AbstractLogic
zygote启动的第n个程序
ToDoListPage
_ToDoListConnector
CommonParamsInterceptor
+ interceptor
Net
+ setXXX()
Comparable<IRequest>
+ compare
Y
DNS
api
NetManager
+ put+ get+ remove+ key
kibana上分url path,feed api失败率升高
合入等待发版
class NodeConnector<T extends Node>
T value;Function _onConnected;Function _onDisconnected;NodeConnector(this.value) : assert(value != null);NodeConnector<T> parent;
connect(NodeConnector<T> connector):bool disconnect(NodeConnector<T> connector):bool
kibana分地区看失败率,部分国家问题突出
ModelObservable
OkhttpClient
AppProvider保持所有注册store的回调监听方法,AppProvider.appBroadcast可以将action传给所有注册的store,两个Context中会调用AppProvider.appBroadcast方法广播
返回值为ListenableFuture代表正常请求
FeedApi
+ recommendFeed()+ preloadFeed()
客户端bug
项目开始
NetworkTask
StoreMixinTemplate
Adapter
mixin ModelMixin
Context _context;List<Mounter> pendingActions
图片
Video/VideoStateVideoActionVideoReducer
StateTemplate
Node
A
StatefulWidget
是否满足独立灰度合入要求
qa反馈
NoSelectorRetrofitStrategy
+ create(url):Retrofit
找ttnet同学排查
开发反馈
iea-qa上根据版本细分,无法定位
Connector用来做状态转换,get:将父state的值传给子state,set:将子state的值传给父state
Component / PageState
TargetVisitor
StoreMixinTemplate visitClassElement(ClassElement element)
StoreMixinVisitor
ToDoComponent
jira登记
Comment/CommentStateCommentActionCommentReducer
abstract class PageStore<T> extends Store<T> implements Broadcast
RequestManager
+ queue- executor
+ executeImmediate()+ add()+ execute()+ ttnetInited()
StoreMixin
String name;Context _context;Observable _observable;DynamicNodeConnector<StoreMixin> _connector;
发现问题
View
LibraryTemplate
String toString()
每次通过updateCommonParams更新通用参数,更新结果保存在map里面供拦截器调用
在注解中定制LoadPolicy:1.cache:可以缓存,保存在disklrucache中2.preload:保存在内存中5.expire:过期时间preload_key/cache_key:业务方定制,用来唯一标识此请求的key
PreloadFeature
ScoketClient
+ newSsCall()
Component
class _PageWidget<T> extends StatefulWidget
Component<T> componentstoreBuilder
+ createState
I18nManagerService
抖音
System Server相关类及私有资源
StoreLibraryGenerator
ToDoListAdapter
StoreObservable
Reducer
发布独立灰度
PreloadKeyConstant
+ key1+ key2+ key3
向测试同学预约独立灰度号段
根据定制的cache-control策略来决定获取什么类型的回调
RetrofitFactory
CronetRetrofitStrategy
_StoreStreamListenerState
DMT三端打包测试
_StreamBuilderBaseState
+ initState+ dispose- _subscribe- _unsubscribe
N
RetryRetrofitStrategy
+ create(url):Retrofit+ interceptor()
Effect
DownloadRetrofitStrategy
+ create(url):Retrofit- executor()- client()
HomePage
kibana看feed具体错误信息,dns解析问题
xxxApi
关于Key值:1.url传入preload key2.url path+参数唯一确定
class DynamicNodeConnector
connect(NodeConnector):booldisconnect():bool
IRequest
+ getPriority()+ getSequence()
DalvikVmzygote进程
正常请求
进入先一个项目
CND
问题分类
CronetClient
每个子项目开发提测
OkHttpClient
时延上升
MultiEngineRetrofitStrategy
Client.Provider
+ get()
ReportDepedent
StateMixinVisitor
StateTemplatevisitClassElement(ClassElement element)
AbstractLogic
RootObservable
Generator
拦截器直接获取Manager类里面的map添加通用参数
找网络库owner排查
+buildPage
项目分解
端监控
abstract class Component<T> extends Logic<T> implements AbstractComponent
ViewBuilder<T> view;ShouldUpdate<T> shouldUpdate;WidgetWrapper wrapper;
+buildComponent+createViewBuilder+createState+neverUpdate+alwaysUpdate+updateByDefault-_wrapperByDefault-_asGetter
+ hashMap
+ put()+ get()+ remove()
ReportConnector
zygote启动的第一个进程
Music/MusicStateMusicActionMusicReducer
PreloadLock
+ locks():int[]
+lock+ unlock
0 条评论
下一页