View previous topic :: View next topic |
Author |
Message |
lolAnonymous Expert Cheater Reputation: 1
Joined: 19 Jul 2015 Posts: 154
|
Posted: Sat Mar 04, 2017 10:48 am Post subject: Web request in lua |
|
|
Hey guys,
I wanted to ask you how is Lua in sending web requests
in PHP it's curl... I want to create a desktop application which will send web request to my website C# is too slow in sending web req... I wanted to ask u How is Lua... ???any other suggestions??
Thanks In Advance
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25295 Location: The netherlands
|
Posted: Sat Mar 04, 2017 11:15 am Post subject: |
|
|
lua on it's own can't, but luasocket or other extention can add it.
also in ce you can use getInternet to get an object for web requests (get, post)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
lolAnonymous Expert Cheater Reputation: 1
Joined: 19 Jul 2015 Posts: 154
|
Posted: Sat Mar 04, 2017 11:22 am Post subject: |
|
|
Hey Darkbyte thanks for replying...
I am new to Lua so if u can give an example or give me a link where it is defined..
and actually I wanted to ask Is it fast like php or slow like C# ?
Thanks In Advance
|
|
Back to top |
|
|
atom0s Moderator Reputation: 198
Joined: 25 Jan 2006 Posts: 8517 Location: 127.0.0.1
|
|
Back to top |
|
|
lolAnonymous Expert Cheater Reputation: 1
Joined: 19 Jul 2015 Posts: 154
|
Posted: Sun Mar 05, 2017 5:10 am Post subject: |
|
|
Hey Atom0s,
Thanks for replying. I didn't mean't C# is slow and php is fast :3 I mean't it's slow in sending web request and php is fast in it (I think because it's a server side language )...
My point is : How is Lua in sending web requests ? with Lua I mean its extension etc... with "How" I mean is it fast?
Thanks In Advance
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25295 Location: The netherlands
|
Posted: Sun Mar 05, 2017 5:32 am Post subject: |
|
|
the bottleneck is your connection speed, not the code
if c# specifically is slow it's more because of a bad implementation/usage
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
atom0s Moderator Reputation: 198
Joined: 25 Jan 2006 Posts: 8517 Location: 127.0.0.1
|
Posted: Sun Mar 05, 2017 5:24 pm Post subject: |
|
|
lolAnonymous wrote: | Hey Atom0s,
Thanks for replying. I didn't mean't C# is slow and php is fast :3 I mean't it's slow in sending web request and php is fast in it (I think because it's a server side language )...
My point is : How is Lua in sending web requests ? with Lua I mean its extension etc... with "How" I mean is it fast?
Thanks In Advance |
You are comparing things incorrectly based on how you are wording this.
C# can run on a server just like PHP does and do the exact same things as PHP in various ways, (ASP.NET, WCF, etc.) If you put C# on a server, it will out-perform PHP based on benchmarks already shown. Anyway, that's not really the point of this topic just a side discussion from how you worded things.
The implementation is a matter of who coded it, how well optimized it is, how the language running it handles the given code and your connection speed.
You can read the basics of Luasocket and how its implemented here:
http://w3.impa.br/~diego/software/luasocket/introduction.html
You can review the code here:
https://github.com/diegonehab/luasocket
Luasocket is written in C and is very lightweight wrappers around the 'socket' API. Therefore there is very little overhead inside of the library itself. The only real overhead you will have is from the Lua interpreter going back and forth from the script byte code to the libraries interacting with what you are doing.
Lua's performance is already benchmarked and proven in a ton of cases and is endorsed by major companies such as Blizzard in their triple-A games such as WoW.
The main slowdowns / performance issues you are going to face are in how you code the usage of the socket, your connection speed, and the server handling your requests.
_________________
- Retired. |
|
Back to top |
|
|
lolAnonymous Expert Cheater Reputation: 1
Joined: 19 Jul 2015 Posts: 154
|
Posted: Sun Mar 05, 2017 11:29 pm Post subject: |
|
|
Thanks again for replying atom0s and the for the links
Btw I work in Asp.net too and I will still say that php is much faster than Asp.net ... Php is a very lightweight language and C# is not... I learn't both languages and chose Php for my web application...
In the end, it doesn't matter... Great software and websites are written by great programmers, not the language. You can write equally bad software in PHP or asp.net. Or equally good software...
Thanks Again
|
|
Back to top |
|
|
|