flat assembler
Message board for the users of flat assembler.

Index > Main > Simple fast cgi web application in Assembly

Author
Thread Post new topic Reply to topic
jorido



Joined: 23 Jan 2017
Posts: 53
jorido 26 Aug 2017, 01:45
I want an example of a simple fast cgi web app in Assembly. I'm aware about the forum written in assembly but it's quite complex, uses macroses, many pages and templates, etc. Whereas I want a simple, single html page one: nginx + assembly + fastcgi + html page/template in a file.

How can I do that?

I've seen some examples in C and C++ but I haven't been able to adopt them for Assembly. Will I have to call fast cgi library functions written in C/C++ from Assembly?
Post 26 Aug 2017, 01:45
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 671
vivik 27 Aug 2017, 09:24
Are you fine with incompetent responses, or you rather wait for somebody who knows this?

You probably shouldn't do that in assembly. It's just a text generation, it shouldn't be that cpu heavy.

Look at golang, webpages and parallelization are it's specializations. I don't guarantee that learning it worths it.

Study C programs, and study their assembler output. Then try to replace C with assembly function by function. You will have to call the same dll in assembly as you call in C, or some of them.

Post examples in C you found.
Post 27 Aug 2017, 09:24
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3499
Location: Bulgaria
JohnFound 28 Aug 2017, 19:22
jorido wrote:
I want an example of a simple fast cgi web app in Assembly. I'm aware about the forum written in assembly but it's quite complex, uses macroses, many pages and templates, etc.


The FastCGI protocol is not easy at all. AFAIK, the C programs uses some library that make the script look like simple CGI script.

You are considering AsmBB complex, but the implementation of FastCGI protocol is only one single file: "fcgi.asm": https://asm32.info/fossil/repo/asmbb/artifact/68f9999f29632086

You can use it alone with your own "business logic". Also, it can be cleaned from some code, you don't need - for example, the logging procedure LogEvent that is dependent on SQLite but is not necessary for the protocol itself.

_________________
Tox ID: 48C0321ADDB2FE5F644BB5E3D58B0D58C35E5BCBC81D7CD333633FEDF1047914A534256478D9
Post 28 Aug 2017, 19:22
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
jorido



Joined: 23 Jan 2017
Posts: 53
jorido 31 Aug 2017, 13:31
thx
Post 31 Aug 2017, 13:31
View user's profile Send private message Reply with quote
jorido



Joined: 23 Jan 2017
Posts: 53
jorido 31 Aug 2017, 13:38
JohnFound, did you create "fcgi.asm" yourself? if yes, is there the standard, official one?
Post 31 Aug 2017, 13:38
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3499
Location: Bulgaria
JohnFound 31 Aug 2017, 19:48
jorido wrote:
JohnFound, did you create "fcgi.asm" yourself? if yes, is there the standard, official one?


Yes, I created "fcgi.asm" myself. It is an implementation of the server part of the FastCGI protocol.

RWASA web server implements the client side of the standard and there is no (AFAIK) other assembly language code available related to the FastCGI protocol.

_________________
Tox ID: 48C0321ADDB2FE5F644BB5E3D58B0D58C35E5BCBC81D7CD333633FEDF1047914A534256478D9
Post 31 Aug 2017, 19:48
View user's profile Send private message Visit poster's website ICQ Number 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


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.