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

Better place for live discussion. #3

Open
raasumy opened this issue Jan 13, 2016 · 2 comments
Open

Better place for live discussion. #3

raasumy opened this issue Jan 13, 2016 · 2 comments
Labels

Comments

@raasumy
Copy link

raasumy commented Jan 13, 2016

I think it would be nice to have a place to chat about this nice project. As far as I understood issues here is for now the only option. I would suggest joining skype chat. Zwetan will be granted master rights of course.
Here is the link: https://join.skype.com/kq91RZPV6BxF

And couple of questions as far as I'm excited a lot about all this)
Why apache, how about nginx?
Are there any plans on implementing threading by means of abc processor?
What about using databases?

@zwetan
Copy link
Member

zwetan commented Jan 13, 2016

ok to chat about the project, not sure about Skype chat
but yeah it could be a temporary solution.

for the other questions

Why apache, how about nginx?

many reasons

  • apache support CGI, not nginx (only FCGI)
  • apache is more spread
  • redtamarin was ready for CGI, not FCGI
  • no way I'm building a website about AS3 not in AS3 ;)

Are there any plans on implementing threading by means of abc processor?

yes, on a side project spitfire
I spend quite some time working on socket server loop
it's not on the repository yet but I got one kind of threading
working with Workers

In short, you have the main worker which role is only to loop
and listen for new connections
as soon as a connection occurs it is redirected to a background worker
which then deal with a loop on his own sockets pool

  [main thread]
     |
  socket()  serverfd
     |
   bind()   0.0.0.0
     |
   listen() port=1234
     |
   select() 
     |
   selected (socket descriptor)
     |
     0. isReadable ?
        a. if selected == serverfd
           new connection
                  |
      ____________|______________
     /                           \
[background thread]         [background thread]
     |                            |
 select() loop                 select() loop
     |                            |
 selected (socket desc)      selected (socket desc)
     |                            |
     0. isReadable ?              0. isReadable ?
        a. recv( selected )          a. recv( selected )
           handle client data           handle client data
               |                            |
               do work                      do work

it's still at prototype phase but when we will have a FastCGI implementation
we will then be able to choose between different type of servers:
iterative server (single loop), concurrent server (workers), etc.

What about using databases?

redtamarin can use CouchDB now
either from CGI or command-line shell scripts etc.
simply because the implementation was HTTP-like
and it was the fastest DB I could have access to

Other databases like MySQL, SQLite, MongoDB, etc.
sure, but there it is a problem of "drivers" or the protocol
to connect to the DB

some implementations can be done with AS3
some others need native support

I would say for now CouchDB is good enough


A bit more comments

so yeah on one side it is cool to develop server-side in AS3
but on the other side it is also a pain because a lot of basic things are missing

for ex the httplib is a nice start but does not support HTTPS (yet)
so when/if you really have to use HTTPS you either need to implement
SSL/TLS in AS3 and that can take quite some time
or you can use a shortcut and use an AS3 wrapper around cURL

and it's not only a problem of dev taking the time to write the implementations
being one of the first user of redtamarin I also noticed other problems
one being the tooling (yep kind of ironic)

when I was splitting the as3lang repo into different libs: httplib, ansilib, etc.
I did a little test building a very simple command line tool as3hash

ok trying to keep this short, main problems are

  • it's hard to produce/test a redtamarin standalone executable
    main issue is the compilation and then being stuck with
    having to use "--" to pass arguments to this exe
  • it's hard to install/configure/setup redtamarin itself
    the redtamarin SDK structure is just not good
    you have to grab zip right and left, assemble them by hand
    really painful

and I say that knowing the tool like the back of my hand,
so I can imagine other dev being turned off quite easily

so I worked hard the last month or so and changes are coming

  • reviewed the whole production/compilation process
    hardware, setup, VM, etc.
  • POSIX everywhere
  • install based on .deb files
  • new projector that remove the need to use "--"
    but that can also embed vmargs in their headers
  • more documentation
  • redtamarin should now be easy to install
    but also easy to update

so yeah it is mainly tooling, but it should ease the pain on a lot of points
and more importantly update will happen more frequently

@zwetan
Copy link
Member

zwetan commented Mar 8, 2016

so for a better place I would advise
https://discuss.as3lang.org/

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

No branches or pull requests

2 participants