Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Forth web server

282 views
Skip to first unread message

Brad Eckert

unread,
Jun 27, 2016, 8:32:39 PM6/27/16
to
Hi All,

Does anyone know of a Forth-based web server that I can point my browser at and see stuff? A quick web search only turned up Bernd's nicely documented source code for a web server.

I'm looking to use Forth to control the back end of a database. The front end is a widely distributed bunch of sensors. I want the sensors to upload their data to the server using HTTP Get and Put requests. The server may have to do some smart stuff like serve up license keys, but other than that it's probably straightforward.

I might protect the sensor's data using a stream cipher with a fixed key hidden in the MCU firmware in such a way that you'd have to etch a hole in the chip's plastic package and get creative with micro probes to dig it out. Is this a dumb idea?

-Brad

Bill Zimmerly

unread,
Jun 27, 2016, 9:10:16 PM6/27/16
to
Bernd's server works great, and you can put active Forth content between the <$ and $> tags.

I suggest getting the very latest snapshot though. ;)

https://www.complang.tuwien.ac.at/forth/gforth/Snapshots/

Paul Rubin

unread,
Jun 27, 2016, 9:24:28 PM6/27/16
to
Brad Eckert <hwf...@gmail.com> writes:
> I might protect the sensor's data using a stream cipher with a fixed
> key hidden in the MCU firmware in such a way that you'd have to etch a
> hole in the chip's plastic package and get creative with micro probes
> to dig it out. Is this a dumb idea?

You shouldn't put the same key in all the devices if there are a lot of
them that attackers can get their hands on. You want a unique key in
each device, in eeprom or flash. Many MCUs have special features to
protect such keys. You can generate the device keys by hashing the
serial number with a master secret: this is called "key diversification"
and there are various standardized algorithms for it like KDF2.

Why do you want to protect the sensor data though?

Brad Eckert

unread,
Jun 27, 2016, 10:10:26 PM6/27/16
to
On Monday, June 27, 2016 at 6:24:28 PM UTC-7, Paul Rubin wrote:
>
> Why do you want to protect the sensor data though?

There may be privacy requirements (HIPAA rules). I'll check out KDF2.

ste...@mpeforth.com

unread,
Jun 28, 2016, 6:53:34 AM6/28/16
to
> Does anyone know of a Forth-based web server that I can point my browser at and see stuff?
> A quick web search only turned up Bernd's nicely documented source code for a web server.
>
> I'm looking to use Forth to control the back end of a database. The front end is a widely
> distributed bunch of sensors. I want the sensors to upload their data to the server using
> HTTP Get and Put requests. The server may have to do some smart stuff like serve up
> license keys, but other than that it's probably straightforward.

All the Professional versions of VFX Forth include the PowerNet tools, including a
multi-threaded Web server with server-side scripting. Other servers are also provided.

Client tools are provided with the Professional versions of the MPE cross compilers.

Stephen

Brad Eckert

unread,
Jun 28, 2016, 2:58:25 PM6/28/16
to
>
> All the Professional versions of VFX Forth include the PowerNet tools, including a
> multi-threaded Web server with server-side scripting. Other servers are also provided.
>
> Client tools are provided with the Professional versions of the MPE cross compilers.
>
> Stephen

Hmmm. If funding materializes (which isn't looking too bad right now) there could be consulting work in MPE's future.

endlessboo...@gmail.com

unread,
Jun 29, 2016, 1:21:17 AM6/29/16
to
any live sites with bernds server?

how would you compare it to say werc.cat-v.org ?

Julian Fondren

unread,
Jun 29, 2016, 2:16:44 AM6/29/16
to
werc is not a webserver. It is a bunch of CGI that relies on a
webserver. Most of its features you could check off the list after
about 5 minutes into a Forth reimplementation of it. The rest: a
markdown script, and whatever 'bridge' and 'diridir' are.

rc has a few times less overhead than gforth does, and bernd's
recommended configuration means that you pay the overhead for each
connection just like you would with CGI, but that's not enough data yet
to say that rc would be actually more performant, even for delivering a
static HTML site.

https://bitbucket.org/demonview/forth-httpd/ is a Forth webserver,
though not touched in six months, which I talk about here:

https://groups.google.com/d/msg/comp.lang.forth/FlH_prejyis/Y3qalhmAAgAJ

... I'm probably still serving an RPGMaker MV game with it from a VPS.
Like I said it hasn't been touched in a while.

If you're interested in that werc stuff, then you may as well set up a
Forth site with CGI. http://gavino.minimaltype.com/ is still an example
of that.


-- Julian

Bill Zimmerly

unread,
Jun 29, 2016, 8:35:41 AM6/29/16
to
> https://bitbucket.org/demonview/forth-httpd/ is a Forth webserver...

Very nice, Julian. Thank you for posting this.


endlessboo...@gmail.com

unread,
Jun 29, 2016, 11:26:59 AM6/29/16
to
swiftforth seems to not be free software

polymorph self

unread,
Sep 23, 2016, 11:56:05 PM9/23/16
to
On Wednesday, June 29, 2016 at 2:16:44 AM UTC-4, Julian Fondren wrote:
So this is encouraging, it seems there is no problem using forth for dynamic web apps.
0 new messages