1 #ifndef INCLUDE_TRAINER_SERVER_H_
2 #define INCLUDE_TRAINER_SERVER_H_
4 #include <utils/param.h>
5 #include <utils/updater.h>
6 #include "proto/model.pb.h"
7 #include "communication/socket.h"
23 typedef std::map<int, shared_ptr<Param>> ParamShard;
25 Server(
int thread_id,
int group_id,
int server_id);
26 void Setup(
const UpdaterProto& proto, shared_ptr<ParamShard> shard);
71 int thread_id_,group_id_, server_id_;
72 shared_ptr<Dealer> dealer_;
73 shared_ptr<Updater> updater_;
74 shared_ptr<ParamShard> shard_;
77 #endif //INCLUDE_TRAINER_SERVER_H_
virtual int HandleSyncResponse(shared_ptr< Param > param, Msg **msg)
TODO Process SYNC response.
virtual bool SyncNow()
Scheduler for synchronizing server groups.
Definition: model.pb.h:3432
virtual Msg * HandleUpdate(shared_ptr< Param > param, Msg **msg)
Process Update request.
virtual Msg * HandlePut(shared_ptr< Param > param, Msg **msg)
Process PUT request.
virtual Msg * HandleGet(shared_ptr< Param > param, Msg **msg)
Process GET request.
virtual Msg * HandleSyncRequest(shared_ptr< Param > param, Msg **msg)
TODO Process SYNC request.