Live data from Hacker News

Vapor: a type-safe web framework for Swift

github.com

21–30 of 76 posts

Re: Vapor: a type-safe web framework for Swift

#21
How is this "insanely fast"?

Running an example main with the route '/' mapped to return "Hello World"

   ab -n 10000 http://127.0.0.1:8080/
I get 1400 requests/s in debug mode and 1900 requests/s in release mode.

With wrk, I actually get between 3000-4000 requests/s with default parameters. Most of the time. Sometimes it just hangs. Trying to increase the number of requests with the -r parameter made the hangs consistent, I was not able to get wrk to finish in more than a dozen attempts, so there appears to be a problem with it dying under load.

For comparison, the built-in Apache gets 15000-20000 requests/s, my own web-framework based on libmicrohttpd + an Objective-C/Objective-Smalltalk wrapper gets around 25000-32000. None of these would be classified as "insanely" fast, and they are around an order of magnitude faster than this. It's actually a lot closer to Ruby/Sinatra (~600 requests/s).

EDIT: project readme says "insanely", not "blazingly", so updated.

Re: Vapor: a type-safe web framework for Swift

#23
post #12
post #7

Earlier quoted context omitted.

Competition is good. Two frameworks doesn't mean there'll be an explosion.

So took a look and turns out already happening... Aside from perfect.org there's - https://tailorframe.work - https://github.com/glock45/swifter - https://github.com/grzegorzleszek/HTTPSwiftServer - https://github.com/izqui/Taylor - https://github.com/crossroadlabs/express ...and even mor here https://github.com/search?utf8=&q=web+framework+language%3AS... > Competition is good ... except when it isn't. JavaScript fa…

As of yesterday, I started working on one too!

If I could think of a name, I'd release it right now just to add it to your sweet list.

Re: Vapor: a type-safe web framework for Swift

#27

How is this "insanely fast"? Running an example main with the route '/' mapped to return "Hello World" ab -n 10000 http://127.0.0.1:8080/ I get 1400 requests/s in debug mode and 1900 requests/s in release mode. With wrk, I actually get between 3000-4000 requests/s with default parameters. Most of the time. Sometimes it just hangs. Trying to increase the number of requests with the -r parameter made the hangs consiste…

It is perhaps not the definition of "insane" that you are looking for.

Re: Vapor: a type-safe web framework for Swift

#28
I suppose most who do Swift at the moment also use it on front-end, since this advertises being "type-safe" what is their preferred method to connect to this JSON server from the Swift front-end in type safe manner?

Also, the Fluent is clearly not type-safe, it's stringly typed ORM to database. Since many backends are just fancy wrappers to database, this part should be most important for type-safety. It's nowhere as type safe as Quill, Slick or JOOQ.

Re: Vapor: a type-safe web framework for Swift

#29
post #25

But why? Why would you create a web framework in a single-thread environment? This line of code: https://github.com/tannernelson/vapor/blob/master/Sources/Se... - makes this framework totally useless.

Do you realize that node.js is single threaded? Having more than one process works fine for most purposes. Because the bottlenecks are more IO driven than CPU time.

Re: Vapor: a type-safe web framework for Swift

#30

How is this "insanely fast"? Running an example main with the route '/' mapped to return "Hello World" ab -n 10000 http://127.0.0.1:8080/ I get 1400 requests/s in debug mode and 1900 requests/s in release mode. With wrk, I actually get between 3000-4000 requests/s with default parameters. Most of the time. Sometimes it just hangs. Trying to increase the number of requests with the -r parameter made the hangs consiste…

At least the insanely fast speed of Vapor also goes well on the client side with Vapor.JS, the world's smallest and fastest JavaScript library: https://github.com/madrobby/vapor.js/tree/master
Post reply on HN