-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade: v11.2.0 #1175
Upgrade: v11.2.0 #1175
Conversation
…s and .Register dependencies after .Handle a developer sent a direct question message from our facebook page: https://www.facebook.com/iris.framework/
…ranslate template function example. Fix ctx.HandlerName() does not return the end-dev-defined current route's name, this will give better warnings when using MVC in a wrong way
@kataras why sync map doesnt solve the problem? |
You told me that it doesn't at our e-mail contact...I though it was buggy so I change it to our old-school way. Both ways should be safe, we already test it on running products and never got a datarace for about 2 years... I will need your code to test your case, please send me over the whole project and how you test it. |
@kataras This example with the new mongodb driver came just in time. I've been using Iris + MongoDb extensively over the past 1.5 years in my projects. But I never used the official golang driver since it was still in alpha. Now that it's in beta, I might make the switch for the next project, also I am curious to test its performance comapred with the community version driver and see if there is any noticeable difference. |
@kataras here i just applied the new code |
@speedwheel That's awesome man!! I saw from its code that it may require more allocations to do things than the mgo driver but I myself, didn't expect so big difference between those two, should I add a tutorial for the mgo driver as well? It will be identical through, or should I leave it to you? 🥇 |
@jjhesk I know but I wanted to see if you get a difference data race stackrace, I replied to your new issue as well about byte buffer. Of course, the release is posponding until we fix all the opened bugs by the community, this includes the websocket datarace you mention, but still I can't re-produce that, can you make some code changes in your local iris and do further tests? It seems that you are deeply working on this for more than a week, you can open a PR or you could tell me what you learnt so far so I can continue investigating it. Thank you a lot, once again! |
@kataras I opened an issue on jira about this to create more awareness regarding the performance side. Yes I will do the tutorial, it might come in handy for some users, as for me, I will still continue using mgo for now. |
…nections interfaces, the 'Connection' interface could be changed to 'ServerConn' but this would produce breaking naming change to the iris users, so keep it as it's.
…iris-contrib/middleware instead, let's not have duplications
… some ideas to make the api a bit easier)
…a lot but still thinking of it
…e as well, and humanize the returned error
Upgrade: v11.2.0 Former-commit-id: 8e641ff1c25d92af0502400f3555f9c49d43e1ca
context#FullRequestURI
andNewConditionalHandler
as requested at: Feature: AddContext#Request#FullRequestPath
#1167 and Feature: Add applying rules on middleware #1170 by @zheeeng;ctx.Translate
(using thei18n.Translate
from/iris/middleware/i18n
) inside the templates:{{call .tr "hi" "arguments..."}}
when.tr
is registered as a view data"tr": ctx.Translate
, end-dev can use a view-data wrapper for common-used functions as they already do;Context#ResetRequest
and use it to update the request oncore/handlerconv.FromStdWithNext
as requested at How to add a value into the request context from a middleware function? #1180Start
andUpdate/ShiftExpiration
methods, add aStartWithPath
helper as requested at About Session's Path #1186Context.ResponseWriter.IsHijacked
to report whether the underline connection is hijackedhero.ErrorHandler
to MVC application-level or per controller as requested at#1244, example at: https://github.com/kataras/iris/blob/v11.2.0/_examples/mvc/error-handler/main.goDelim
for redis sessiondb as requested at sessions database redis keys delimeter #1256nil
asnull
in JSON responses, as reported at Don't serialize MVC return nil #1273view/django
pongo2 conversions are now type aliasesThe v11.2.0 will contain a breaking change on the websockets usage, there is no other way to improve it. That one has its own repository for testing and experimentation to implement a faster and even more higher level websocket server and client written in Go which developers will be able select between gorilla/websocket and gobwas/ws for the underline protocol communication and eventually will live into Iris, click here to watch the progress of the new Iris websocket capabilities and features if you can't wait more.
iris.Fileserver
package-level function and Party and APIBuilder methodHandleDir
, read more at The new FileServer #1283ctx.HandlerName()
returns the current handler's function name of the chain. The newctx.RouteName()
returns the current route's name which is executing the handler. Also newctx.HandlerFileName()
which returns the exact program's source code position of the handler's function./sessiondb/redis/service.Config
was replaced by/sessiondb/redis.Config
(no need to import other path for custom configuration now). Also aredis.Config.MaxActive
allows to customize the max number of connections and the oldredis.Config.IdleTimeout
was replaced byredis.Config.Timeout
which sets timeouts for redis reads, writes and dialing. Fix a bug which removed the whole session (likesess.Destroy()
when usingsess.Clear()
with redis sessiondb.mvc#Application.HandleWebsocket
to register websocket controllers, its methods as websocket events now automatically, add a newstateless
struct field tag as well.mvc#Before/AfterActivation.HandleMany and GetRoutes
methods as requested at: How to use HandleMany in mvc #1292websocket.NewRedisStackExchange
for scaling-out through redis pubsub system as requested at: [FEATURE REQUEST] adapters support for scalability neffos#3.iris.WithoutBodyConsumptionOnUnmarshal
not be respected onctx.ReadForm
andctx.FormValues
as reported at: ctx.Request().body only fetch once #1297iris.WithTunneling
configurator. Read more at: Automatic Public Domain for development #1305Published
https://dev.to/kataras/iris-version-11-2-released-22bc