<div dir="ltr">No, Osmium can't do what I described. The reader thread / worker thread model you describe does not read the data in parallel on multiple machines, which is what I have been doing, albeit with a preprocessing step to separate the blocks as they are not currently directly addressable, or even seperable, without a sequential read.<div><br></div><div>A delimiter would however solve this problem.</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, 16 Oct 2018 at 22:43, Jochen Topf <<a href="mailto:jochen@remote.org">jochen@remote.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, Oct 16, 2018 at 10:18:08PM +0200, William Temperley wrote:<br>
> Requiring the sequential read makes using the pbf format difficult in data<br>
> parallel processing.<br>
> <br>
> When files are split into equal sized chunks to be processed in parallel,<br>
> it is necessary to be able to seek to the beginning of the next block<br>
> (blob) to begin processing there.<br>
> <br>
> This is not currently possible with the pbf format, as the file _must_ be<br>
> read sequentially to figure out where the blob ends / new one begins. With<br>
> an index, or even just a simple delimiter it would be possible to figure<br>
> this out in a parallel processing scenario.<br>
<br>
Osmium can do this just fine. It has one thread reading the data<br>
sequentially, figuring out where the blocks start and end and parceling<br>
out the block decoding work to other threads. Not as simple and probably<br>
not quite as fast as with an index pointing to those blocks, but it does<br>
work.<br>
<br>
Indexes have the drawback that you can't streaming-write the data any<br>
more, you have to go back to write the index. Or you write them at the<br>
end, then you can't streaming read any more (at least when you want to<br>
use the index).<br>
<br>
Jochen<br>
-- <br>
Jochen Topf  <a href="mailto:jochen@remote.org" target="_blank">jochen@remote.org</a>  <a href="https://www.jochentopf.com/" rel="noreferrer" target="_blank">https://www.jochentopf.com/</a>  +49-351-31778688<br>
</blockquote></div>