flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > Projects and Ideas > FastCGI framework in assembly language.

Author
Thread Post new topic Reply to topic
JohnFound



Joined: 16 Jun 2003
Posts: 3415
Location: Bulgaria
FastCGI framework in assembly language.
I recently advanced in one my very old idea - to implement FastCGI in order to be able to produce high performance web sites in assembly language.

Now I have almost full implementation of FastCGI protocol in FASM/FreshLib.

In addition, I am intended to make a small and ultra fast web forum engine, using this framework, together with SQLite database engine.

The development is in very early stage. The source code is in the AsmBB source repository (fossil).

The compiled engine is active on the test site, but currently only returns some debug data. On the progress I will update the binaries there in order to test on external shared web hosting.

_________________
Tox ID: A48DEF727DF44C3B5C2E576B65021F1A45D8FA52E2F8E257F1CAE148BBADB162FDF7820BD1F9
Post 08 Mar 2016, 10:41
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3415
Location: Bulgaria
Now, the mixture of FastCGI + SQLite + some code works on http://board.asm32.info , showing the very first steps of the future forum engine.

But the information is read from SQLite database and the processing is with multi-threading FastCGI protocol.

With 1MB RAM usage it handles 50K requests from 10 simultaneous connections.
Post 08 Mar 2016, 22:34
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3415
Location: Bulgaria
Recently, in order to test the code better, I imported some test database (actually from the archives of astronomy.stackexchange.com) and for some time now you can read about the astronomy on:

http://board.asm32.info

Content delivered by assembly language! Very Happy
Post 12 Mar 2016, 09:28
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3415
Location: Bulgaria
The project AsmBB is virtually finished and able to serve real use as a high performance - low resources forum engine. It uses FastCGI for better server performance and SQLite for very reliable storage.

If someone needs such a forum engine, feel free to use it. I will make precompiled packages later next week.

The working demo version is still on http://board.asm32.info for evaluation. The previous fake posts are deleted and it is free for registration.

Some of the posts are in bulgarian, but english is acceptable as well.
Post 02 Apr 2016, 14:28
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Enko



Joined: 03 Apr 2007
Posts: 657
Location: Mar del Plata
Very Cool Project!

Is there a reason to setup the thread names with underscore?
"threads/this_is_test_of_new_thread_post_42/"

As I understand, the search engines so far don't separate the words separated with underscore for I can't remember what issue. So the standard practice is to use dashes like so:
"threads/this-is-test-of-new-thread-post_42/"
That way the bots can identify "this is a new thread post_42"

https://support.google.com/webmasters/answer/76329?hl=en


Excellent work. Cool
Post 03 Apr 2016, 15:13
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3415
Location: Bulgaria

Enko wrote:
Is there a reason to setup the thread names with underscore?
"threads/this_is_test_of_new_thread_post_42/"



Well, not actually. I am not very good in SEO and web development. I will fix it then.

_________________
Tox ID: A48DEF727DF44C3B5C2E576B65021F1A45D8FA52E2F8E257F1CAE148BBADB162FDF7820BD1F9
Post 03 Apr 2016, 21:24
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Enko



Joined: 03 Apr 2007
Posts: 657
Location: Mar del Plata
As I work on this kind of sphere lately I still can't understand why node.js is getting more popular by the day. A javascript enviroment based on the v8 from google.
Database connections, client connection all runing on javascript Confused
By this rate, next OSes gonna be 90% javascript.

So it is very cool to see projects like this! Cool
Cheers!
Post 04 Apr 2016, 18:56
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3415
Location: Bulgaria
Thanks for the interest.
I learned a lot about FastCGI, HTTP and SMTP from this project.
Now I am polishing some parts and will release it as a binary package for fast and easy installation.
Post 04 Apr 2016, 20:20
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3415
Location: Bulgaria
Today I released AsmBB v1.0 with binary package for easier installation on the web server.

Download it from: asmbb.tag.gz - this link always point to the latest version of the package.

Unpack, edit the config file according to your web hosting settings, upload to the web server and you have working assembly written forum engine.

Read the file "install.txt" from the package for more detailed instructions.


Last edited by JohnFound on 09 Apr 2016, 08:46; edited 1 time in total
Post 07 Apr 2016, 20:11
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Enko



Joined: 03 Apr 2007
Posts: 657
Location: Mar del Plata
Awesome!

I have at home a a pc with ubunut and apache, so I guess I should be able to install it, never worked before with cgi.


As a working front-end web developer, I´m actually itching a little to get to the css this weekend. Gonna try to make the whole thing responsive so its mobile friendly.

I checked the source and how the templetes are used, they are very well organized.

You did an amazing organizing work there Wink
Post 08 Apr 2016, 20:52
View user's profile Send private message Reply with quote
Enko



Joined: 03 Apr 2007
Posts: 657
Location: Mar del Plata
I was able to install the board, I had to modify a little the .htaccess

Code:

Options Indexes FollowSymLinks Includes ExecCGI



Otherwise it would protest saying that the directory is forbidden.

After that, I was able to get to the setup screen, but when I tried to creat the admin user, nothing happened, and when I tried to setup the other options, it would at first protest about a "transaction within a transaction" or it would say that the database is readonly. I modified the permision of the folder to 777 but the message still would be the same.

I decided to do a clean install, so I deleted everything and set it up from the zip again.
This time, after setting up the admin user, it redirected me to localhost/login but the server crashed. After that it would always says "500 Internal Server Error..."

This is the log from apache:

Quote:

[Sat Apr 09 01:22:21.971361 2016] [fcgid:error] [pid 8746] mod_fcgid: process /var/www/html/engine(16783) exit(communication error), get signal 11, possible coredump generated


(Ubuntu 14.04.4 LTS)

Gonna try again tomorrow with a fresh head ^^

Cheers
Post 09 Apr 2016, 04:31
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3415
Location: Bulgaria
@Enko: These options seems strange for me. AsmBB takes (and needs) all control over the requests should not need these. Anyway, I am not very good in apache configuration.

About 500 error: Try downloading the package again from the above link. It has been updated because of a bug in the cookie handling routines. Also, in case of exception, now it generates a file "fault.txt" with the stack backtrace for easier debugging. If such file appears, please post its content.
Post 09 Apr 2016, 08:55
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Enko



Joined: 03 Apr 2007
Posts: 657
Location: Mar del Plata
Hi, now with fresh head firstly I reduced the options of the .httaccess file to the bare minimum required for asmbb to work on my apache instalation on ubunut:

Code:

Options  ExecCGI 



With the older version, the same error happened.

With the new updte it worked like a charm, the option ExecCGI was still required.

Thanks for the update ^^

Also I like that you have to copy/past the base64 encoded image for the avatar!

A little feedback:

When you click a tag the url goes:

Code:

http://127.0.0.1/list/?tag=tagname



Is it possible to make it:

Code:

http://127.0.0.1/tag/tagname



Like all the others url.

For the user profiles, the url goes like

Code:

http://127.0.0.1/userinfo/1



I'm guessing 1 is the ID from the sql database which is probably set to auto increment.
I don't have much knowledge on security, but as I understand it, autoincrement values for ID is not the best options in terms of security. I mean, if there is a user with id 1, there should be a 2,3,4... very easy to "still" the whole user database. As the nickname is already setup as unique, I don't see why not to use

Code:

http://127.0.0.1/userinfo/username






Great project! Keep it up Cool
Post 09 Apr 2016, 14:47
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3415
Location: Bulgaria
@Enko: It is great the update worked for you! As for the proposed changes, I also think about something similar and will implement it soon.
Post 09 Apr 2016, 15:15
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3415
Location: Bulgaria
Today I released v1.1 of AsmBB forum engine. The download link is the same: asmbb.tar.gz

The URL schema now is much better than before. In addition some extras has been implemented and the code cleaned, so now the engine is even smaller.

The speed is a little bit lower because of the more complex SQL requests, but is still excellent.
Post 13 Apr 2016, 17:31
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Eduardo



Joined: 18 Jan 2015
Posts: 23
COOL!
Post 23 Mar 2017, 23:58
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >

Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2016, Tomasz Grysztar.