modding – How do I add custom logic to a World of Warcraft internal LUA event using an addon?

I’m trying to show a bit of custom text directly after mount names in the World of Warcraft Mount Journal. I’ve exported the Blizzard API code from the World of Warcraft client, found the method I want to override, copied it to my addon and attempted to register it as a replacement script using MountJournal.ListScrollFrame:SetScript(). However, this doesn’t appear to be working.

I’ve done some investigating, and apparently I need to some magic involving frames and registering events? I’m not sure.

My addon source code can be found at https://github.com/nzall/WarcraftTransportAcquisitionRating/blob/master/warcraftTransportAcquisitionRating.lua. The relevant part that I’m fairly sure is broken can be found below. I’m using Ace to simplify development.

function wTAR:OnEnable()
    MountJournal.ListScrollFrame:SetScript("OnUpdate", MountJournal_UpdateMountList);    
end

What is the proper way to do what I’m trying to do? Or otherwise, if I’m trying to do the wrong thing, how should I do it instead?

development – SystemUpdate() inside my remote event receive will raise “Access denied. You do not have permission to perform this action or access this resource.”

I have the following code inside my remote event receiver (which run on item added):-

 using (ClientContext context = TokenHelper.CreateRemoteEventReceiverClientContext(properties))
            {
              currentItem("OrderAssignToApprover2") = new FieldUserValue() { LookupId = spUser.Id };
              currentItem.SystemUpdate();

now if a non-admin user add an item then the remote event receiver will raise this error on the SystemUpdate():-

Access denied. You do not have permission to perform this action or access this resource.

but if admin user add an item then the remote event receiver will works fine OR if i change the remote event reicever to run using App Permsion, as follow:-

using (ClientContext context = Helpers.GetAppOnlyContext(properties.ItemEventProperties.WebUrl))
            {
              currentItem("OrderAssignToApprover2") = new FieldUserValue() { LookupId = spUser.Id };
              currentItem.SystemUpdate();

so can i assume that the SystemUpdate (unlike Update) require the user to have full control on the site?If this is the case then is there a way to allow non-admin users to execute SystemUpdate?
Thanks

2013 – Are event receivers supposed to handle events of editing the list itself?

I just noticed that our list item event receivers are running when we are updating the list itself, like changing the description or the title. I thought these should only trigger when modifying list items in the list, and not that they would trigger on modifications on the list itself.

Is this expected behavior or have we configured something strange here?

Google isn’t giving me much.

cqrs – Merging aggregates with Event sourcing

I’m currently evaluating Event Sourcing and CQRS for an implementation of a new business requirement at my day job. While I can’t really speak about the actual business problem, I can describe my problem using the domain described in this Kata dealing with quiz games.

I think I got the general idea of Event Sourcing and how CQRS links to it. However, all examples I can find use domains with clear separations between aggregates as well as between different instances of the same aggregate (in the Kata mentioned above, quizzes and games have a clear relationship. There’s no interdependence between different quizzes or different games).

The problem

In my case I have the problem that it must be possible to merge different instances of the same aggregate (in our sample domain this could mean that it must be possible to merge different quizzes together into one quiz) as well as undoing this merge later on (reconstructing the two original quizzes from the merged one).

This constraint adds quite some complexity when it comes to constructing the current state of an aggregate, because it’s necessary to read the whole event stream from the beginning to be sure that all relevant events are taken into consideration. It’s not possible to partition the event stream in a useful way because it’s impossible to tell which aggregates will be merged later in the future. It might even be a problem when the event stream gets partitioned, because the temporal order of related events gets lost.
From what I understand, partitioning the event stream allows for a fast provision of the events that are necessary to build up the current state of an aggregate. For instance, if I want to know the current state of the quiz with ID 124ecf, I technically could filter the event streams to just have the events for this exact ID which would drastically reduce the number of events. If this is not possible, like in my case, reading the event stream ad hoc to recreate the state of an aggregate will become very slow and impractical over time.

The solution I came up with so far

The only solution for this problem that seems to be possible to me is to work with rolling snapshots for all necessary projections. The snapshots would update themselves continuously, building up a state optimized for their specific use case (processing commands, answering queries etc.).
I’m skeptical about this idea, because it requires quite some effort. Most of the implementations of typical applications don’t require rolling snapshots for most use cases because building up the desired state from the event stream is fast enough. This simplicity is lost in my case.

The question

My question could be split up in several parts:

  • Is it a good idea to use Event Sourcing for domains like these where it’s not possible to draw clear boundaries between different instances of the same aggregate?
  • Does it make sense to heavily rely on using rolling snapshots to get the desired performance?
  • Is there another way other than rolling snapshots to implement this?
  • I can’t think of a way for partitioning the event stream. Am I missing something? Are there some techniques that allow partitioning/sharding under the given circumstances?

Event Sourcing Architecture: Ingesting event data from Phones

We will be streaming data from Phones (<= 5000) to a server. We were previously sending the data using MQTT to AWS IOT. Now we want to run this locally. Estimated size per second to be ingested is 5000 phone * 500 bytes = 2.5 MB to 5 MB. 5 mBps = 5*8 mbps i.e. we are looking at something like 20 to 40 mbps. This is not a bottleneck however the number of independent source instances is.

So, I was trying to scale down the problem and use something light, which can stream at 1 or 2 msgs per second from 5000 devices. I tested websockets but one socket is only able to read asynchronously from 200 end clients. Is it better to code this up or use something Eclipse MQTT or Websockets to Elastic Search or Kafka. We had a grpc instance before that was sending a larger packet so it was draining the phone battery faster as the structure was a json.

Why I want to use a simple system so that it becomes easy to maintain for the end client when the software is deployed.

architectural patterns – Message bus: should an event handler trigger other commands?

Given I have a message bus that can handle commands and events. A command handler can dispatch an event. But should an event handler be able to dispatch another command? Or should event handlers only be able to dispatch further events?

Example:

  1. PostReceivedEventHandler subscribes to PostReceivedEvent, invokes ValidatePostCommand
  2. ValidatePostCommandHandler handles ValidatePostCommand, dispatches PostValidatedSuccessfullyEvent

Is this legit? Or should the logic from the ValidatePostCommandHandler go into the PostReceivedEventHandler and this one should then dispatch the PostValidatedSuccessfullyEvent directly?

Because having just event handlers that have no real business logic in it but just dispatch other commands feels somehow wrong to me.

html – interact with SVG Marker element with event handlers in React(JS)

see demo: https://codesandbox.io/s/svg-marker-element-ekkkx?file=/src/App.js
as you can see – the events on the marker element just do not fire.

what can do to make it work, or any idea for an easy alternative implementing arrowhead without the use of SVG marker elements, or any sort of workaround?

(you can see a more detailed explanation of the problem here )

python 3.x – Vue.js don’t receive Socket.io event from Flask

I created simple Flask app:

from flask import Flask, render_template, jsonify
from flask_cors import CORS
import socketio

app = Flask(__name__)
app.config("SECRET_KEY") = 'very-secret'
CORS(app)

sio = socketio.Server(cors_allowed_origins='*', logger=True, async_mode=None)
app.wsgi_app = socketio.WSGIApp(sio, app.wsgi_app)

@sio.event
def connect(sid, environ):
    print('connect ', sid)
    sio.emit('hello_world', {'data': 'A'})

@app.route('/api/ping', methods=('GET'))
def ping():
    sio.emit('hello_world', {'data': 'B'})

    return jsonify({
        'ok': True,
        'data': {
            'message': "Alive!"
        }
    })


if __name__ == '__main__':
    app.debug = True
    app.run(threaded=True)

and then I create simple Vue app, vue-cli starter with only differences in main.js where I added connection to socket server:

import Vue from 'vue'
import App from './App.vue'

import VueSocketIO from "vue-socket.io"

Vue.config.productionTip = false

Vue.use(
    new VueSocketIO({
        debug: true,
        connection: "http://localhost:5000"
    })
)

new Vue({
  render: h => h(App)  
}).$mount('#app')

and HelloWorld.vue component where I changed script part:

export default {
    name: 'HelloWorld',
    props: {
        msg: String
    },
    sockets: {
        connect () {
            console.log("Connected")
        },
        hello_world (data) {
            console.log(data)
        }
    },
    created () {
        this.$socket.emit("hello_world", {"data": "test!"})
    }
}

When I start Flask app and then start Vue app I have following log inside Flask:

$ python app.py
 * Serving Flask app "app" (lazy loading)
 * Environment: production
   WARNING: This is a development server. Do not use it in a production deployment.
   Use a production WSGI server instead.
 * Debug mode: on
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
 * Restarting with stat
 * Debugger is active!
 * Debugger PIN: 386-990-364
connect  dcf04629bd8245239789ae7c59fce915
emitting event "hello_world" to all (/)
127.0.0.1 - - (20/May/2020 19:15:22) "GET /socket.io/?EIO=3&transport=polling&t=N8p5ICr HTTP/1.1" 200 -
received event "hello_world" from dcf04629bd8245239789ae7c59fce915 (/)
127.0.0.1 - - (20/May/2020 19:15:22) "POST /socket.io/?EIO=3&transport=polling&t=N8p5IE0&sid=dcf04629bd8245239789ae7c59fce915 HTTP/1.1" 200 -

Which shows that Vue connected and Flask received this message emited by Vue, but my problem is that Vue don’t receive anything from this server even though that server emited hello_world. It doesn’t run neither connect nor hello_world functions inside sockets block in HelloWorld component. What I am missing here?

GIVEAWAY event up 7 USDT

Hi guys, 

A great opportunity to earn $7 that I had found on Remitano at Indonesian market for users who join their system. Just verify your document and create your first trade with any amount. What are you waiting for?

I am very anxious to share with you this MMO chance!

> Explore Remitano announcement and share to community if you found any interesting thing!