These are chat archives for exceptionless/Discuss

11th
Jan 2016
Eric J. Smith
@ejsmith
Jan 11 2016 15:48
@frankebersoll we would like to get the session support on the js and .net clients implemented soon so we can wrap this feature up. Are you actively working on this? Can you and Blake work together?
Blake Niemyjski
@niemyjski
Jan 11 2016 15:50
yeah if you want we can divy up the work or I can take all of it :)
what ever works for you
Andrew Collins
@andrewcoll
Jan 11 2016 15:51
@niemyjski where abouts on the github wiki? i couldn't find it when i was looking
the event builder api is what your looking at
ExceptionlessClient.Default.CreateFeatureUsage(“feature).xyz.submit();
Frank Ebersoll
@frankebersoll
Jan 11 2016 15:53
I'm working on session support in js/node. Sorry, didnt add any information to the github issue
Blake Niemyjski
@niemyjski
Jan 11 2016 15:53
it’s all good
I’m finishing up some server work here shortly and then can help you or finish up the .net client
and then move to the js client, would you like any help / discussions?
guess if you want to commit what you have before you get off for the day even if it’s not compiling I can pull it down and review or even complete the wip.
Frank Ebersoll
@frankebersoll
Jan 11 2016 15:55
I will do that. Maybe meet here later?
Andrew Collins
@andrewcoll
Jan 11 2016 15:56
@niemyjski yea but is there a js version?
that's the .net code, right?
Blake Niemyjski
@niemyjski
Jan 11 2016 15:57
yeah
just send me a message
it has a wiki and a fluent api as wekk
well
Andrew Collins
@andrewcoll
Jan 11 2016 15:57
alright ill take a look
Blake Niemyjski
@niemyjski
Jan 11 2016 15:58
if you have any questions just ask :)
also that issue you ran into the other day when I was helping you has been fixed.
Frank Ebersoll
@frankebersoll
Jan 11 2016 15:58
About 8 pm UTC @niemyjski
Blake Niemyjski
@niemyjski
Jan 11 2016 15:59
so 4 hours from now?
2pm my time got it :)
Frank Ebersoll
@frankebersoll
Jan 11 2016 18:32
ok
i have two feature branches, both pushed just now
first one: sessions. I created a DefaultSessionManager that uses a dictionary, just like the .NET version does
the corresponding plugin is still in the making
this should be finished today
Frank Ebersoll
@frankebersoll
Jan 11 2016 18:38
second one is about dependency injection. i like Ninject in .NET very much, and I wondered if there was anything like that for javascript
and, as a matter of fact, there is nject.js
Eric J. Smith
@ejsmith
Jan 11 2016 18:39
how big is that minified?
Frank Ebersoll
@frankebersoll
Jan 11 2016 18:39
i ported the project from node, it still needs some work.
i don’t know yet, but i think i can still strip lots of code
Eric J. Smith
@ejsmith
Jan 11 2016 18:40
so one issue that we have on the .net side is that settings can change after the initial plugin instantiation.
that is why it’s calling the resolver directly.
which I understand is an anti-pattern and would be better to do injection
need to figure out how to handle that.
Frank Ebersoll
@frankebersoll
Jan 11 2016 18:41
well, injection doesn’t mean to instantiate everything at once
you can have factories, you can re-bind things and you can have transients
Eric J. Smith
@ejsmith
Jan 11 2016 18:41
I think in the .net client we freeze the configuration after the 1st event is submitted.
so maybe we just need to lazily create the plugins.
Frank Ebersoll
@frankebersoll
Jan 11 2016 18:41
we need three things to work: tree.registerTransient()to register stuff that has no state
tree.registerSingleton() to register stuff that keeps state
Eric J. Smith
@ejsmith
Jan 11 2016 18:42
having a DI container in our client feels like overkill a bit.
Frank Ebersoll
@frankebersoll
Jan 11 2016 18:42
and tree.resolve() to get the root object, client for example
Eric J. Smith
@ejsmith
Jan 11 2016 18:42
what do you think?
Frank Ebersoll
@frankebersoll
Jan 11 2016 18:43
yes, but in javascript it’s not very much code. and we can get rid of all those configuration stuff. my hope is that we end up with an even smaller codebase
if it is more code in the end, i will write it off as an experiment.
Eric J. Smith
@ejsmith
Jan 11 2016 18:43
yeah, I can see that if we can change things around so it can be minified better, eh?
Frank Ebersoll
@frankebersoll
Jan 11 2016 18:44
maybe it is. at least, it will be easier to maintain and easier to test.
Eric J. Smith
@ejsmith
Jan 11 2016 18:44
there is another one
yeah
Frank Ebersoll
@frankebersoll
Jan 11 2016 18:45
i just quickly looked over this one, and it seems not to support constructor injection
what i particularly like about nject is the following:
Blake Niemyjski
@niemyjski
Jan 11 2016 18:45
hmm
Frank Ebersoll
@frankebersoll
Jan 11 2016 18:46
tree.register(„blah“, Blah); tree.register(„blubb“, Blubb) where Blah and Blubb are both classes.
now, Blah has the following constructor:
constructor(blubb: Blubb)
this means, it will automatically get injected an instance of Blubb, just because of the argument name
this is awesome and keeps everything clean. no need to tell the container where to inject what
i thought about the idea where we want to queue all things we do in the library until it is fully loaded
maybe this would also mean switching „preliminary“ implementations with real ones
@niemyjski „hmm“?
Eric J. Smith
@ejsmith
Jan 11 2016 18:51
is it using TypeScript types?
Frank Ebersoll
@frankebersoll
Jan 11 2016 18:51
i think you are not very happy with the idea :-)
Eric J. Smith
@ejsmith
Jan 11 2016 18:51
I am all for it.
if it can simplify things and not add much size to the client.
Blake Niemyjski
@niemyjski
Jan 11 2016 18:52
so one of the reasonse I did injection off the config ojbect is you could have multiple exceptionless clients in javascript
and each one might be completely different and you could just put the implementation on it and pass it through
Frank Ebersoll
@frankebersoll
Jan 11 2016 18:53
yes, that would not be a problem :-)
Blake Niemyjski
@niemyjski
Jan 11 2016 18:53
ok
Eric J. Smith
@ejsmith
Jan 11 2016 18:53
Frank Ebersoll
@frankebersoll
Jan 11 2016 18:53
we can instantiate the tree object multiple times
@eric looks similar! looking into it
Eric J. Smith
@ejsmith
Jan 11 2016 18:54
is it doing based on the name of the parameter or is it requiring that you enable the TypeScript metadata annotations be turned on?
Frank Ebersoll
@frankebersoll
Jan 11 2016 18:54
i will try to strip unnecessary things from the Tree class and minify it and see how much it is
it is doing it by looking at the parameter names
Eric J. Smith
@ejsmith
Jan 11 2016 18:54
ahh
Frank Ebersoll
@frankebersoll
Jan 11 2016 18:55
pure javascript.
Eric J. Smith
@ejsmith
Jan 11 2016 18:55
ok
Frank Ebersoll
@frankebersoll
Jan 11 2016 18:55
it does function.toString and looks at the parameter names
Eric J. Smith
@ejsmith
Jan 11 2016 18:55
the aurelia DI does it based on the type metadata.
Frank Ebersoll
@frankebersoll
Jan 11 2016 18:55
then it looks in its dictionary for a configuration (binding) for this key
Eric J. Smith
@ejsmith
Jan 11 2016 18:55
which is pretty cool, but would be overkill for us probably.
right
Frank Ebersoll
@frankebersoll
Jan 11 2016 18:56
that would need additional compilation steps, i guess
Eric J. Smith
@ejsmith
Jan 11 2016 18:56
yeah, just options turned on in the compiler.
their DI is much bigger though.
so heck with that.
I think doing it by names is fine.
Frank Ebersoll
@frankebersoll
Jan 11 2016 18:57
it might be an experiment. but adding every single service to a configuration god-class just doesn’t feel right
but let’s first try to get that session stuff finished :-)
Blake Niemyjski
@niemyjski
Jan 11 2016 19:01
yeah
that’s the first priortiy for sure
hehe
Blake Niemyjski
@niemyjski
Jan 11 2016 19:32
Yeah it's a pita
should the session plugin work as in .net?
Blake Niemyjski
@niemyjski
Jan 11 2016 19:36
lol
pain in the ass = pita
Frank Ebersoll
@frankebersoll
Jan 11 2016 19:36
ah. okay
what about that user identity stuff?
Blake Niemyjski
@niemyjski
Jan 11 2016 19:36
@ejsmith do we even need a session plugin in js
as long as your setting user identity we should be good
take a look at our default data plugin in .net
we changed it a little bit
we set the user as a default data and don’t overwrite anything that is already in data
do we ever see us having multiple sessions in .net
we won’t have a users external ip in the js client
we’ll just have user info
Frank Ebersoll
@frankebersoll
Jan 11 2016 19:41
where do we get the user info?
it’s not that we can capture the machine name or user name as easily...
can we?
at least in the browser it should be rather hard
Blake Niemyjski
@niemyjski
Jan 11 2016 19:42
nope
that should be isolated via the browser
Frank Ebersoll
@frankebersoll
Jan 11 2016 19:43
in node it might be easier
we can execute a whoami
Blake Niemyjski
@niemyjski
Jan 11 2016 19:44
yeah
Frank Ebersoll
@frankebersoll
Jan 11 2016 19:45
or try to get it from the enviroment
Blake Niemyjski
@niemyjski
Jan 11 2016 19:45
yeah, that would be good
but does it make sense if it’s a server app
probably not
how do users authenticate during a node request?
Frank Ebersoll
@frankebersoll
Jan 11 2016 19:47
depends on the web server...
node itself doesn’t have a thing for that.
everything runs with the rights of the process user
Blake Niemyjski
@niemyjski
Jan 11 2016 19:49
yeah but on a cloud server
the user won’t make sense
Frank Ebersoll
@frankebersoll
Jan 11 2016 19:51
hmm
it depends on if we use the node application as a server or as a client
on a server app, we want sessions to be bound to requests
on a client app, we want the session to be running from start to end
Blake Niemyjski
@niemyjski
Jan 11 2016 19:53
pull
yeah, exactly. is there a good way to determine that?
or just add an extension like we do in .net
Frank Ebersoll
@frankebersoll
Jan 11 2016 19:53
no.
Blake Niemyjski
@niemyjski
Jan 11 2016 19:54
client.useSessions()
Frank Ebersoll
@frankebersoll
Jan 11 2016 19:54
yes. i think that’s how we should do it
Blake Niemyjski
@niemyjski
Jan 11 2016 20:12
@frankebersoll it’s +4h
we can meet up later or talk now what ever works for you. I need to meet up with a customer breify in about 25 minutes
Frank Ebersoll
@frankebersoll
Jan 11 2016 20:13
yes :-)
i don’t know where to continue
Blake Niemyjski
@niemyjski
Jan 11 2016 20:15
so thing that just bit me testing @ejsmith code that for session id must be between 8 characters and 100
if it’s a user identity from a session, we need to do a sha1 of the identity
or something
sigh
Eric J. Smith
@ejsmith
Jan 11 2016 20:16
yeah, we don’t need session lookup in js
Blake Niemyjski
@niemyjski
Jan 11 2016 20:16
might need to maps identity to generated sessionid
Eric J. Smith
@ejsmith
Jan 11 2016 20:16
it’s in .net because the server is for a bunch of users.
ahh read the rest of the conversation
Frank Ebersoll
@frankebersoll
Jan 11 2016 20:17
i just need some input on what features we need to work
Eric J. Smith
@ejsmith
Jan 11 2016 20:17
yeah, node apps would want the session id thing.
I am going to change the .net session stuff around some more.
we are going to change to having a ICacheClient service instead of ISessionManager
cache client will allow web farms to communicate
Frank Ebersoll
@frankebersoll
Jan 11 2016 20:18
?
Eric J. Smith
@ejsmith
Jan 11 2016 20:18
and can be used in various ways instead of being session specific.
Blake Niemyjski
@niemyjski
Jan 11 2016 20:19
node can be multiple servers...
Eric J. Smith
@ejsmith
Jan 11 2016 20:20
what is the ? for @frankebersoll I will explain more.
basically, in web farm scenarios we need to have the ability for the various client instances to be able to communicate.
Frank Ebersoll
@frankebersoll
Jan 11 2016 20:21
sorry. reloading gitter clarified some things
i think i would try to replicate the .net library things for node, because there might be the same use cases
for the browser, it’s a different thing - but we can use the node version as a start
so i need to know what types and members should get ported
i tried to diff the .net session branch against the main branch, but there seem to be other changes
Eric J. Smith
@ejsmith
Jan 11 2016 20:26
yeah, problem is that the .net client changes are a work in progress still.
also, we want to add page view tracking on the server and client side.
so we have a few things left to do.
Frank Ebersoll
@frankebersoll
Jan 11 2016 20:27
what would be the most useful next step to do in the JS world
Eric J. Smith
@ejsmith
Jan 11 2016 20:29
we do auto sessions on the server side based on user identity… really the only thing I want to do is start tracking page views and capturing some metrics from the page view.
like how long it took
there are some browser apis for grabbing that stuff pretty easily.
I think maybe doing the experiment on DI changes would be pretty helpful.
Frank Ebersoll
@frankebersoll
Jan 11 2016 20:31
okay, then i try to continue this in its own branch with focus on library size
Eric J. Smith
@ejsmith
Jan 11 2016 20:31
but really it boils down to whatever you want to work on. :-)
are sessions interesting to you?
Frank Ebersoll
@frankebersoll
Jan 11 2016 20:32
i think so. i would use them to group events that belong together
Eric J. Smith
@ejsmith
Jan 11 2016 20:33
any ideas how we would go about doing random grouping?
like page level or some other random thing.
Frank Ebersoll
@frankebersoll
Jan 11 2016 20:34
i really liked the simplicity of events referencing other events and viewing them as a tree or navigating between them
or i misunderstand „random grouping"
Eric J. Smith
@ejsmith
Jan 11 2016 20:36
yeah, we need some sort of way to do that generically where it can be shown in the UI.
we introduced the concept of events having a sessionid on them
but there are other levels of things like page level.
like what all events were generated as the result of this page view.
but we only have the ability to do that at the session level right now.
Frank Ebersoll
@frankebersoll
Jan 11 2016 20:38
but can’t events already have a reference?
Eric J. Smith
@ejsmith
Jan 11 2016 20:38
would be nice if there was just a generic ability to add a property to an event that is a reference to another event and you could have several of those.
the reference id is meant for clients to be able to generate unique ids that they can give us and we can go find the error that they are looking at.
Frank Ebersoll
@frankebersoll
Jan 11 2016 20:39
oh wait, reference_id is the other thing we already talked about
Eric J. Smith
@ejsmith
Jan 11 2016 20:39
since the clients can’t control the event id… they need a way to be able to generate an id that they can show to users.
so basically, right now we just have session ids and that is what Blake is adding UI for now.
Frank Ebersoll
@frankebersoll
Jan 11 2016 20:40
we could either allow sending events in a hierarchical manner
Eric J. Smith
@ejsmith
Jan 11 2016 20:40
but it would be nice to take it to the next level and allow any number of event references.
would be a big feature.
Frank Ebersoll
@frankebersoll
Jan 11 2016 20:42
the client won’t know the actual event IDs, so adding the references won’t be so easy
Eric J. Smith
@ejsmith
Jan 11 2016 20:42
so many things we want!
:-)
yep
Frank Ebersoll
@frankebersoll
Jan 11 2016 20:43
so, we would need to cache all „container“ events on the client
Eric J. Smith
@ejsmith
Jan 11 2016 20:43
that is why we have to go look up the sessions on the server side… how you do that generically would be probably be hard.
hrmm… actually… the point of reference id is so that the client can generate an id that it knows.
maybe we could just allow custom properties that point to reference ids
Frank Ebersoll
@frankebersoll
Jan 11 2016 20:44
that’s one thing. we could use that and use a foreign reference id as pointer
Eric J. Smith
@ejsmith
Jan 11 2016 20:44
then you could have any number of properties on an event that have links back to other events.
Frank Ebersoll
@frankebersoll
Jan 11 2016 20:45
the other thing we could do (even if you will say that we can’t) is letting the client… no, that is actually a bad idea.
Eric J. Smith
@ejsmith
Jan 11 2016 20:45
haha
Frank Ebersoll
@frankebersoll
Jan 11 2016 20:45
wait, it isn’t!
Eric J. Smith
@ejsmith
Jan 11 2016 20:45
lol
where is @niemyjski in this conversation?
Frank Ebersoll
@frankebersoll
Jan 11 2016 20:45
we talked about that already, too.
Eric J. Smith
@ejsmith
Jan 11 2016 20:46
I really like the idea of using the reference id… we could remove session id right now and just use reference id.
Frank Ebersoll
@frankebersoll
Jan 11 2016 20:46
what is the problem with client generated event IDs?
Eric J. Smith
@ejsmith
Jan 11 2016 20:46
we don’t want the client in control of generating our primary keys.
for a bunch of reasons.
most of them performance related.
but that is literally what the reference id is for.
Frank Ebersoll
@frankebersoll
Jan 11 2016 20:46
how are the currently being generated?
Eric J. Smith
@ejsmith
Jan 11 2016 20:47
they are sequential guids.
Frank Ebersoll
@frankebersoll
Jan 11 2016 20:47
okay, that single reason is enough.
so, let’s generate a GUID for empty reference ids
problem: what if we reference an event that has already been submitted without a reference id?
you would only be able to reference events that haven’t been submitted yet, or every event would need an automatic reference id
Eric J. Smith
@ejsmith
Jan 11 2016 20:53
don’t need reference id if you aren’t going to reference it.
Frank Ebersoll
@frankebersoll
Jan 11 2016 20:53
but how would the API know that beforehand
Eric J. Smith
@ejsmith
Jan 11 2016 20:53
not sure what you mean.
like the client would keep track of a session id
Frank Ebersoll
@frankebersoll
Jan 11 2016 20:54
well
Eric J. Smith
@ejsmith
Jan 11 2016 20:54
and that session id is a pointer to an event with that session id in its reference id field.
and then you would have page viewid that is another pointer to a different event that is a reference id on some other event.
Blake Niemyjski
@niemyjski
Jan 11 2016 20:54
@ejsmith doesn’t read very well when I said I was meeting with a customer
Eric J. Smith
@ejsmith
Jan 11 2016 20:55
nice
Blake Niemyjski
@niemyjski
Jan 11 2016 20:57
or we could just have a convention on feature usage
pagename.feature
pageview.onbutton
and split on that
an idea
Frank Ebersoll
@frankebersoll
Jan 11 2016 20:58
```javascript
var eventA = client.createLog(„yeah“), eventB = client.createLog(„yess“);
eventA.submit();
eventB.reference(eventA);
Blake Niemyjski
@niemyjski
Jan 11 2016 20:58
not sure that I like that
it’s hard to use and then your keeping object around everywhere
Frank Ebersoll
@frankebersoll
Jan 11 2016 20:58
yes, we would need some kind of manager to keep contextual objects around
as we do with session ids right now
Blake Niemyjski
@niemyjski
Jan 11 2016 20:59
why not just use the source property
and set it to the parent feature name
then you stack on source and you get different feature usages
then in a web app you know everything that happened on a single view
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:00
hmm
Blake Niemyjski
@niemyjski
Jan 11 2016 21:01
easy and no extra work
:)
in a web app you just register a plugin that puts the current route info in the source field
Eric J. Smith
@ejsmith
Jan 11 2016 21:02
no, we need multiple fields that reference different events.
the refererence id thing is perfect.
we already have lookup by reference.
Blake Niemyjski
@niemyjski
Jan 11 2016 21:02
until you actually are wanting to use reference ids
and then it falls apart
Eric J. Smith
@ejsmith
Jan 11 2016 21:02
that is completely fine
doesn’t not fall apart in any way.
the reference id can be anything and you can find events by reference id.
so give a user a reference id on an error and go find it
then on sessions we set reference id to the session id and then other events can have a session id property that points to it.
now you have a generic system in place.
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:03
one problem i have with the reference_id is that it’s not really an id
it is not unique.
Eric J. Smith
@ejsmith
Jan 11 2016 21:04
we can have events that can have multiple properties that are pointing to different events.
yeah, it’s not enforced that it is unique
and that sucks.
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:04
:-)
Blake Niemyjski
@niemyjski
Jan 11 2016 21:04
@ejsmith ah no…. we get all session events by the session id..
Eric J. Smith
@ejsmith
Jan 11 2016 21:04
but I actually don’t think it hurts anything.
yes and it would work identical
Blake Niemyjski
@niemyjski
Jan 11 2016 21:05
and a user can control any events so it breaks apart on multiple points and is confusing
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:05
well, you can’t reference a single event by a reference id when it’s not unique
Blake Niemyjski
@niemyjski
Jan 11 2016 21:05
yeah you can
a reference id can be anything
anything between 8 and 100 characters
Eric J. Smith
@ejsmith
Jan 11 2016 21:05
you can link to reference id and if there are multiple then it will show multiple.
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:05
uh
that will make showing things like a tree impossible
but even with a unique field the graph might have circles or not be a tree
Eric J. Smith
@ejsmith
Jan 11 2016 21:07
so right now on a session event we show all the events that match the session id
Blake Niemyjski
@niemyjski
Jan 11 2016 21:08
yes
Eric J. Smith
@ejsmith
Jan 11 2016 21:08
and on a session event we link back to the event with that session id.
Blake Niemyjski
@niemyjski
Jan 11 2016 21:08
yes
Eric J. Smith
@ejsmith
Jan 11 2016 21:08
so you click the session id and if it’s multiple you get a list.
but we hope that doesn’t happen.
Blake Niemyjski
@niemyjski
Jan 11 2016 21:08
no the session event doesn’t link to anything it’s headless
Eric J. Smith
@ejsmith
Jan 11 2016 21:08
shouldn’t happen… but won’t be the end of the world.
yes, I didn’t say it did.
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:08
i mean it the other way around
Blake Niemyjski
@niemyjski
Jan 11 2016 21:08
" on a session event we link back to the event with that session id."
creating new session ids will really mess things up server side no?
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:09
an event cannot have two sessions with the same id
Blake Niemyjski
@niemyjski
Jan 11 2016 21:09
with our manual session id plugin
Eric J. Smith
@ejsmith
Jan 11 2016 21:09
yes, a session event… as in an event that happened within a session.
Blake Niemyjski
@niemyjski
Jan 11 2016 21:09
would need to look
Eric J. Smith
@ejsmith
Jan 11 2016 21:09
ok… timeout...
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:09
ok
Eric J. Smith
@ejsmith
Jan 11 2016 21:10
we have a session start event, it has a referenceid on it that is our session identifier.
it would need to know what types of custom fields point to it.
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:11
what happens if we put the same session id in multiple sessions?
Blake Niemyjski
@niemyjski
Jan 11 2016 21:12
our session identifier on our session start event is set to the session_id property
Eric J. Smith
@ejsmith
Jan 11 2016 21:12
sorry, I got 12 things going.
yes blake, I am describing my idea.
Blake Niemyjski
@niemyjski
Jan 11 2016 21:12
@frankebersoll they will be merged
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:12
ah
Blake Niemyjski
@niemyjski
Jan 11 2016 21:12
why it’s your responsibility to specify a unique id if you are setting it.
we will ensure it’s unique server side if you don’t specify it
Eric J. Smith
@ejsmith
Jan 11 2016 21:13
so on the session event it has a reference id and also has a list of custom fields that point back to itself.
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:13
ah
Eric J. Smith
@ejsmith
Jan 11 2016 21:13
so then on child events… they have a custom property that has a value that matches the reference id.
on the child event it has a session id property that is a link to the session start event.
ideally that is a single matching event
but if it’s not it will show a list of matching events
that is already done
since the session start event knows which types of custom fields point back to itself, it can create tabs with event lists that find all events that match its reference id
you end up with the same net result that we have now with session id being a 1st class thing, but you get the ability to have multiple references on each event.
and people can do custom ones.
Blake Niemyjski
@niemyjski
Jan 11 2016 21:16
how does this work with viewing features across sessions?
Eric J. Smith
@ejsmith
Jan 11 2016 21:16
features right now are stacks anyway… so that has nothing to do with this.
Blake Niemyjski
@niemyjski
Jan 11 2016 21:17
so a feature would have a custom field link pointing to child features?
if I’m understanding correctly
Eric J. Smith
@ejsmith
Jan 11 2016 21:17
so you are wanting some sort of a heirarchy of features?
Blake Niemyjski
@niemyjski
Jan 11 2016 21:17
yeah
user used this feature on this page or control
that’s all I want
Eric J. Smith
@ejsmith
Jan 11 2016 21:18
yeah, well this gives us the ability to create new types of links any time we want.
and solves session linking in a generic way
Blake Niemyjski
@niemyjski
Jan 11 2016 21:19
which is why I was like lets use a convention and then you can do a tree based on window.section.feature
ok
Eric J. Smith
@ejsmith
Jan 11 2016 21:20
it will work perfectly other than the weirdness of an event needing to know what types of reference event tabs to show.
Blake Niemyjski
@niemyjski
Jan 11 2016 21:21
I’m leaving this to you to document or implement cause you understand it more than me :)
I’m think headed
btw, we have a major issue on heartbeats when you don’t specify a session id
right now we use the user identity which may not be a valid identifier and we want these session ids to be unique…..
Eric J. Smith
@ejsmith
Jan 11 2016 21:22
why?
Blake Niemyjski
@niemyjski
Jan 11 2016 21:23
because when you specify a session id client side it won’t be changed server side
so now user x will have 80 differnt sessions with the same session id
Eric J. Smith
@ejsmith
Jan 11 2016 21:24
you specified a session id… it’s your job to keep sending that.
Blake Niemyjski
@niemyjski
Jan 11 2016 21:24
yes but
        var sessionIdentifier = context.Event.SessionId ?? context.Event.GetUserIdentity()?.Identity;
        if (String.IsNullOrEmpty(sessionIdentifier) || context.Event.Type == Event.KnownTypes.SessionHeartbeat)
            return;
the session id becomes the user identity which is wrong
I guess our session heartbeat should take a user identity or session id
and attach that to the session start it sends out
Eric J. Smith
@ejsmith
Jan 11 2016 21:25
yes
Blake Niemyjski
@niemyjski
Jan 11 2016 21:25
ok
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:28
i don’t fully understand how that would support my scenario
i have that message bus. one really tricky thing is tracking message paths through the system
AMessage => IHandle<AMessage> => BMessage => IHandle<BMessage> and so on
Eric J. Smith
@ejsmith
Jan 11 2016 21:30
so you have a message id
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:30
this is decoupled, asynchronous and difficult to debug
Eric J. Smith
@ejsmith
Jan 11 2016 21:30
you keep track of that and make sure you add that id as the reference id for a top level event
then you set that value in a custom field on all the child events.
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:30
how would i create a chain of events?
Eric J. Smith
@ejsmith
Jan 11 2016 21:30
then on the parent you would be able to view a list of all the events.
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:31
but how would that work with blake’s idea?
Eric J. Smith
@ejsmith
Jan 11 2016 21:31
it wouldn’t be a chain, but a heirarchy.
1 to many relations
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:32
yes. that would be great.
Eric J. Smith
@ejsmith
Jan 11 2016 21:32
if you are looking for a chain of events where this event points to this event which points to the next event...
you could do that with reference ids as well.
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:33
well, isn’t a chain a special kind of hierarchy where n == 1?
Eric J. Smith
@ejsmith
Jan 11 2016 21:33
have to keep track of the last reference id somewhere and keep adding that as a custom property on the next event in the chain.
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:33
yes. that would be the „custom properties with reference ids“ idea
but Blake had another solution
Eric J. Smith
@ejsmith
Jan 11 2016 21:34
yeah, it is, but would suck to show a tab with a grid for a list of events with only a single event every time.
@niemyjski explain your idea, but I don’t think it is as generic a solution.
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:35
as i understand, he wants to put a dot separated string in the source property
i don’t see how that would work in my scenario
Eric J. Smith
@ejsmith
Jan 11 2016 21:36
guess he disappeared. :-)
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:36
i like it for things like „group by common thing"
but i want to group by „not so common" things
Blake Niemyjski
@niemyjski
Jan 11 2016 21:37
so
I was thinking
lets say you are on a wpf form
MainWindow
that would be your page view / feature usage
you click on a button on that window
the feature usage would be MainWindow.OnButtonClick
then in the charts you could view feature usages by main control
Eric J. Smith
@ejsmith
Jan 11 2016 21:39
and how are you linking to the parent or child events?
Blake Niemyjski
@niemyjski
Jan 11 2016 21:39
dive into it and find all feature usages that start with main control. and get child usages
using namespaces
parent.child
parent.child.grandchild
Eric J. Smith
@ejsmith
Jan 11 2016 21:39
we can already do that… we want to see only the child events from this one specific event.
Blake Niemyjski
@niemyjski
Jan 11 2016 21:40
yes, but I’m saying we split on . and that determines the tree
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:40
so we would put reference ids there?
Blake Niemyjski
@niemyjski
Jan 11 2016 21:40
parent -> child -> list of all features that happened in this child
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:40
or just some random ids?
Blake Niemyjski
@niemyjski
Jan 11 2016 21:40
no
Eric J. Smith
@ejsmith
Jan 11 2016 21:40
that’s great, but you need to be able to find all events that happened inside of that one specific event occurrence.
Blake Niemyjski
@niemyjski
Jan 11 2016 21:41
yeah
Eric J. Smith
@ejsmith
Jan 11 2016 21:41
soon?
so?
Blake Niemyjski
@niemyjski
Jan 11 2016 21:41
you could group on source or session id or xyz
Eric J. Smith
@ejsmith
Jan 11 2016 21:41
doesn’t help
this feature usage can happen any number of times within a single user session
Blake Niemyjski
@niemyjski
Jan 11 2016 21:41
so if you want to find all child features you do query starts with parent.child
yeeah
and that’s find
it would be stacked on that feature name
Eric J. Smith
@ejsmith
Jan 11 2016 21:42
I want to see the events that happened as the result of this single page view or button click.
Blake Niemyjski
@niemyjski
Jan 11 2016 21:42
the part that sucks about this if a generic control is used multiple places then you have multiple feature usages of where it was consumed and not the total number that that generic control was used overall
yeah
Eric J. Smith
@ejsmith
Jan 11 2016 21:42
not all of them that happened within the entire session
Blake Niemyjski
@niemyjski
Jan 11 2016 21:43
well then why wouldn’t you click on that feature
and then do session events that occurred after this feature usage
and now your done
Eric J. Smith
@ejsmith
Jan 11 2016 21:43
lol
and so I just have to find the ones that happened after based on time and also know when that occurrence ends too
which I don’t know any of that.
Blake Niemyjski
@niemyjski
Jan 11 2016 21:44
how would you even begin to show streams of events of what a user did on globally after they clicked this button
could be infinite possibilities
whih is why session specific makes the most sense
Eric J. Smith
@ejsmith
Jan 11 2016 21:44
you have session id
but you also have more references on single events.
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:44
okay, wait.
Eric J. Smith
@ejsmith
Jan 11 2016 21:45
so on 1 event I would have session, pageview and maybe even feature
all being references
so I could see everything that happened in the entire session or in a single page view or even down to the feature level.
Blake Niemyjski
@niemyjski
Jan 11 2016 21:46
yep
Eric J. Smith
@ejsmith
Jan 11 2016 21:46
but the point is that my approach is a generic solution that anyone can use to do whatever they want to do.
Blake Niemyjski
@niemyjski
Jan 11 2016 21:46
but it’s confusing as hell
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:46
how would you specify that a custom property is a reference?
Blake Niemyjski
@niemyjski
Jan 11 2016 21:46
you’ve had to explain it like 4 times to both me and frank
Eric J. Smith
@ejsmith
Jan 11 2016 21:46
so a custom property that is a link to an event is confusing?
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:46
hey, I understood it the very first time!
Blake Niemyjski
@niemyjski
Jan 11 2016 21:47
haha well I didn't
Eric J. Smith
@ejsmith
Jan 11 2016 21:47
if that is confusing then I give up.
Blake Niemyjski
@niemyjski
Jan 11 2016 21:47
didn’t mean to group you into that just saw you say wait a few times
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:47
if I’m honest, i haven’t fully understood the stacking idea yet
Blake Niemyjski
@niemyjski
Jan 11 2016 21:48
k
Eric J. Smith
@ejsmith
Jan 11 2016 21:48
don’t want to tackle it, but this reference id could make stacks go away.
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:48
i said wait because it seems like we opened pandora’s container
Eric J. Smith
@ejsmith
Jan 11 2016 21:48
haha
yes
that is the other thing I like about my idea is that the scope isn’t that big.
we have reference id, we have the ability to find and list events by reference id.
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:49
it is pointers. that is no rocket science
Eric J. Smith
@ejsmith
Jan 11 2016 21:49
we have custom properties
those custom properties can be string ids
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:50
still, how do we specify that a property is actually a pointer?
Eric J. Smith
@ejsmith
Jan 11 2016 21:50
we just need to know that they should be linked to a reference id.
Blake Niemyjski
@niemyjski
Jan 11 2016 21:50
got it
Eric J. Smith
@ejsmith
Jan 11 2016 21:50
yeah, I actually had a different idea a while back that we would store metadata with a custom property that says what it is.
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:50
uh. schema.
Eric J. Smith
@ejsmith
Jan 11 2016 21:50
like it could be markdown and gets rendered
Blake Niemyjski
@niemyjski
Jan 11 2016 21:50
so question I have with your approach is this
Eric J. Smith
@ejsmith
Jan 11 2016 21:51
it could be html and gets rendered
or it could be a reference id and gets linked
or it could be a random link
and gets linked
Blake Niemyjski
@niemyjski
Jan 11 2016 21:51
if your child feature usage has a reference to the parent feature / event then how do I get a list of all features that ever happened from a single button click / feature event
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:51
so, just make a string notation for reference ids?
eventreference://234234324
Blake Niemyjski
@niemyjski
Jan 11 2016 21:51
I’d have to go through and say for every feature usage in here look at all child reference ids pointing to all the reference ids in this feature usage
Eric J. Smith
@ejsmith
Jan 11 2016 21:52
@frankebersoll yes, we would need to store the property type somewhere.
gotta figure that out.
but it could be a bunch of different types
and that is really useful all on it’s own.
@niemyjski you can search for feature type
the source
within a single session
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:53
@niemyjski if i understand it correctly, you would have to „walk the tree"
Eric J. Smith
@ejsmith
Jan 11 2016 21:53
or a date range
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:54
how far would elasticsearch support us in this?
Eric J. Smith
@ejsmith
Jan 11 2016 21:55
I don’t think this would be anything in ES.
we index reference id already
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:55
ah!
Eric J. Smith
@ejsmith
Jan 11 2016 21:55
on child events we just need to know what to do with custom properties
we need to know to turn them into a link to a reference id.
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:56
i like a conventional approach as you said
Eric J. Smith
@ejsmith
Jan 11 2016 21:56
but I think being able to do random other things like add a custom property that is a random link
could be a link to an issue tracker system
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:57
i don’t like metadata
Blake Niemyjski
@niemyjski
Jan 11 2016 21:57
yeah
Eric J. Smith
@ejsmith
Jan 11 2016 21:57
what do you mean @frankebersoll ?
Blake Niemyjski
@niemyjski
Jan 11 2016 21:57
i wanted to do things based on the property name extension render test.xml as xml
Eric J. Smith
@ejsmith
Jan 11 2016 21:57
like don’t want to store property type metadata in the event?
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:57
if it’s a string, why not interpret it as markdown?
Blake Niemyjski
@niemyjski
Jan 11 2016 21:57
if you have it blank we check the content to see if its a link
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:57
or format links automatically?
Eric J. Smith
@ejsmith
Jan 11 2016 21:58
because there are other types that we need… xml, html, reference id, json, link
Frank Ebersoll
@frankebersoll
Jan 11 2016 21:58
so, we could just use some fake url scheme like eventreference://
Eric J. Smith
@ejsmith
Jan 11 2016 21:59
reference id would just be a string identifier… how do we know to make it a link?
ok… so the value would be ref:{id}
or link:{link}
what about xml?
or markdown?
or plain text?
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:00
hm.
how would we go about metadata?
Eric J. Smith
@ejsmith
Jan 11 2016 22:00
right now we support text and json
what if it was just in the name of the custom property?
ref:Session
link:Issue
text:Blah
markdown:Blah
the UI would know to strip that front part off if it matched a known type.
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:01
don’t know if :is a valid identifier character
Eric J. Smith
@ejsmith
Jan 11 2016 22:01
in ES?
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:01
in .net
Eric J. Smith
@ejsmith
Jan 11 2016 22:02
whatever format we used
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:02
okay, we could use _ there and transform it
Eric J. Smith
@ejsmith
Jan 11 2016 22:02
but just having it be part of the custom field name.
I guess one issue there is on the UI you could end up with 2 properties seemingly with the same name.
but I don’t know if I care that much.
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:03
how difficult would it be to figure out the type by parsing the string?
Eric J. Smith
@ejsmith
Jan 11 2016 22:04
so it can use current behaviour if no known prefix is there.
which is try to figure out if it’s json or not
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:04
if it starts and ends with { and } it might be json, so just parse it and see if it throws
if it starts with link:{ it’s a link
and so on
Eric J. Smith
@ejsmith
Jan 11 2016 22:04
but if the prefix is there and it matches a known type then we render it.
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:04
could all be done on the client
Eric J. Smith
@ejsmith
Jan 11 2016 22:04
yeah, that is what we do now I believe.
I think we could default rendering plain text as markdown
yep, it’s just property names
so we would have AddLink() or AddReference()
or AddMarkdown
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:05
even that.
Eric J. Smith
@ejsmith
Jan 11 2016 22:06
actually, I think markdown should be the default.
but that would be outside the scope of this.
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:06
then i don’t see that much benefit in metadata or prefixes, which is something that the user needs to care about.
just using the right value seems more intuitive
Eric J. Smith
@ejsmith
Jan 11 2016 22:07
what do you mean?
you mean in the client that the user would manually build the property name?
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:09
my snippet from above:
var eventA = client.createLog(„yeah“), eventB = client.createLog(„yess“);
eventA.submit();
eventB.reference(eventA);
so, this would actually add a reference from b to a
and we’re back to the problem: this should throw an exception if A has no reference_id
this would be the user’s responsibility
Eric J. Smith
@ejsmith
Jan 11 2016 22:10
yes
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:11
or you could add a plugin „AutoReferenceIds“ to prevent this
Eric J. Smith
@ejsmith
Jan 11 2016 22:11
it would be their responsibility to manage the reference ids.
we default the reference ids already I believe.
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:14
back to your initial question: i like sessions.
Eric J. Smith
@ejsmith
Jan 11 2016 22:14
haha
Blake Niemyjski
@niemyjski
Jan 11 2016 22:15
@ejsmith I’ve done some testing and fixed a few bugs on the .net client
do you want to pair later and look at both my server changes and .net client changes
plus you said you wanted to refactor things a bit
Eric J. Smith
@ejsmith
Jan 11 2016 22:16
I have tennis tonight, but we need to talk soon.
I will try and take a look at your changes.
Blake Niemyjski
@niemyjski
Jan 11 2016 22:17
call me or text when you get home
Eric J. Smith
@ejsmith
Jan 11 2016 22:21
only unknown here is how we manage the list of properties that an event would show tabs of child events for.
we would just need to know what property names are links back to this event type.
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:23
but do we even have event „types“?
Eric J. Smith
@ejsmith
Jan 11 2016 22:23
yeah, all events have types.
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:23
that’s what i meant with „how can elastic search support us here“
how can we find the references to one single id in an efficient way
Eric J. Smith
@ejsmith
Jan 11 2016 22:23
I think what we could do is when an event comes in that is a ref id link… we go look that event up and see what type it is and add a tab for the property to that event type.
so the user wouldn’t need to do anything.
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:24
so we add a backreference
Eric J. Smith
@ejsmith
Jan 11 2016 22:24
so new event comes in… for type feature that has a property called session that is a reference id link...
we see that go lookup the reference id event and see that it is type=session
then we add session as a tab on the session event that links to events where session=reference id of the current event.
so for the user… this all comes down to just add a reference id to an event.
done
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:25
ok
Eric J. Smith
@ejsmith
Jan 11 2016 22:26
problem with that plan is that it’s an extra lookup in the processing pipeline.
that would add a lot of work.
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:27
hmm
Eric J. Smith
@ejsmith
Jan 11 2016 22:27
I guess if we say that it’s a 1 to 1 then we only do it once.
so say you get a property called session… you look up the referenced event and see that it is of type session… you map session -> session and never do that lookup again.
but that would mean that you couldn’t have events with reference ids pointing to multiple types of events.
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:29
what about actual backreferencing:
Eric J. Smith
@ejsmith
Jan 11 2016 22:30
like?
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:30
say we have A1 and A2 and B1 pointing to C1 where A, B and C are different types
when we add A1, A2 and B1 we open up C1 and add them to the array of references
when we show C1 we have the reference ids together with their event types without any additional request
Eric J. Smith
@ejsmith
Jan 11 2016 22:32
C1 wouldn’t store a list of ids pointing to it because that could potentially be a massive list of ids.
it would just know what property names reference it.
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:33
okay, but then how would you find that massive list of references later on?
those references are custom fields that are not indexed
Eric J. Smith
@ejsmith
Jan 11 2016 22:33
so the property name is session on the child events… we can search by custom property values.
yeah, they are indexed
so I can do session:{id} and get all the events that have my id
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:36
then, why do i need the property names for?
Blake Niemyjski
@niemyjski
Jan 11 2016 22:36
exactly all those events will already have a session id generated for them
by our plugin
Eric J. Smith
@ejsmith
Jan 11 2016 22:36
because I might have multiple properties pointing back to reference ids
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:36
ah, okay
Eric J. Smith
@ejsmith
Jan 11 2016 22:36
and we would put that session id in the reference id field blake
and could get rid of session id
Blake Niemyjski
@niemyjski
Jan 11 2016 22:37
completely?
Eric J. Smith
@ejsmith
Jan 11 2016 22:37
so when I am on a session, I need to know that there is a custom property called session that has values that point back to my reference id.
yes, this would replace it and be open ended for people to use for whatever they want.
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:38
i like it
Eric J. Smith
@ejsmith
Jan 11 2016 22:38
we can still have a 1st class UI for sessions
Blake Niemyjski
@niemyjski
Jan 11 2016 22:38
but what about actual sessions and people legitly wanting to have a reference id to point to a specific occurrence
Eric J. Smith
@ejsmith
Jan 11 2016 22:38
but it would just use the reference id instead.
@niemyjski no idea what you mean… refererence id would work exactly the same way as session id works now.
Blake Niemyjski
@niemyjski
Jan 11 2016 22:39
or the fact that all of our current clients are all generating random reference ids for every event right now..
ok
when you say reference id
Eric J. Smith
@ejsmith
Jan 11 2016 22:39
that is fine too… but I can also replace those reference ids with one I specify.
Blake Niemyjski
@niemyjski
Jan 11 2016 22:39
I assume your talking about event.reference_id
Eric J. Smith
@ejsmith
Jan 11 2016 22:39
yes
Blake Niemyjski
@niemyjski
Jan 11 2016 22:39
a first class field
Eric J. Smith
@ejsmith
Jan 11 2016 22:39
yes
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:39
@niemyjski event.reference_id would contain the session id on the session event
Blake Niemyjski
@niemyjski
Jan 11 2016 22:40
so how can you have an actual session that you manage as well as a referene id
gotcha
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:40
event.session_id would be a custom property containing the session id on every event in that session
Blake Niemyjski
@niemyjski
Jan 11 2016 22:40
ok
Eric J. Smith
@ejsmith
Jan 11 2016 22:40
so on the session event… reference id = sessionid now.
on child events… they would have a custom property called session that points to that reference id.
Blake Niemyjski
@niemyjski
Jan 11 2016 22:40
gotcha
makes sense
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:41
and if they have a custom session id, they use that for the session event’s reference id
Eric J. Smith
@ejsmith
Jan 11 2016 22:41
yep
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:41
as this is their custom reference id for the session.
Eric J. Smith
@ejsmith
Jan 11 2016 22:41
exactly
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:41
it makes perfect sense
Blake Niemyjski
@niemyjski
Jan 11 2016 22:41
still kinda like having a dedicated session_id property as a first class property
instead of a dynamic property but either way :)
Eric J. Smith
@ejsmith
Jan 11 2016 22:41
thats great except that it does no good for any other scenarios.
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:41
that would only make the logic more complicated?
we can have a „known custom property“ for it
Eric J. Smith
@ejsmith
Jan 11 2016 22:42
yes, then we would need that and reference ids.
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:42
like data or error or whatnot
Eric J. Smith
@ejsmith
Jan 11 2016 22:42
the code that you have made for sessions wouldn’t really change at all.
Blake Niemyjski
@niemyjski
Jan 11 2016 22:42
would break everything we have right now
Eric J. Smith
@ejsmith
Jan 11 2016 22:42
no
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:42
:-)
Blake Niemyjski
@niemyjski
Jan 11 2016 22:42
well I guess not, as long as it’s in idx
Eric J. Smith
@ejsmith
Jan 11 2016 22:42
how would it break anything?
Blake Niemyjski
@niemyjski
Jan 11 2016 22:43
yeah it would work.. too much on my mind
well
it would break shit
we’d have to translate session: to -> idx.session-s
Eric J. Smith
@ejsmith
Jan 11 2016 22:43
yep
Blake Niemyjski
@niemyjski
Jan 11 2016 22:43
cause existing indexes already map session: to session_id
Eric J. Smith
@ejsmith
Jan 11 2016 22:43
that doesn’t break what you have made… it just changes the query.
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:44
dependency injection is on hold. minified constructor arguments are mangled.
Blake Niemyjski
@niemyjski
Jan 11 2016 22:44
fun'
Eric J. Smith
@ejsmith
Jan 11 2016 22:44
haha, yeah.
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:44
bummer
Eric J. Smith
@ejsmith
Jan 11 2016 22:45
that is why you have to do that stupid ugly crap in angular.
that puts the params as strings.
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:45
yes, and it looks like that library you linked is planning the same for its v2
Eric J. Smith
@ejsmith
Jan 11 2016 22:45
if you find one that uses metadata from typescript then minification doesn’t affect it.
Blake Niemyjski
@niemyjski
Jan 11 2016 22:46
@ejsmith exceptionless/Exceptionless#173
I’m against this
there are way simplier solutions
Eric J. Smith
@ejsmith
Jan 11 2016 22:46
and why is that?
well, let’s hear it.
Blake Niemyjski
@niemyjski
Jan 11 2016 22:46
propertyname.md -> look at extension and render it.. if it’s extension less, check for link syntax :// and link it, otherwise pretag it
Eric J. Smith
@ejsmith
Jan 11 2016 22:47
values are not files
they are strings
so where is this file name coming from?
Blake Niemyjski
@niemyjski
Jan 11 2016 22:47
issue.md -> render as mark down and strip .md from the property name
yes
Eric J. Smith
@ejsmith
Jan 11 2016 22:47
and how does that help us with reference id types and link types?
Blake Niemyjski
@niemyjski
Jan 11 2016 22:47
.SetProperty(content.xml”, “xml snippet”)
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:48
@ejsmith isn’t that what we discussed 10 minutes ago?
Eric J. Smith
@ejsmith
Jan 11 2016 22:48
and why would the property name look like a file name?
yes it is.
Blake Niemyjski
@niemyjski
Jan 11 2016 22:48
because it represents the contnet that that it is
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:48
didn’t we say that parsing the string value might be enough?
Blake Niemyjski
@niemyjski
Jan 11 2016 22:48
if you want it formatted and syntax highlighted
Eric J. Smith
@ejsmith
Jan 11 2016 22:48
it only controls how it is rendered.
we need something to indicate that the property is a link.
Blake Niemyjski
@niemyjski
Jan 11 2016 22:49
then you just take the key from the extension and pass it to a control that renders it like pretify and your done
little to no work
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:49
i don’t understand the use case
Eric J. Smith
@ejsmith
Jan 11 2016 22:49
which use case?
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:49
when do i want a link to not be formatted as a link?
Blake Niemyjski
@niemyjski
Jan 11 2016 22:49
you can do index of “://“ if it doesn’t have an extension
then users can specify the content type they know of a head of time, and when we add new types we support they just work
and they get friendly property names to boot
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:50
yes. this
Eric J. Smith
@ejsmith
Jan 11 2016 22:50
I dont know if I would say a file name is a friendly name.
Blake Niemyjski
@niemyjski
Jan 11 2016 22:51
if you just call a property markdown and set hte content what is the property name.. it could be an order email etc
but if you did OrderEmail.md you’d know
and it keeps the logic clean and nothing client side
Eric J. Smith
@ejsmith
Jan 11 2016 22:51
so how would reference id links?
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:52
i… have a deja vu
Blake Niemyjski
@niemyjski
Jan 11 2016 22:52
ReferenceId:link or @referenceId:id and we generate a link cause it’s a known type
Eric J. Smith
@ejsmith
Jan 11 2016 22:52
yeah, no kidding.
how is that different than what I’m saying?
Blake Niemyjski
@niemyjski
Jan 11 2016 22:52
my solution is more generic and works everywhere even for types we know nothing about and we don’t have to special case anything
Eric J. Smith
@ejsmith
Jan 11 2016 22:53
also this isn’t going to be an open ended thing.
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:53
i don’t even know who is arguing for what :-)
Blake Niemyjski
@niemyjski
Jan 11 2016 22:53
cause your saying you have known fields and you call them by what you want to render them as
Eric J. Smith
@ejsmith
Jan 11 2016 22:53
lol
Blake Niemyjski
@niemyjski
Jan 11 2016 22:53
Markdown:content Html:content
Eric J. Smith
@ejsmith
Jan 11 2016 22:53
where is that going????
Blake Niemyjski
@niemyjski
Jan 11 2016 22:53
custom properties on event page
Eric J. Smith
@ejsmith
Jan 11 2016 22:53
yes, where is markdown: going?
Blake Niemyjski
@niemyjski
Jan 11 2016 22:54
custom properties on the event page
Eric J. Smith
@ejsmith
Jan 11 2016 22:54
ugh
where would the value markdown: be in the event data?
Blake Niemyjski
@niemyjski
Jan 11 2016 22:54
Extended data tab
Eric J. Smith
@ejsmith
Jan 11 2016 22:54
holy shit
@frankebersoll
help me out
Blake Niemyjski
@niemyjski
Jan 11 2016 22:55
client.SetProperty(“markdown”, mdcontent)……..
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:55
i dont even
Blake Niemyjski
@niemyjski
Jan 11 2016 22:55
omg guys
Eric J. Smith
@ejsmith
Jan 11 2016 22:55
So they still want a name for their property
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:55
what?
Blake Niemyjski
@niemyjski
Jan 11 2016 22:55
the dam issue is for rendering custom properties out with a known type
ffs
where else would they be displayed
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:55
okay, please let me present my idea and then tell me what is bad about it. then, we discuss erics and then bla
..kes
Eric J. Smith
@ejsmith
Jan 11 2016 22:56
ok
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:57
my idea: no type metadata. figure out what to do on the client. parse any string data, show as link if it’s a link, show as event reference if it’s a reference id (we need a format for that), show as markdown if it contains markdown syntax
kind of what this gitter thing does :-)
Eric J. Smith
@ejsmith
Jan 11 2016 22:58
yes, but ref id can be anything.
Blake Niemyjski
@niemyjski
Jan 11 2016 22:58
yes, I like that idea but parsing and handleing it correctly could be a major pita, which is why I suggested the extension on a property that is stripped with a fallback to parsing
Eric J. Smith
@ejsmith
Jan 11 2016 22:58
it can be user specified
so I can put 1234567890 for a ref id or I can put 32432423423423423423423423424
Blake Niemyjski
@niemyjski
Jan 11 2016 22:59
for example if you have json could contain xml or html or a link
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:59
yes, that’s why i said we could prefix it with a custom url scheme, like reference://blahblah123
Blake Niemyjski
@niemyjski
Jan 11 2016 22:59
so you’d have to have an ordered priorty of types to render first
yeah
Frank Ebersoll
@frankebersoll
Jan 11 2016 22:59
@niemyjski yes, that would be needed
Eric J. Smith
@ejsmith
Jan 11 2016 22:59
now I gotta parse that value to know that it’s a ref id link and be able to go update the mapping of event types.
not only that but in the client I need to do “ref://“ + refid
instead of just doing something like AddReference(“Session”, refid)
Frank Ebersoll
@frankebersoll
Jan 11 2016 23:01
AddReference could do that
Eric J. Smith
@ejsmith
Jan 11 2016 23:01
yeah, it could.
but that doesn’t keep me from having to parse the value on the server side to figure out what it is.
Frank Ebersoll
@frankebersoll
Jan 11 2016 23:01
okay, your idea was to add type specifiers to the property names
kind of „hungarian notation“ style
Eric J. Smith
@ejsmith
Jan 11 2016 23:02
yes, it keeps the type metadata right in with the property and can be used as a key to look up a renderer.
Frank Ebersoll
@frankebersoll
Jan 11 2016 23:02
i mean, parsing would mean a „StartsWith“ that is O(1)
Eric J. Smith
@ejsmith
Jan 11 2016 23:02
yeah, it wouldn’t be horrible.
so if we do that, we would have ref://{id} for value
Blake Niemyjski
@niemyjski
Jan 11 2016 23:03
yeah that would be nice
and simplify client side stuff
Eric J. Smith
@ejsmith
Jan 11 2016 23:03
and the js has to look at the value and know that it is a ref id and turn it into a link.
also makes it feel like I can put that anywhere.
Blake Niemyjski
@niemyjski
Jan 11 2016 23:03
guess I wanted to prefix things like a file type and you want to prefix the start, which works unless you have a property called LinksAdventures:”zelda game of the year"
Eric J. Smith
@ejsmith
Jan 11 2016 23:04
like maybe I think I can do “Blah blah ref://{id}”
Blake Niemyjski
@niemyjski
Jan 11 2016 23:04
suffix things*
Eric J. Smith
@ejsmith
Jan 11 2016 23:04
@niemyjski this isn’t open ended. We can’t render any random file type.
these aren’t even files
they are just strings
Blake Niemyjski
@niemyjski
Jan 11 2016 23:05
yeah
Eric J. Smith
@ejsmith
Jan 11 2016 23:05
I don’t like the file extension looking property names approach.
James Kelly
@jmkelly
Jan 11 2016 23:06
is this where the brains trust behind foundatio hang out?
Blake Niemyjski
@niemyjski
Jan 11 2016 23:06
from rereading the issue it sounded open ended. I’ve actually had a few requests where users wanted content formatted and possibly validated (by a syntax highlighter) cause it would help track down issues they are having with xml and things liek that, which is why I was leaning towards open ended
Eric J. Smith
@ejsmith
Jan 11 2016 23:06
@jmkelly why yes it is!
:-)
Frank Ebersoll
@frankebersoll
Jan 11 2016 23:06
:-D
James Kelly
@jmkelly
Jan 11 2016 23:07
having a bit of a look at it. I think I know hte answer, but don't suppose anyone has a process manager (saga) pattern built around it yet?
Blake Niemyjski
@niemyjski
Jan 11 2016 23:07
@jmkelly nope, but we’ve needed something like that ourselves
Eric J. Smith
@ejsmith
Jan 11 2016 23:07
not currently. It would be nice though! :-)
Blake Niemyjski
@niemyjski
Jan 11 2016 23:08
We’d accept a pull request :)
James Kelly
@jmkelly
Jan 11 2016 23:08
sure would be nice! It's something that I find missing in almost all the bus implementations out there, but one I find sooooooo useful (coming from NSB)
hahaa @niemyjski
I'd have to get my head around the library first before jumping into that
I have started with a postgresql based queue implementation though
Blake Niemyjski
@niemyjski
Jan 11 2016 23:09
it’s pretty straight forward :)
James Kelly
@jmkelly
Jan 11 2016 23:11
another quick one, if there are no subscribers, does the publisher keep on publishing to no one and could be a potential loss of data?
Blake Niemyjski
@niemyjski
Jan 11 2016 23:12
yes
we don’t keep a list and replay to new subscribers
James Kelly
@jmkelly
Jan 11 2016 23:12
hrm. Similar to easynetq.
Blake Niemyjski
@niemyjski
Jan 11 2016 23:12
let me double check that real quick
Eric J. Smith
@ejsmith
Jan 11 2016 23:12
yeah, the messagebus is meant for broadcasting
queues are probably what you want?
James Kelly
@jmkelly
Jan 11 2016 23:13
yeah, probably. I'm coming from a NserviceBus background
Blake Niemyjski
@niemyjski
Jan 11 2016 23:14
yeah we do a foreach over the subscribers (in memory) so if there are none, then nothing happens'
James Kelly
@jmkelly
Jan 11 2016 23:14
no publish?
so the messages are buffered in memory until a subscriber comes up?
Blake Niemyjski
@niemyjski
Jan 11 2016 23:15
no, nothing is buffered
James Kelly
@jmkelly
Jan 11 2016 23:15
cool. Good to know.
Blake Niemyjski
@niemyjski
Jan 11 2016 23:16
if you ever have any questions ask or look at the in memory versions
we have unit tests to ensure they all work the same and if we are missing something please add a test :)
We’ve been battle testing it for quite some time
James Kelly
@jmkelly
Jan 11 2016 23:17
yeah, I spent a while looking at it last night.
if I was to put up a postgresql queue, do you suggest adding it as an extension to foundatio, or are you willing to take the dep on npgsql?
Blake Niemyjski
@niemyjski
Jan 11 2016 23:18
We could add it to the solution but it would have to be in a different project like Foundation.Postgre (or something like that)
We have some things in there that need to be removed like the Repostitories stuff I added a month or two ago into a different repo.
unless you think it would be better in a seperate repo? thoughts?
James Kelly
@jmkelly
Jan 11 2016 23:22
I started down the seperate repo path, but ran into issues with the test setup. Copied heaps of stuff over, but the error message was confusing. Any chance you could take a squizz and see if there is anything obvious https://github.com/jmkelly/Foundatio.Postgresql
I'll try cloning it here (to work) and see if I can replicate the issue. Could be my home setup....
Eric J. Smith
@ejsmith
Jan 11 2016 23:29
You may want to fork our repo and add a new project inside of it if the end goal is for it to be included there.
that might make it easier to get setup.
James Kelly
@jmkelly
Jan 11 2016 23:31
Yeah, I'm thinking that would be a faster option.
Frank Ebersoll
@frankebersoll
Jan 11 2016 23:45
@ejsmith what i don’t like about the property name encoded metadata:
it can’t be changed later on.
what about something like display rules? might be a new configuration thing.
eventtype, property name => display as this or that.
Eric J. Smith
@ejsmith
Jan 11 2016 23:46
what do you mean by it can’t be changed later?
I really don’t want to have configuration for it somewhere because I want to be able to just add some random property on an event and have it work.
Frank Ebersoll
@frankebersoll
Jan 11 2016 23:47
well, if i have some events that have already been submitted, how would i go about changing a simple string to markdown?
Eric J. Smith
@ejsmith
Jan 11 2016 23:47
if I have to set the property type somewhere then it kills that.
Frank Ebersoll
@frankebersoll
Jan 11 2016 23:48
yes. hmm. usually i should know the data type beforehand
Eric J. Smith
@ejsmith
Jan 11 2016 23:48
yeah, so the existing ones in the system would not be rendered, but new ones would be. It wouldn’t break the old ones. Just wouldn’t render them.
Frank Ebersoll
@frankebersoll
Jan 11 2016 23:49
but Blake talked about things like custom highlighters
this won’t be possible with that
Eric J. Smith
@ejsmith
Jan 11 2016 23:49
the idea id event.AddMarkdown(“NewProperty”, “some markdown”); it just works… I do nothing else.
yeah, I have a hard time thinking that we need source code highlighters for custom event property values...
people want XML yes
but we should be rendering that as a table like we do the json objects
and really we don’t need a type for xml
we don’t need a type for json
because those can be sniffed easily.
it’s the reference id that can’t be sniffed
we can do the ref:// thing… but I think that has drawbacks too.
Frank Ebersoll
@frankebersoll
Jan 11 2016 23:51
yeah, and we won’t save them without knowing that it’s a reference id
Eric J. Smith
@ejsmith
Jan 11 2016 23:52
right
we can also just render plain text as markdown.
Frank Ebersoll
@frankebersoll
Jan 11 2016 23:53
ok
Eric J. Smith
@ejsmith
Jan 11 2016 23:54
the problem is really just links and refs
I guess the ref:// is a good solution as long as we can do startswith
Frank Ebersoll
@frankebersoll
Jan 11 2016 23:58
:-)
can’t we do that for links, too?
Eric J. Smith
@ejsmith
Jan 11 2016 23:58
but I feel like people are going to think it looks like html… “blah blah ref://sss"
which would break it.
Frank Ebersoll
@frankebersoll
Jan 11 2016 23:58
they wouldn’t see it anywhere?
Eric J. Smith
@ejsmith
Jan 11 2016 23:58
we need to think about the raw event json too.
Frank Ebersoll
@frankebersoll
Jan 11 2016 23:59
it would only be the internal representation of the value
Eric J. Smith
@ejsmith
Jan 11 2016 23:59
yeah, it would be hidden from them
as long as they are using a client
if they are posting raw json or building their own client
they could easily think they can do whatever.