Show HN: Poser – Posix SERvices C framework
zirias.github.io
zirias.github.io
This is a small and simple alternative (the only similarity is offering some event-based API) using nothing but POSIX. This allows to keep the code small and avoid conditional compilation (so far only used for the optional TLS support). You might want to use it when you want to write some "small" service for POSIX systems, and focus on your actual logic (e.g. your protocol implementation) instead of dealing with all the internals of handling sockets, name lookups, daemonizing, signals, threading where needed, and so on.
A bit more info also here: https://groups.google.com/g/comp.unix.programmer/c/qsxDODLNe...
Just looking at the Wikipedia page for this standard makes it really clear why it has never seen widespread adoption (and I, for one, am really happy it didn't).
The project OP is referring to instead adheres to a very small, very clear spec, and not in the sense of implementing it. Instead, the project seeks to provide a set of tools using this limited spec.
I have my own set of criticisms for the OP, but this just doesn't make any sense.
The idea of the "core" part of "poser" (the only one implemented so far) is to provide a framework (and toolkit) to easily implement your service targeted at hosting on POSIX platforms. Among other things, it does offer abstractions for socket communication of the STREAM type, as this is what many services will use for communication. At this low level, it is completely protocol agnostic. All that's offered is some convenience API to tell the connection what's expected to be received next: binary data (optionally of a specific size) or strings/text with any strategy to find the end of the message (offering an implementation finding typical "line endings" as this is what many text-based protocols use).
I might add more libraries to "poser" in the future, e.g. to offer HTTP functionality.
SOAP is one thing that certainly won't be added though. SOA is dead. IMHO, rightfully, it's just an over-complex mess. When you offer HTTP-based services nowadays, you typically use REST semantics (using the verbs offered by HTTP for the actions, working on resources identified by the URI). For the documents exchanged in a REST API, JSON is a popular format choice. I don't know whether I will implement anything supporting communications using HTTP/REST, but that might be an option one day.
If your goal is learning yourself, I guess you should really implement your stuff down on the system API level (using sockets and so on) ;)
If, OTOH, you want to get up some simple/small service quickly, I hope "poser" can help. I'm not sure the docs are already "good enough" (it's still a very young project ...) -- there's also a real example using it here: https://github.com/Zirias/tlsc/blob/master/src/bin/tlsc/tlsc...
Industry plant
Friends don't let friends push mongo
According to Douglas Harper's etymonline.com, "poser" meaning "one who practices an affected attitude" goes back to 1881, and was revived in teenager slang by 1983. "poseur" with the same meaning precedes "poser" by a little bit.