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
Parameters for Events [CORE642] #1006
Comments
Commented by: Alice F. Bird (firebirds) Date: 2006-03-31 00:13 But I see one problem for the "pull"-variant: |
Commented by: Alice F. Bird (firebirds) Date: 2006-01-06 09:14 What you suggest is a hack against the architecture. It can |
Commented by: Alice F. Bird (firebirds) Date: 2006-01-06 02:12 I know that this requires an new mechanism for the events. |
Commented by: Alice F. Bird (firebirds) Date: 2005-12-27 14:45 I'm afraid there won't be an ability to pass any arbitrary |
Modified by: @pcisarissuetype: New Feature [ 2 ] => Improvement [ 4 ] assignee: Dmitry Yemanov [ dimitr ] SF_ID: 1387843 => |
Modified by: @pcisarComponent: API / Client Library [ 10040 ] Component: Engine [ 10000 ] SF_ID: 1387843 => |
Modified by: @pcisarassignee: Dmitry Yemanov [ dimitr ] => |
Modified by: @dyemanovassignee: Dmitry Yemanov [ dimitr ] |
Modified by: @pcisarWorkflow: jira [ 10666 ] => Firebird [ 15026 ] |
Commented by: PEAKTOP (peaktop) why You can not do some like this ? declare variable p_event varchar(..); |
Commented by: @dyemanov It requires all IDs to be registered at the client side. Nobody needs such a feature. |
Commented by: Mercea Paul (m24paul) There are situations where is necessary to have more information from that event (without using a table,generator or something else) especially in multi user systems. post_event_ex('MYEVENT',http://new.id); |
Commented by: Janos Gerevich (nagypapi) I am using jaybird with events In my case I have a multi user environment. The problem is how can a client know, that the event was generated by him? In the current event mechanism I'd have to post an event appending an id at the end of it's name. |
Commented by: @livius2 I suppose that this will be simplier to implement: add possibility to listen to all events without registering explicit name and then in client application we can simply get usefull info from name of event :) |
Commented by: @dyemanov The current events architecture is not suitable for such a change, unfortunately. |
Commented by: @livius2 I think about this and i see that you are worry about i think and this can be solved by new functions |
Modified by: @dyemanovassignee: Dmitry Yemanov [ dimitr ] => |
Commented by: Franz J Fortuny (frafor49) I was using successfully (prior to version 2.5.3): These are the events that the database posts according to real time events: post_event 'newmsg'||new.idu; which is triggered when a new message from another user is inserted for user IDU. Of course, user's IDU task only REGISTERS to listen to events 'newmsg'+IDU (a string). another event: post_event 'usrin'||new.idc, where IDC is the COMPANY ID. All users in that company register to listen for events 'usrin'+IDC; they don't need the events for other companies. or for a chat system: the user registers for event: 'chat'+IDU, where IDU is the user's ID. the event post_event 'chat'||new.idu is only interesting for user IDU, not for any other user. The above combined with php ibase_wait_event($ev1,$ev2,$ev3), which returns a STRING for the corresponding event that was triggered and then executes a query in order to fetch the chat message, or to fetch the user that left, etc. $ev = ibase_wait_event($ev1,$ev2,$ev3...) The above was working in a Linux server with less power. I moved the application to a server with a lot more memory, more CPU's and the database is now on an SSDrive, but is not working anymore! The database is sending a wrong and arbitrary message; that is, the return of the $ev = ibase_wait_event($ev1,$ev2...) IS NOT what is expected. Nothing else changed. BTW: this approach is very simple; if you enroll to listen to events like "chat", then every single time a chat is added, you need to check if it was for you; on the other hand, if you register to listen to 'chat'+ID, then you only fetch the message that is interesting for you; less work for the database, although it must keep for events alive. By the way, firebirdSQL 2.5.3 gets "fat" as it is used in the amount of memory it is using, and remains "fat" even when idle. |
Commented by: Sorien (sorien) pls consider parametred events like in postgres or listening to all events for 4.0 |
Commented by: Thijs van Dien (thijsvandien) If we cannot easily have truly parametrized events, much of the use cases for those could be covered by a combination of two simpler extensions: |
Commented by: Rafael Dipold (dipold) I nice feature for Firebird too: |
Commented by: Ertan Kucukoglu (ertank) It would really be one of the very useful features having a message (even a limited length) delivered to client (in a way of pull/push doesn't matter much as this will be the driver or database component's job) with event. Just like in PostgreSQL's NOTIFY. I am working on a Windows service application which will listen to events sent from triggers. When certain event occurs, application will be sending e-mail to relevant users based on inserted/updated data. I looked for that feature implemented a lot to minimize database query count and decrease table count as current way of events not helping to identify relevant record. Since it is multi-user environment, I cannot find it as the latest inserted record in table. It is almost impossible to identify updated record without adding new tables in database. I am 100% sure there will be a lot more valid use cases than mine above. It has been constantly requested in time. Please, consider a way to add this feature. |
Submitted by: Michael Trowe (bubble76)
Is duplicated by CORE1981
Votes: 17
SFID: 1387843#
Submitted By: bubble76
I think it would be useful to post some additional
information with an event. So the client has more
information how to react on the event.
For example:
post_event('changed_something', current_user);
post_event('row_changed', http://mytable.id);
Till now you have to post an event in this way:
post_event 'changed_something_'||current_user;
The problem is, that all clients must know which users
can fire the event and register one event for every user.
The text was updated successfully, but these errors were encountered: