REST API + Webserver on embedded SoC running Linux [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I'm developing an embedded platform and need to provide mechanisms to control and maintain the platform (file upload/download/delete and triggering various actions).
I need to be able to use those functions from a program running on a host machine and also via a simple website hosted on the platform itself.
I've never done this before and am wondering the best way to proceed, so looking for guidance as to what framework and system structure to use.
The platform is running Linux and all other services running on it are written in C/C++, so sticking to C++ seems like a good idea as it simplifies maintenance (no need to learn a new language, anyone in the team can use C++).
I do not want to consume too much CPU/RAM running frameworks, so a compiled language seems appropriate. I do not want to run Java for example.
I'm thinking to use lighttpd to host the website and Microsoft's cpprestsdk to implement the microservice in C++.
The benefit of cpprestsdk is that it's a C++ framework, implementing an HTTP server and with support for JSON. So it looks fairly straight-forward to use it to implement the micro-service.
The drawback of using lighttpd and cpprestsdk is that I have two HTTP servers running on the machine, which seems like a waste of resources.
Would I be better off using CGI with lighttpd to implement my micro-service?

Related

PythonAnywhere and Celery [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I am running a Django app on PythonAnywhere. Unfortunately, Celery is not supported (on PythonAnywhere). I would like to use another library like Celery that allows me to execute some process asynchronously (and, icing on the cake, which would also support task scheduling).
Have someone found a solution that is supported by PythonAnywhere?
Could you recommend a user-friendly library just for executing some processes asynchronously?
If you're using Django the easiest way is to setup an endpoint and calling it periodically using a webhook.
There are a lot of websites that let you set a web process that makes an HTTP call to your endpoint. Just to mention one: https://www.easycron.com.
Have in mind that this might not be the most secure and safe way (allways use HTTPS and define an authentication method to avoid unwanted executions from unwanted calls to your endpoint), but to use it depends on the need of having that feature and the effort of building it.
In Django, the job to be done will be defined in views.py.
Another choice, if you can run more than one process in PythonAnywhere, is to build another python script running apscheduler.
Check this example code.

Good tools for writing rest api technical especification [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
What are good tools for writing rest api technical especification and documentation? I need to specify urls, routes, endpoints.
Another approach would be to automatically generate an API documentation reverse engineering its code. It's a C# webservice.
I see three main languages to do that. You can then generate documentations from this using additional tools around these languages.
Swagger is a very popular and active language for Web API based on the JSON format.
RAML is based on the YAML format.
API Blueprint is based on Markdown. This makes it very easy to read.
Another tool called Slate is documentation-oriented. It allows to generate beautiful documentation with sample calls in different programming languages.
You can notice that the tool Restlet Studio allows you to define the structure of your RESTful service online and get then corresponding Swagger or RAML structure. You can even generate documentations (or client kits, server skeletons) based on these formats.
Hope it answers your question!
Thierry

C++ Web Framework w/ Embedded Server? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I have been looking for a C++ Web Framework that would allow me to build a GUI Control Panel directly into a .dll plugin. In the past I have used Nancy Framework for .NET Projects which was exceptional (was my first time with this type of framework). I have found some good candidates based off of other Stack Overflow questions, however I am having trouble figuring out which, if any, have embedded web servers.
C++ Server Pages - This Looked Exceptional, but runs off of IIS or Apache.
CppCMS - Constantly recommended, but does it have an embedded server?
TreeFrog - Also recommended, but seems to have very broken documentation?
Which one of these would be recommended for a completely embedded solution? Ease of use would also be a huge plus, but I am willing to take the time to get it working provided it does what is needed. Thanks!
cppcms has an embedded server and is very well supported in embedded solutions. The documentation is complete and the support is very good, so perchance the documentation is not enough, the developer is certain to help you through your problems.
Don't forget about Wt. It also comes with a built-in web server.
Both CppCMS and TreeFrog have a built-in web server.
Did you have a look at ffead-cpp, it has an embedded web server, apache module, host of features and can run on Windows-Cygwin/BSD/Linux/Solaris

Recommended Web Service Architecture Books/Sites? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I'm in the position where I may be creating a new web service from scratch - without much pre-existing infrastructure to have to contend with. What resources are there that talk about the architectural aspects of deploying a web service? [Clarification: I'm not talking about an Enterprise SOA orientation here - rather setting up one family of services for the public.]
A first list of topics that I'd like to see covered are:
SOAP vs. REST
JSON vs. XML
Relational Database Backed vs. SimpleDB backed vs. ?
Scaling
Availability
Models for restricting access
Models for throttling access
What would you recommend?
I would recommend Restful Web Services. It's weel written, very complete and vendor agnostic. Also it has a fairly good coverage of both REST (with comparison to SOAP/WS-*), HTTP scaling, resource formats (JSON, XHTML, Atom, XML), security and service modeling.
If you have any specific scaling needs, then you might also want to read Building Scalable Web Sites. It will teach you everything worth knowing about etags, proxies, caching, edge computing and so forth. However if you are just starting out, then the Rest book I mentioned earlier will properly cover most people needs.
If you decide to use Microsoft technology (WCF) then you could check out the Microsoft Patterns and Practices group's online library of guidance.
They have a library located here as part of MSDN which deals with Web Service security, Enterprise Buses (obviously not applicable to you scenario) and PAG's own Web Service Software Factory.
Their main page is located here.
Otherwise, assuming you choose WCF it might be worth checking out further reading such as Juval Lowy's book on WCF, although I fear it may cover the implementation more than the theory and design facets.
Do you know roughly what technology platform you'll be working from?

OpenSource Instant Messaging APIs [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I want to create my own IM and I'm searching an open-source IM APIs. What do you think is the best open-source IM APIs. And what good front end to use?
Thanks.
If you are looking into making a client, check out libpurple. This is what pidgin and many other IM clients use to access multiple IM networks.
http://developer.pidgin.im/wiki/WhatIsLibpurple
If you are just worried about one IM network, the easiest one to work with would be Jabber because it is an open sourced protocol
http://www.jabber.org/
XMPP... lots of documentation, libraries and so on. http://xmpp.org
Just to be comprehensive, telepathy is a rather good competitor to libpurple. It's secure, modular and robust.
You can use QXmpp. It is a free (LGPL) XMPP client library written in C++ and Qt. It's light and simple to use.
Project page: http://code.google.com/p/qxmpp
If you're interested in the OSCAR protocol (AIM), check out Open AIM. They have documentation on custom clients for C++/C#/Java as well as how to access Web AIM.
If you need server side to support IM, use OpenSIPS. For client side, pidgin and libPurple.
You can use Kik API to build your instant messaging mobile apps on top of Kik Messenger. This API lets your app to reliably transfer and store rich content and files between different mobile users using Kik's own transport and infrastructure. It is available on Android and iPhone and, in simple scenarios, can be integrated into your app with about 5 lines of code. There is more info here: http://www.kik.com/dev
Disclaimer: I'm one of the developers behind Kik API :)