On Tue, 2018-07-17 at 13:11 +0100, Richard Purdie wrote: > On Mon, 2018-07-16 at 15:37 -0500, Joshua Watt wrote: > > Adds an initial reference implementation of the hash server. > > > > NOTE: This is my first dive into HTTP & REST technologies. Feedback > > is > > appreciated. Also, I don't think it will be necessary for this > > reference > > implementation to live in bitbake, and it can be moved to it's own > > independent project if necessary? > > > > Also, this server has some concurrency issues that I haven't > > tracked > > down and will occasionally fail to record a new POST'd task with an > > error indicating the database is locked. Based on some reading, I > > believe this is because the server is using a sqlite backend, and > > it > > would go away with a more production worthy backend. Anyway, it is > > good > > enough for some preliminary testing. > > > > Starting the server is simple and only requires pipenv to be > > installed: > > > > $ pipenv shell > > $ ./app.py > > I need to spend some time digesting this series but this patch did > make > me a little sad. > > I'm hoping we can make the hash equivalence server something people > use > easily and perhaps part of bitbake. The dependencies you've used in > this code mean it has a significantly higher "barrier to use" than > most > of our other code though :( > > On the one hand I can understand people wanting to use dependencies > and > new technology. On the other, keeping things simple also has > advantages. > > Even the minimum python version is potentially problematic, we don't > even have working recipes for python 3.6! > > I appreciate its a reference and means we can test the rest of the > code > so its good but we may need a different implementation of this > ultimately.
I had a look around, and I think it should be quite feasible to implement a reference server using only the standard Python libraries (e.g. SimpleHTTPServer). The actual API that the server is *required* to implement is very small (a single endpoint of "/v1/equivalent" with GET and POST methods). It will probably have a number of limitations (scalability, authentication, security, etc.) but for something to get started or for automated testing purposes, I think it will be sufficient. I'll probably wait a few days at least before I loop back around to look at that, so I'd like to leave this discussion open, e.g. Do we want a simpler reference implementation? > > Cheers, > > Richard > -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core