Differences
This shows you the differences between two versions of the page.
replayserver [2013/11/02 16:36] bruno [Contact] |
replayserver [2017/07/21 03:08] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== 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. | ||
- | |||
- | |||
- | ===== ReplayServer Architecture ===== | ||
- | As a core server the ReplayServer must be placed inside the SDDL core network as displayed below: | ||
- | |||
- | {{ : | ||
- | |||
- | 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: | ||
- | <file java ClientTest.java> | ||
- | @Override | ||
- | |||
- | public void connected(NodeConnection remoteCon) { | ||
- | ApplicationMessage message = null; | ||
- | message = new ApplicationMessage(); | ||
- | ResquestType serializableContent = new ResquestType(); | ||
- | serializableContent.fromPeriod = " | ||
- | |||
- | serializableContent.type = " | ||
- | 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 and ask if you need some help: | ||
- | |||
- | Bruno Olivieri - bruno@olivieri.com.br | ||