Forums

Add Zato as a web framework

Please add Zato as a web framework. It is an integration framework that can be found at zato.io

Hi pruggera,

Unfortunately this would be a very complicated thing to make available to all users. Our web frameworks are all currently WSGI applications. Zato is a combination of various other services (including Redis and HAProxy) rather than a simple WSGI application. Adding it would require a drastic re-architecture of PythonAnywhere. It could be something that we support in the future but it would be some time away.

Hello friends,

I'm the author of Zato and just wanted to say that should you ever need any help with porting it to PythonAnywhere's infrastructure I'd be very happy to help you out in any way I can. My email is dsuch at zato.io

Zato indeed features and supports a lot of technologies but as far as WSGI and HTTP go, it is based on gevent/gunicorn and to some extent can be treated as a plain WSGI deamon around which other protocols and data access methods have been added. But cluster's core servers, the place where main loops are spinning, are usually in gevent/gunicorn/WSGI (I'm saying 'usually' because there's more to it, but this is the core).

So it's certainly doable and should you ever need a hand, please just drop me an email! :-)

Hi dsuch,

Thanks for the letting us know! It looks like a really interesting framework. At the moment all web apps are served by uWSGI workers. Can Zato simply provide a WSGI application object? Would this result in anything useful?

Hello hansel,

please have a look at on_wsgi_request which is the WSGI application object

https://github.com/zatosource/zato/blob/master/code/zato-server/src/zato/server/base/parallel.py#L94

but a bit tougher question is indeed how much one can do with it.

There would be no clustering, AMQP, FTP, ZeroMQ, Redis, JMS WebSphere MQ, statistics, load-balancing, fail-over, management console, command line interface and well, many features would be missing.

Zato is really much more than a framework, it's a complete server-side environment that goes well beyond WSGI so a lot depends on whether you'd allow for

  1. Redis (I understand it's not the case right now)
  2. using gevent
  3. starting own threads
  4. starting own subprocesses

There's a lot of background greenlets/threads/processes possibly running within a Zato cluster and it's kind of difficult to create everything as a simple WSGI callable (I didn't know you were using uWSGI, I thought any WSGI-based app would do, not that you needed a WSGI app object).

Another thing is how to provide, for instance, load-balacing and HA. Zato has it built in and it's through a component started separately from servers. Assuming it's not added, how will PythonAnywhere provide it? Do you offer load-balacing with HAProxy too? (Sorry, I've never used your services)

Assuming you could possibly add support for these 4 things (at least 1-3) then I think that after some refactoring on my part this could result in a nice, yet limited, development environment for HTTP only.

On the other hand, creating a new Zato quickstart environment like in this article takes some 6-10 seconds from command line

http://www.infoq.com/articles/zato

$ zato quickstart create /opt/qs-1 postgresql localhost 5432 zato1 zato1 localhost 6379

ODB database password (will not be echoed):
Enter the odb_password again (will not be echoed):

Key/value database password (will not be echoed):
Enter the kvdb_password again (will not be echoed):

[1/8] Certificate authority created
[2/8] ODB schema created
[3/8] ODB initial data created
[4/8] server1 created
[5/8] server2 created
[6/8] Load-balancer created
Superuser created successfully.
[7/8] Web admin created
[8/8] Management scripts created
Quickstart cluster quickstart-309837 created
Web admin user:[admin], password:[hita-yabe-yenb-ounm]
Start the cluster by issuing the /opt/qs-1/zato-qs-start.sh command
Visit https://zato.io/support for more information and support options
$

CLI allows to run all commands in no-questions-asked mode with parameters read from file

https://zato.io/docs/admin/cli/from-config.html

so this is how creating new environments can be automated.

Well. Hm.. I guess the question is how much demand you will have and what sort of environments you'd like to create. Full-blown ones or limited to HTTP only? Would it be actually for production or mostly for development with disclaimers that many core features are missing.

I'm really happy you find it an interesting project but I'm afraid not much really will fit into a single WSGI callable. This could be still be usable to some extent but many useful parts would be left off.

What do you think, hansel?

Hmm... as you say. It's not something that we could easily incorporate. We do front end load balancing already and we need each users web applications to not care about the machine they are running on. Zato sounds like a great full stack application that just wouldn't fit into what we do right now. Though our future plans for the platform would make it viable.

Sure, I only meant to illustrate it how you, as in PythonAnywhere, can easily create new environments in an automated way. Users would need no access to CLI at all.

If you could think about supporting gevent and Redis, that would be a great way to start thinking about it all. But I understand this may take a while.

In any case, please contact me any time should you reach that point - I'd really like to make it as easy as possible for service providers to offer Zato among other packages.

Thanks!