Re: [DIYbio] Web-ready Refrideubator

Easier I feel to use XMLHttp.Server to host an XML-HTTP API server and use the corresponding Client module to pull and process data on another machine? Consider installing a secure XML monkeypatch though.

On 31 March 2014 17:51:01 GMT+01:00, Nathan McCorkle <nmz787@gmail.com> wrote:
those requests would be quite small though, so as long as the pi
doesn't throw them out, rather queues them, it might take a second or
three long but it should be fine... the returned data is just a few
bytes of text, and the packet overhead should be 20 bytes (according
to a quick google for ipv4). Someone else should probably comment on
the best server for the pi, but basically it should have a decent
timeout set and the ability to queue requests. I'd give flask a quick
try:
http://mattrichardson.com/Raspberry-Pi-Flask/

If the pi was trying to do the temp control PID loop, well you're
already in bad paradigm unless you have a RTOS/realtime kernel
running, but if you do just make sure the priority (nice, renice) of
the control process is lower (higher priority) than the server... and
no harm should be done. Worst case if the server does crap out for a
user, it just keeps trying until it gets the good response. I doubt
any small-time lab has to worry about this, and maybe even a medium
sized one would be fine too without another server (but likely those
companies/organization would have another better server, so it would
be easy to scale then).

On Mon, Mar 31, 2014 at 9:32 AM, Tom Hodder <tom@limepepper.co.uk> wrote:
On 31 March 2014 16:58, Nathan McCorkle <nmz787@gmail.com> wrote:

What about dynDNS for getting past the IP issue?


I think that solutions that put the pi on the internet as a web server are
just kicking down the road, the can containing the issue of scaling.

Which is basically that for these nice graphs, to get real time updates,
your going to be running a bunch of XMLHTTPRequest() to pull data into a
AJAX/jQuery or other nice visualization running in the browser. And these
are all going to be served by the pi. If you have 10 users watching some
experiment in progress, and then they would all be polling the pi
continuously. Eventually this is going to compromise the pi's ability as a
controller/sensor.

For scaling, it would be better just to have the pi batch a bunch of data,
say every 10 seconds, and post it to a dedicated server, with decent
resources, which can scale to dishing out lots of updates to web browsers.
Load might bring down the web server, say an AWS virtual, or
https://www.pythonanywhere.com/, but the Pi would go on oblivious.

(and you would definitely not lose ssh access to the pi, during a critical
experiment etc, the important thing that would result in you having to get
out of bed ;-)

Cheers,
Tom











--
-- You received this message because you are subscribed to the Google Groups
DIYbio group. To post to this group, send email to diybio@googlegroups.com.
To unsubscribe from this group, send email to
diybio+unsubscribe@googlegroups.com. For more options, visit this group at
https://groups.google.com/d/forum/diybio?hl=en
Learn more at www.diybio.org
---
You received this message because you are subscribed to the Google Groups
"DIYbio" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to diybio+unsubscribe@googlegroups.com.
To post to this group, send email to diybio@googlegroups.com.
Visit this group at http://groups.google.com/group/diybio.
To view this discussion on the web visit
https://groups.google.com/d/msgid/diybio/CAB%2BzPJAvpkXqVae9zMdq%2BsYDvgaRqXZou-3y4dOLa-dQ2Byr_Q%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.



--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 comments:

Post a Comment