Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples? #1

Closed
inorton opened this issue Nov 30, 2016 · 10 comments
Closed

Examples? #1

inorton opened this issue Nov 30, 2016 · 10 comments

Comments

@inorton
Copy link

inorton commented Nov 30, 2016

Hi,

I think this might be useful for me, but can't really see how to use it. Could you provide some small examples?

Thanks

@dutradda
Copy link
Owner

Hello @inorton
I wrote a simple example in readme file.
As soon as possible I will wrote more examples and documentations for the package.

I use falcon-swagger in https://github.com/dutradda/myreco
In this project I use the SQLAlchemy/Redis capabilities of this package

@advance512
Copy link

Any update on this?

Your code seems useful and I'd like to use it and perhaps assist in development, but the documentation is non-existant..

@advance512
Copy link

Also, is this "replaced" by the following project?
https://github.com/dutradda/swaggerit

@dutradda
Copy link
Owner

dutradda commented Jan 9, 2017

hi @advance512,
As you saw, I will not develop for falcon-swagger anymore, I move the development to my new library swaggerit, but the lib is python 3.5+, because it uses async/await expressions and aioredis.

And I moved from falcon to aiohttp, the project now is asyncio based.

An asyncio benchmark exploration: http://klen.github.io/py-frameworks-bench/

@dutradda dutradda closed this as completed Jan 9, 2017
@dutradda
Copy link
Owner

dutradda commented Jan 9, 2017

moved to swaggerit isse: dutradda/swaggerit#2

@advance512
Copy link

Too bad. gevent has quite good performance. It is also a lot simpler to use and understand than async/await. It is well proven with many, many libraries that use Python's standard requests module (or any other IO module that is patched by gevent or curio), such as sqlalchemy or redis-py, and generally most new libraries you'll introduce just work "out of the box".

Many libraries don't currently support Python 3.x style asyncio asynchronous execution.

So, falcon-swagger had a definite use case, and I was quite happy to see the project and was planning on using it.

For now, I'll use connexion with Flask instead, the project I'm working on is a PoC anyways. I'll probably rewrite it in Go..

@dutradda
Copy link
Owner

dutradda commented Jan 12, 2017

@advance512, falcon-swagger/swaggerit have a lot a features, what feature you are looking for?

It has request validation and casting types according to the specification;
has an ORM with sqlalchemy basic operations insert/update/delete/get/get_many/get_all;
has an sqlalchemy/redis integration, the ideia of it is keep the database in memory, but the ACID was guaranteed by relational database. The falcon-swagger/swaggerit does all the synchronization;
has an ORM with redis only basic operations insert/update/delete/get/get_many/get_all;
has an interface for job submission, than you can do a get request to know the status/result of it.

All this features are tested, and I am using it on the organization that I work.

Depending what feature you want, I can do swaggerit more suitable for you, to use on falcon or non-asyncio based frameworks.

@advance512
Copy link

Hey, well, this seems great - but as I had no time I basically did most of what you did over Connexion, which is a great little framework.

Flask is a lot slower than Falcon, but I somehow doubt the HTTP framework will be the bottleneck rather than the DB, network IO the processing itself.

For future projects, I'd love to use swaggerit - but you need to have some good examples up, some documentation and perhaps even a tutorial to guide people through it. I guess it is a bit early, since the project is in alpha?

The Redis part sounds interesting. What did you base it on? A third party library?

@dutradda
Copy link
Owner

@advance512, according to this issue, spec-first/connexion#380, connexion will be framework-agnostic (like swaggerit) so I will migrate to connexion code base too.

what redis part are you talking about?
The ORM redis only feature has no relationships support, is just a wrapper around redis hash type.
But the SQLAlchemyRedis keep all the data in redis updated, with relationship support. It uses the relational database just to guarantee the ACID.
For redis connections I use aioredis (with hi-redis protocol).

@advance512
Copy link

I want to cache some entities, and some association tables (M-to-N + link status), which are accessed quite a bit and are (naturally) proving to be an early bottleneck.

I prefer not to develop my own code, for now, even though Redis is superbly simple.

Seems like SQLAlchemyRedis might be the way to go to be agile, will have a look. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants