1. Re[4]: Euphoria CGI Success
- Posted by akusaya at gmx.net Feb 14, 2006
- 526 views
R> If EDB is easily corrupted, why have I not had any confirmed reports of R> corruption? I know that a lot of people are using it. I have databases R> that are years old and are updated every day, no problem. R> database.e has been very stable since it was created a few years ago. R> I don't know of any bugs that would cause corruption. The only R> temporary "corruption" that has been reported has been due to things like R> copying a database from Windows to Linux in "text" mode. Have you ever tried to open an EDB file with 50 process (no threads on Eu, yet!) simultaneously and write it? R> Have you benchmarked PHP against Euphoria? R> It's 140x slower than the Euphoria interpreter on sieve. R> 517x slower than the Euphoria to C translator. Yes I know Eu is very fast compared to PHP. However that is not what we need for websites. Moreover, who wants to use PHP for doing sieve? If sieve were really needed, one could use C and call the sieve function from Eu or PHP and that will be faster. One more thing is, how if 100 users request the same page at one time period (which is typical for a website). Wouldn't there be 100 exu processes running simultaneously? How about the startup time? OK, I tested the exu runtime from my webhosting server. date>tgl; for((i=0;i<100;i++)); do echo a|./ex examliat.ex ; done; date>>tgl cat tgl output: Tue Feb 14 14:28:25 GMT 2006 Tue Feb 14 14:28:29 GMT 2006 It needs 4 seconds to run. It is Eu 2.4. I havent tried Eu 2.5. Hope it is not too bad. Couldn't you just say that Eu is not really suited for serving webpages? (no offense)
2. Re: Re[4]: Euphoria CGI Success
- Posted by Vincent <darkvincentdude at yahoo.com> Feb 14, 2006
- 485 views
akusaya wrote: > > R> If EDB is easily corrupted, why have I not had any confirmed reports of > R> corruption? I know that a lot of people are using it. I have databases > R> that are years old and are updated every day, no problem. > R> database.e has been very stable since it was created a few years ago. > R> I don't know of any bugs that would cause corruption. The only > R> temporary "corruption" that has been reported has been due to things like > R> copying a database from Windows to Linux in "text" mode. > > Have you ever tried to open an EDB file with 50 process > (no threads on Eu, yet!) simultaneously and write it? Yes this is a problem. > R> Have you benchmarked PHP against Euphoria? > R> It's 140x slower than the Euphoria interpreter on sieve. > R> 517x slower than the Euphoria to C translator. > > Yes I know Eu is very fast compared to PHP. However that is not what > we need for websites. Moreover, who wants to use PHP for doing sieve? > If sieve were really needed, one could use C and call the sieve > function from Eu or PHP and that will be faster. Yes. Euphoria is much faster than PHP across the board. I don't know why Robert compares Eu to PHP using Sieve, but we'll get a better idea as to exactly how fast Euphoria is in comparison to other languages once Jason finishes his language shootout benchmarks and tests them. > One more thing is, how if 100 users request the same page at one time > period (which is typical for a website). Wouldn't there be 100 exu > processes running simultaneously? How about the startup time? > > OK, I tested the exu runtime from my webhosting server. > > date>tgl; for((i=0;i<100;i++)); do echo a|./ex examliat.ex ; done; date>>tgl > cat tgl > > output: > Tue Feb 14 14:28:25 GMT 2006 > Tue Feb 14 14:28:29 GMT 2006 > > It needs 4 seconds to run. It is Eu 2.4. I havent tried Eu 2.5. Hope > it is not too bad. Get Euphoria 2.5 and try running it with 10,000 requests to view the page at the same time. That is a typical high traffic page. Then perhaps after that, try 10,000,000 requests at the same time. That is typical for sites like Yahoo, MSN, Google, etc. > Couldn't you just say that Eu is not really suited for serving > webpages? (no offense) Euphoria is fine for CGI. It isn't as good as Perl or PHP, but that is mostly because of the lack of complete CGI support libraries. Hopefully that will change with the ESL project. Regards, Vincent
3. Re: Re[4]: Euphoria CGI Success
- Posted by Jason Gade <jaygade at yahoo.com> Feb 14, 2006
- 500 views
Vincent wrote: > > akusaya wrote: > > <snip> > > Yes I know Eu is very fast compared to PHP. However that is not what > > we need for websites. Moreover, who wants to use PHP for doing sieve? > > If sieve were really needed, one could use C and call the sieve > > function from Eu or PHP and that will be faster. > > Yes. Euphoria is much faster than PHP across the board. I don't know why > Robert > compares Eu to PHP using Sieve, but we'll get a better idea as to exactly how > fast Euphoria is in comparison to other languages once Jason finishes his > language > shootout benchmarks and tests them. Yeah, that's on my to-do list. I'm kind of working on ESL right now, though (see below). I'll probably bounce around between projects like that but it is better than not coding at all... > > > One more thing is, how if 100 users request the same page at one time > > period (which is typical for a website). Wouldn't there be 100 exu > > processes running simultaneously? How about the startup time? > > > > OK, I tested the exu runtime from my webhosting server. > > > > date>tgl; for((i=0;i<100;i++)); do echo a|./ex examliat.ex ; done; > > date>>tgl > > cat tgl > > > > output: > > Tue Feb 14 14:28:25 GMT 2006 > > Tue Feb 14 14:28:29 GMT 2006 > > > > It needs 4 seconds to run. It is Eu 2.4. I havent tried Eu 2.5. Hope > > it is not too bad. > > Get Euphoria 2.5 and try running it with 10,000 requests to view the page at > the same time. That is a typical high traffic page. Then perhaps after that, > try 10,000,000 requests at the same time. That is typical for sites like > Yahoo, > MSN, Google, etc. It really comes down to the proper tool for the job. PHP was designed for the web, and I think Google uses a lot of Python. Plus those companies have massive clusters and server farms with load balancing and all that kind of stuff that is way above *my* head. But then again, *most* web/networking stuff is way above my head. > > Couldn't you just say that Eu is not really suited for serving > > webpages? (no offense) > > Euphoria is fine for CGI. It isn't as good as Perl or PHP, but that is mostly > because of the lack of complete CGI support libraries. Hopefully that will > change > with the ESL project. [Switch topic] ESL project. Yeah. I'm kind of working on stuff, basically filesys.e right now and maybe seqops.e (sequence operations) in the near future. I don't think ESL has any specifications for CGI-type stuff and I certainly don't know anything about it. So, I don't know. If it wasn't for Jeremy Peterson I think the ESL project would be about dead. I'm taking his code as a basic blueprint and re-creating it to fit my own ideas. Hopefully the rest of the team will accept my code once I release it, or else I'll just release it on its own. -- "Any programming problem can be solved by adding a level of indirection." --anonymous "Any performance problem can be solved by removing a level of indirection." --M. Haertel j.
4. Re: Re[4]: Euphoria CGI Success
- Posted by Robert Craig <rds at RapidEuphoria.com> Feb 14, 2006
- 523 views
akusaya wrote: > R> If EDB is easily corrupted, why have I not had any confirmed reports of > R> corruption? I know that a lot of people are using it. I have databases > R> that are years old and are updated every day, no problem. > R> database.e has been very stable since it was created a few years ago. > R> I don't know of any bugs that would cause corruption. The only > R> temporary "corruption" that has been reported has been due to things like > R> copying a database from Windows to Linux in "text" mode. > > Have you ever tried to open an EDB file with 50 process > (no threads on Eu, yet!) simultaneously and write it? I hope you used DB_LOCK_SHARED and DB_LOCK_EXCLUSIVE when you opened the database, like you are supposed to do, otherwise you are eventually going to get corruption. > R> Have you benchmarked PHP against Euphoria? > R> It's 140x slower than the Euphoria interpreter on sieve. > R> 517x slower than the Euphoria to C translator. > > Yes I know Eu is very fast compared to PHP. However that is not what > we need for websites. Moreover, who wants to use PHP for doing sieve? > If sieve were really needed, one could use C and call the sieve > function from Eu or PHP and that will be faster. > > One more thing is, how if 100 users request the same page at one time > period (which is typical for a website). The RDS site occasionally has 2 or 3 users requesting the same page at the same time. Most pages are just simple HTML that's served directly by the Web server software, without Euphoria being involved. By looking at debug log files, I sometimes see 2 or 3 people running esearch.exu at the same time, but that's rare. Usually it's just one at a time. So it depends how you define "typical", but 100 sounds like a very large commercial site. > Wouldn't there be 100 exu > processes running simultaneously? How about the startup time? Yes there would be, but they would share the same code pages in memory, at least with Linux/FreeBSD. i.e. one copy of the interpreter code (or translator runtime). With the new multitasking, you might be able to use non-blocking I/O and cooperative multitasking to have a single program handling 100 requests. > OK, I tested the exu runtime from my webhosting server. > > date>tgl; for((i=0;i<100;i++)); do echo a|./ex examliat.ex ; done; date>>tgl > cat tgl > > output: > Tue Feb 14 14:28:25 GMT 2006 > Tue Feb 14 14:28:29 GMT 2006 > > It needs 4 seconds to run. It is Eu 2.4. I havent tried Eu 2.5. Hope > it is not too bad. So that's 0.04 seconds start-up time. You should try a translated/compiled version of the Euphoria program. No loading of the interpeter or parsing. PHP always runs an interpreter and parses. > Couldn't you just say that Eu is not really suited for serving > webpages? (no offense) I'm sure PHP has some convenient features for CGI that Euphoria doesn't have, but Euphoria has been fine for everything I've wanted to do, whereas PHP would have been a dismal failure (by itself) at searching 100Mb of archived messages. It would also be pretty useless at storing/retrieving general Euphoria data, like I like to do. By the way, EUforum is run by a Euphoria program. It reads and writes an EDS database with every message posted. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
5. Re: Re[4]: Euphoria CGI Success
- Posted by Julio C. Galaret Viera <galaret at adinet.com.uy> Feb 14, 2006
- 490 views
I think Euphoria isn't as good as PHP or Perl for CGI related tasks since, as pointed out, these were developed for the web. At least in theory, I can't understand why Euphoria can't be as good as (or even better than) PHP and Perl given the proper libraries are developed. In relation with many processes running at the same time, I asked one or two months ago if someone had used FASTCGI. Receiving no response I assumed no one was using it. This resolves the problem of many processes open at the same time. I think it would be a good idea to compile Euphoria with FASTCGI for those who are developing for the web. Please read: http://www.fastcgi.com/devkit/doc/fastcgi-whitepaper/fastcgi.htm JG
6. Re[4]: Euphoria CGI Success
- Posted by akusaya at gmx.net Feb 14, 2006
- 491 views
R> http://members.aol.com/chriscrylex/EUSQLite/eusql.html R> It works great. Yes, it's great. How about multi-user? >> - form processing (not just post and get but also >> file uploads) R> If you don't know how to do this, know this, it's R> easy. Take a few minutes to learn about miltipart R> forms and then 20 minutes to add the function to you R> cgi lib. And another few days for finding and fixing bugs? (esp. with the multipart form) R> An entities function should take no more than 5 or 10 R> min to write. Yes, correct. And everyone can make it. And there will be lots of versions. And still more. - Cookies - Session handling - Encryption (don't store users password in db in raw form) - modifying header - getting remote file - sending mail (yes that is too much for average use) Isn't it now, when people move from executables to web applications, we should have something like WebLib that is as powerful and as widely used as Win32Lib? :D :D :D <- just a suggestion, hope someone can start it and many people support him/her
7. Re: Re[4]: Euphoria CGI Success
- Posted by Ron Weidner <xecronix at yahoo.com> Feb 14, 2006
- 510 views
- Last edited Feb 15, 2006
> > Yes, [eusqlite] it's great. How about multi-user? > Multi user wasn't an original "request", you just said you didn't like EDS. However, multi-user is very easy to simulate via your RDMS interface. > >> - form processing (not just post and get but also > >> file uploads) > > R> If you don't know how to do this, know this, it's > R> easy. Take a few minutes to learn about > R> multipart forms and then 20 minutes to add the > R> function to your cgi lib. > > And another few days for finding and fixing bugs? > (esp. with the multipart form) > If you takes you a few days to debug fine. But if you want to decrease that time, try porting a Pascal or C CGI lib that has already been tested. You are only trying to add one function to an _already_ existing CGI lib. This is a simple and quick task, especially if you cheat. :) > R> An entities function should take no more than 5 > R> or 10 min to write. > > Yes, correct. And everyone can make it. And there > will be lots of versions. > We have all heard of sourceforge. As of 5 minutes ago, there were exactly 11 Euphoria projects hosted there. 4 of them were never really that active. Some of them have never had a release. That is pitiful in my opinion. Does this fact indicate that the Eu community has never worried about "Lots of versions" before? You decide. But if you decide this is a problem, you could start to rectify the situation by hosting your next project somewhere like sourceforge. The archive is a great idea, please don't get me wrong about this. The only problem, in my opinion, is that it really doesn't foster community projects. This can lead to projects going stale way too early. ** Rob ** I believe this might be an opportunity for improvement here. Have you considered adding a mini "sourceforge like" project management to http://rapideuphoria.com? Say one that _only_ hosts EU projects? Even if it had less features than SF it could still be useful... Just a thought. > And still more. > - Cookies Already covered in my CGI tutorial. (With source code) > - Session handling It's not that hard to do. This could also be simulated in a database. > - Encryption (don't store users password > in db in raw form) http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=encryption or http://www.rapideuphoria.com/blowfish.zip > - modifying header Already covered in my CGI tutorial (With source code) > - getting remote file Here is a Linux example... What is needed is a cross-platform sockets lib. I would consider porting http://www.rapideuphoria.com/socketlib.zip to use winsock if I had a windows machine. But I don't and won't. http://www.rapideuphoria.com/webutils.zip > - sending mail again, done... http://www.rapideuphoria.com/smtp-lib.zip > > (yes that is too much for average use) > > Isn't it now, when people move from executables to > web applications, we should have something like > WebLib that is as powerful and as widely used as > Win32Lib? :D :D :D <- just a suggestion, hope someone > can start it and many people support him/her > I see in the archives you have contributed some code. So, I'll assume that you are a motivatied programmer and I'll offer you a challenge. I have a fairly good start on such a library. I'll start a new project for it on sourceforge today. (The process takes several days to complete). When I get the ok from sourceforge, I'll post the information about the project here. Then I'll match you function for function for any useful addition you write. Do you want to participate? If you do, in no time at all you will have that dream lib you crave. C'mon! It will be fun! :) -- Ronald Weidner http://www.techport80.com PHP Software developer for hire.
8. Re: Re[4]: Euphoria CGI Success
- Posted by Robert Craig <rds at RapidEuphoria.com> Feb 15, 2006
- 501 views
Ron Weidner wrote: > ** Rob ** > I believe this might be an opportunity for improvement > here. Have you considered adding a mini "sourceforge > like" project management to rapideuphoria.com? > Say one that _only_ hosts EU projects? Even if it had > less features than SF it could still be useful... > Just a thought. It's an interesting idea. Thanks. Though I really have to give first priority to improving Euphoria itself. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com
9. Re: Re[4]: Euphoria CGI Success
- Posted by Ron Weidner <xecronix at yahoo.com> Feb 15, 2006
- 529 views
> I see in the archives you have contributed some > code. So, I'll assume that you are a motivatied > programmer and I'll offer you a challenge. I have a > fairly good start on such a library. I'll start a > new project for it on sourceforge today. (The process > takes several days to complete). When I get the ok > from sourceforge, I'll post the information about the > project here. Then I'll match you function for > function for any useful addition you write. Do you > want to participate? If you do, in no time at all > you will have that dream lib you crave. C'mon! It > will be> fun! :) > Wow! That was the fastest I've ever seen Sourceforge approve a new project. In any case, I took the code from my Euphoira CGI tutorial, made a package for it, and released LGPL on SF. http://sourceforge.net/projects/eucgi The code contained in the package doesn't actually fit the description of the project. The description is more like a goal in this case. In any case, let me know when you want to start or better yet, e-mail some code to add. :) -- Ronald Weidner http://www.techport80.com PHP Software developer for hire.