go-siris / siris Goto Github PK
View Code? Open in Web Editor NEWDEPRECATED: The community driven fork of Iris. The fastest web framework for Golang!
License: Other
DEPRECATED: The community driven fork of Iris. The fastest web framework for Golang!
License: Other
OS: Windows 10
Go: 1.8.3 64bit
Siris: 7.3.0
A friend of mine is trying to help me with my project and he's on Windows. Suddenly since the transfer from Iris to Siris he gets the following error:
.../github.com/go-siris/siris/vendor/gopkg.in/go-siris/tcplisten.v1
vendor\github.com\go-siris\siris\vendor\gopkg.in\go-siris\tcplisten.v1\socket.go:22: cannot use fd (type syscall.Handle) as type int in return argument
He temporarily hard-edited the file to return 1, nil
instead of fd, nil
and that works.
Maybe it has to do something with these old threads?
https://groups.google.com/forum/#!msg/golang-dev/_ITOGl9eoxQ/Gj0kITirqmEJ
https://codereview.appspot.com/4600042/
Need to be close (delete(Conn,c)
) the connection, else you get all the message...
Hi guys,
To get values in a query of GET method, like:
"?searchPhrase[fields][]=name&searchPhrase[fields][]=registry&test=abc"
I did something like this:
ctx.Request.Form["searchPhrase[fields][]"][0] -> name
ctx.Request.Form["searchPhrase[fields][]"][1] -> registry
I think is a good idea do some wrapper to that, I right?
Hello,
I can't find anywhere in the documentation how to enable gzip, any thoughts?
Thanks
Please provide a boilerplate with User Registration/Login/Logout. We need it badly.
I'm submitting a bug report. SHOWSTOPPER
Build failure when trying to build my project which has go-siris as dependency.
vendor\github.com\go-siris\siris\core\errors\errors.go:35:22: multiple-value uuid.NewV4() in single-value context
The failure is caused by recent updates to satori/go.uuid project .
func NewV4() (UUID, error) {
return global.NewV4()
}
So now this function returns multiple values and this becomes inconsistent with current implementation in errors.go file of go-siris project
func New(errMsg string) Error {
return Error{
ID: uuid.NewV4().String(),
Message: Prefix + errMsg,
}
}
Could you, please, fix it. It seems easy fix.
Note: for support questions, please use our gitter channel or stackoverflow. This repository's issues are reserved for feature requests and bug reports.
**I'm submitting a ... **
Do you want to request a feature or report a bug?
Feature
What is the current behavior?
No limit of the server listener connections
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
What is the expected behavior?
I Propose to add a limit listener that will restrict the amount of active connections in the server
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
Library version: v7.3.4
Operating System: [Darwin Kernel Version 10.2.0 | Microsoft Windows [Version 10.0.10240]]
System Information: [Core i7-7740X 16gb Ram]
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)
I've taken the inspiration from
https://github.com/tylerb/graceful/blob/master/limit_listen.go
wher you can wrap the net.Listener struct to accept a limit so we have a bounded number of active connections per server.
I didn't watch this repo. And got a lot notifications from this repo.
Hi, While i see lots of activity happening in the siris ( fork of IRIS ) i am eager to know release date of siris v8 .
Is there any deadline or release date for v8 with all checked improvements and siris being independent.
I am considering whether we can make a complete solution like XAMPP with go-SIRIS, React, Webpack, MongoDB, Server-side rendering, on-component-demand loading.
If we can have a complete solution in this way, many new developers must be attracted to adopt go-SIRIS.
Also, there should be some tutorials (Docs, Websites and Youtube videos) to guide us to understand everything.
Do you think it is a good idea?
The default Iris Json renderer uses encode/json.
For fast Json Rendering (and also parsing) there is https://github.com/mailru/easyjson.
We should add an easy option to use easyjson.
It's a good practice to add an issue template, I believe it will take a more serious step towards
issue triage
https://help.github.com/articles/creating-an-issue-template-for-your-repository/
@theodesp
Hey I just found that article comparing Badger Vs BoldDB
https://medium.com/@hendra_zhong/badger-vs-boltdb-persistent-key-value-store-written-in-go-e94ada87048f
Maybe we can add a plugin for interfacing Badger as a session store
Based on today's note in the iris github page (https://github.com/kataras/iris), it seems that the leadership of this, open-source, repository was transfered to hiveminded. So am bit confused.
Would this mean that there will be two versions of iris framework from now on or would it be merged back again?
Thanks in advance for clarification.
#I saw that the Cache Markdown it's used for full page caching, is there any way I can use it just to store certain content from the page (key, value interface for example).
Add a function to use the benefits of h2 speed with push of resources before the client will ask for them.
Note: for support questions, please use our gitter channel or stackoverflow. This repository's issues are reserved for feature requests and bug reports.
**I'm submitting a ... **
Do you want to request a feature or report a bug?
What is the current behavior?
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
What is the expected behavior?
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
Library version: v7.3.4
Operating System: [Darwin Kernel Version 10.2.0 | Microsoft Windows [Version 10.0.10240]]
System Information: [Core i7-7740X 16gb Ram]
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)
Hi, some time ago I reported new issue in the iris repo but it got closed and my comment was deleted:/ then I found this repo and I think it has the same problem as iris has.
WebSockets should use some kind of a backend like Redis or RabbitMQ (or any other pubsub mechanism).
Why?
You see, let's imagine we have three clients:
CLIENT 1 <---> | INSTANCE 1
CLIENT 2 <---> | INSTANCE 1
CLIENT 3 <---> | INSTANCE 2
Client 1 and 2 is connected to the 1st replica of our go app, and the 3rd one is connected to the 2nd instance of our go app.
If Client 1 calls some endpoint on instance 1 which then results in a published message (which should be received by everyone) over websockets then it will be delivered to only client 1 and client 2, the 3rd one won't receive it.
There's a good pattern (used in django's channels package) which uses some pubsub mechanism:
CLIENT 1 <---> | INSTANCE 1 | <--> REDIS
CLIENT 2 <---> | INSTANCE 1 | <--> REDIS
CLIENT 3 <---> | INSTANCE 2 | <--> REDIS
In that way when client 1 publishes a message, it is published not into websocket channel but to redis, then it gets received by every instance that listens on messages and is then forwarded from that channel to websockets.
Hi,
I would like to know how we would like to do the release managment?
I prefer a own branch "release" where we release the new versions.
To release we should use gopkg.in/siris.vX
like gopkg.in/siris.v7
.
In the master
branch we only work under github.com/go-siris/siris
.
In master
is it allowed to push multiple commits in a PR and should be squashed merged or follow the rebased infos like (https://github.com/haraka/Haraka/wiki/Contributing), but in release
it is only allowed to do squashed commits since last release.
So, what do you think?
The benchmark was done using iris v5.
We should either remove it or create a new one.
(Version 0bafd86d2894b92eca55cea5f4f36d6ef333b35b)
Go 1.8.3. Homebrew
macOS Sierra 10.12.6
The following code reproduces the error. You go to /
. Then it redirects to /landing
. Then if you go to the /
url again (or any that you would define), the request hangs forever.
package main
import (
"github.com/go-siris/siris"
"github.com/go-siris/siris/context"
"github.com/go-siris/siris/middleware/logger"
"github.com/go-siris/siris/sessions"
)
func main() {
app := siris.New()
app.Use(logger.New())
app.AttachSessionManager(sessions.New(sessions.Config{
Cookie: "sid",
}))
app.Get("/", func(c context.Context) {
c.Session().SetFlash("test", "testString")
c.Redirect("/landing")
})
app.Get("/landing", func(c context.Context) {
c.WriteString(c.Session().GetFlashString("test"))
})
app.Run(siris.Addr(":8085"))
}
Loading a simple c.Session()
(not even a get/set on it) on the context
and then running wrk -d10s -t3 -c100 https://localhost:8443
benchmark spikes my initial app's 50MB memory instantly to 450MB+
. Turning the session-access off on a test page in my application and the whole overhead is instantly gone and even after running multiple runs the memory stays super steady the same low usage.
Is this virtual growth or really a bug? I'm using github.com/gorilla/securecookie as the encoder/decoder, but even if I just use native unmodified built-in memory session storage it keeps on leaking. Every re-run on the same process just add another 350~450MB to the process' memory usage.
This was a note I already had on my list for a long time using Iris, but as the benchmark will never be a use-case in my situation (yet) I kind of postponed it. I hope maybe we can look at this together and figure out what causes this and if the concern should be valid.
When I started with Iris last year I used the Django templates for quite some time. Later realizing how terribly slow these rendering engines are I moved to https://github.com/valyala/quicktemplate. But https://github.com/shiyanhui/hero also looks amazing.
Instead of providing examples that might be easy to start with it might be better to instantly set people on the right path and offer fast solutions.
On some Django templates I got speeds that just are as terrible as building a PHP website. Since I use QuickTemplate I get 38k+ req/s.
The Portlistener can be enhanced. Fasthttp can use something called "reuse_port"
We should implement it
still output Now listening on: http://localhost:8080
cómo integrar Siris con ReactJs?
Voy a montar mi backend con Siris, y mi frontend con React, pero no quiero que React este en un servidor de desarrollo aparte.
may u add these functions?
context.URLParamBool(name string) (bool,error)
context.URLParamTrim(name string) string
context.URLParamEscape(name string) string
context.URLParamFloat64(name string) (float64, error)
context.PostValueTrim(name string) string
context.PostValueEscape(name string) string
context.PostBool(name string) (bool,error)
context.PostInt(name string) (int, error)
context.PostInt64(name string) (int64, error)
context.PostFloat64(name string) (float64, error)
context.PostStrings(name string) ([]string, error)
context.Params().GetTrim(name string) string
context.Params().GetEscape(name string) string
context.Params().GetBool(name string) (bool,error)
context.Params().GetFloat64(name string) (float64, error)
Many modern Browsers support brotli compression.
We should add optional brotli compression. It does not need to be best compressionlevel.
Note: for support questions, please use our gitter channel or stackoverflow. This repository's issues are reserved for feature requests and bug reports.
**I'm submitting a ... **
Do you want to request a feature or report a bug?
Feature
What is the current behavior?
No tests running for windows clients
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
What is the expected behavior?
Add tests running for windows clients
What is the motivation / use case for changing the behavior?
Cross platform conformance
Please tell us about your environment:
Library version: v7.3.4
Operating System: [Darwin Kernel Version 10.2.0 | Microsoft Windows [Version 10.0.10240]]
System Information: [Core i7-7740X 16gb Ram]
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)
Issue #14 shows that an example for http2 push would be useful.
In the history the api of iris changed multiple times.
Most of these changes were completly unnecessary, e.g. v6->v7 Render->View
gzip-9 enabled,
encoding utf8,
brotli-5 enabled,
port_reuse enabled (if possible),
quic enabled (if certificates are available)
Make real ip headers only change the remoteAddress when the config is set else visitors are able to fake own ip addresses...
Make config variable to enable differend types of "proxys".
tbd
Just a small thing :)
Key rotation for tls session keys
@Dexus some days ago you deleted a comment from @esemplastic but I was there to download his second attempt (he uploaded his screenshot to #39 ) :
He just asked you why race conditions in this project while iris hadn't.
I gave you some time to see what you'll do and how you will fix it and you did the exactly thing again, you pasted code from kataras/iris repository and you removed the license files, like it was yours, proof of concept below.
The funny part is that you did that comment moments ago, how is that possible? You don't (or seems to not) respect his work but you're using his entire code and you're watching his repository to apply the same changes here too ?
Except the whole repository, did you code anything by yourself or you always copy-pasting code from others?
Fix/race condition/Rework core/nettools for easy resolve
5e68f51 (3 days old) is pasted code from kataras/iris@4c76fca#diff-9fd01c8949c007d83e7a56c493a46398 pushed 5 days ago.
Fix/race condition/Fix race condition and rework task managment.
f7ced80 (3 days old) is pasted code from
kataras/iris@4c76fca#diff-93bf20dfbbddefa00c7d76a4090ab137 pushed 5 days ago, history notes about these changes can be also found here .
You removed the license headers from f7ced80#diff-fcdeeccd045f157e84bc11bf6b7484bd too.
You tell the @go-siris community that you fixed sessions and you want reviews, are you kidding?
You did copy-pasted again, this time not from @kataras but from @astaxie:
7ea3143#diff-9736e67342fce924fa0b8a4388ecfa79 (here you kept the hader files, but you did a PR telling that is your own code)
You, @Dexus, use his code as the big codebase,
you 're still copying his code into your fork but in the same time you're sprending that @kataras is not a good developer -- what's the meaning of the fork if you never put your own things and only copying? and why do people should use that fork? you still have a race condition on the first example on readme.
He's good developer and you use his framework and you watch his code everyday or he is a bad developer and you don't use, copy or watch his code, you can't do both it's not logical.
Beside all these, you're removing the header files from the go files(f7ced80#diff-fcdeeccd045f157e84bc11bf6b7484bd)
What's going on with you mate, do you ever learn?
The license also says that you should not comment the author of Iris in order promote a product (via him or other iris' contributor), you do exactly that.
@godofdream you and @Dexus are togeher, do you agree or you still support that guy? I remember when we were on the iris channel and @kataras helped you noumerous times, more than I can remember. He helped @Dexus too, he explained how go and net/http works to him some months ago, the whole @Dexus behavior shows that he is, at least, ungrateful.
No offence
As a contributor, and user I would like to see the projects code coverage report in a nice graphic environment
Utilize https://codecov.io
See example project here
see topic
Support many Loadbalancer etc.
https://github.com/ahmadnassri/forwarded-http/tree/master/lib
kataras/iris@c56b528
(Sorry I see that Pullrequest is a joke)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.