====== ReplayServer ====== The ReplayServer is a core server to provide Group messages history in the SDDL [[architecture|Middleware]]. He is capable to listen Topics saving their messages and retransmit then when solicited. It extends the pub/sub model in a perspective that a MobileNode or a DDS core server can recover past messages and connect or reconnect. Moreover, it can replay messages sent for all clients or each specific group! ===== ReplayServer Architecture ===== As a core server the ReplayServer must be placed inside the SDDL core network as displayed below: {{ :replayserver01.jpg?300 |}} It works with a listener that subscriber the [[hellogroup|Message and PrivateMessage]] SDDL topics in order receives all messages and save the selected in a DBMS (MySQL). Then anytime a client or another core server need some messages from a specific moment in the past. ===== ReplayServer Usage ===== It was configured to be used by any application witch transport an String as a payload. To use the ReplayServer you must follow the steps below: 1) Download it from [[here]]. 2) Make sure that you have the MySQL running with the db provided. 3) Provide the config parameters inside the file configurations.txt. 4) Run it! It´s done. To retrieve the messages you can easily test it by altering the [[hellomobile|connected method]] in any SDDL example as bellow: @Override public void connected(NodeConnection remoteCon) { ApplicationMessage message = null; message = new ApplicationMessage(); ResquestType serializableContent = new ResquestType(); serializableContent.fromPeriod = "2013-10-21 01:00:00"; // From when you desire the messages ... serializableContent.type = "gmessage"; // Specifying the kind of message, this is the default kind. serializableContent.group = 2; // GroupDefiner group code or -1 for messages sent for all clients. message.setContentObject(serializableContent); try { remoteCon.sendMessage(message); } catch (IOException e) { e.printStackTrace(); } } If you desire use other payloads or your own message type, you must include then in the [[hellocore|onNewData method a provide your processMessageTopic]]. You can easy inspect the code and reuse the extra samples. ==== Disclamer ==== This was done as the first contact with the SDDL middleware and the Pub/Sub paradigm. You can freely use this service and ask if you need some help: Bruno Olivieri - bruno@olivieri.com.br