Replies: 2 comments 6 replies
-
Overall sounds reasonable to me.
How do you envision this might influence design/architecture? I don't know about "planet scale" but at least nation-level deployments should be reasonable? Further down the line it could be interesting to explore something like what OpenTripPlanner Android does in being able to shard over multiple servers (potentially hosted by various entities). To me Headway is the most interesting in something that will be hosted in a distributed fashion by various independent parties, so design shouldn't be restricted to what you foresee yourself being able to pull off. (In case I'm projecting project vision too much here set it straight)
That's the way to go. So the long-lived "server" image should ideally be able to just kick off without any preprocessing inside the container. All data should be from a mounted volume. So basically ETL.
Makes sense! And as long as this is made like that it should work just as fine with other orchestration systems like Openshift, Nomad, etc, without headway having to be conscious about or support them. BTW, questions like the above are motivations behind twelve-factor app design patterns with IMO are best practices for good reason so def worth a read if you aren't familiar :) |
Beta Was this translation helpful? Give feedback.
-
Spinning off a discussion here from the comments of #10 It seems like we could just add an entry point script to all of the dockerfiles and then mount host directories as volumes https://stackoverflow.com/a/32398921 This really doesn't look that bad and it could completely remove all of those needless copies, ephemeral containers and |
Beta Was this translation helpful? Give feedback.
-
Just wanted to have a central place to discuss how to deal with the docker configuration. I know @3nprob seemed to have opinions about this.
First, my assumptions about what headway should be and how it should be used:
Rationale for 1 is that it will eventually need to use OpenTripPlanner for transit, which doesn't extend to planet scale if I remember correctly. It's also incredibly expensive to host a planet-scale geocoder and unless this project has a reliable source of funding that's not in the cards. Rationales for 2 and 3 should be clear, but feel free to object obviously!
With all that said, I'd like to gather feedback about what people think it should look like. Right now all the data is collected into the container images, which isn't great. A friend of mine suggested a kubernetes init image to preprocess the data, which makes a lot of sense to me. I think that one container could potentially handle everything from downloading the extract to generating the geocoder indexes. The container could also check the freshness of the pre-processed data and conditionally skip steps if the data is fresh enough.
If k8s can run that job during the deployment process then it could be very simple to deploy updates. Once the data is all generated it could be put on a volume that the server containers could mount as read-only. For the docker-compose case, the makefile could just run that container locally to generate the volume then the rest of the containers could be run by docker-compose as they are right now.
Does this make sense?
Beta Was this translation helpful? Give feedback.
All reactions