<div dir="ltr">Hi Paul,<br><div><div class="gmail_extra"><br><div class="gmail_quote">On 25 May 2013 15:15, Paul Norman <span dir="ltr"><<a href="mailto:penorman@mac.com" target="_blank">penorman@mac.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> From: Brett Henderson [mailto:<a href="mailto:brett@bretth.com">brett@bretth.com</a>]<br>
> Sent: Friday, April 19, 2013 4:12 AM<br>
> Subject: Re: [osmosis-dev] Wrapper scripts for streaming replication<br>
<div class="im">><br>
> It'd be great to see the replication streaming getting some usage. It doesn't seem to be used at the moment. In fact it's been down for a couple of weeks and it's trying to catch up again now.<br>
<br>
</div>Do you think it's stable enough to base a service on, or am I better off sticking with minutely diffs? <br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
The minutely diffs are used by enough services including OSMF hosted ones that you can be fairly confident that any stoppages will be found and fixed quickly, but I'm not sure the same is true for streaming diffs.<br>
</blockquote><div><br>That's right, we have a chicken and egg problem here. Minutely diffs are more stable
because they've been worked on for several years with a large number of
consumers. Replication streaming is fairly new and likely to take a
while to iron out the issues, but that won't occur unless people use it.<br><br></div><div>However I'm largely unavailable at the moment with other commitments, so I don't have much time to help fix things.<br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="im"><br>
> There are a couple of example Osmosis command lines on the following wiki page in case you haven't already seen them.<br>
> <a href="http://wiki.openstreetmap.org/wiki/Osmosis/Replication#Client-side_Streaming" target="_blank">http://wiki.openstreetmap.org/wiki/Osmosis/Replication#Client-side_Streaming</a><br>
<br>
</div>The pgsnapshot example would work from the shell, but do you have any examples for an unattened server?<br></blockquote><div><br></div><div>I don't have any scripts that I can share. It should be sufficient to write a wrapper script that redirects output to log files and launches the osmosis instance. For extra points it might be worth having it restart Osmosis if it fails (with some delays included), however Osmosis should theoretically handle error conditions such as network failures gracefully.<br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Also, what's the best way to switch to streaming replication from diffs, and the reverse?<br>
<br>
</blockquote></div>It's a similar question to switching from hourly to minute diffs where you'll have to figure out the sequence number to begin from, and doing that will require figuring out an approximate date that is earlier than your current replication point. Note that the streaming server does provide some assistance where it can provide you with a state file matching a particular timestamp. A curl example is provided in the URL you've already read, but more details on all the URLs are available here:<br>
<a href="http://wiki.openstreetmap.org/wiki/Osmosis/Detailed_Usage#--send-replication-data_.28--srd.29">http://wiki.openstreetmap.org/wiki/Osmosis/Detailed_Usage#--send-replication-data_.28--srd.29</a><br><br></div><div class="gmail_extra">
Brett<br><br></div></div></div>