I read all those discussions and mailing lists which propose how to standardize the inclusion of a timestamp in a pubsub item but there is no answer how it is done practically today. Do I have to tweak my server to include the creation timestamp (because each server stores that information for some reason ;) or are there plugins or known source code modifications for openfire or ejabberd?
I have entries which are published in json format and not in Atom. BTW where the "published" and "updated" timestamps come from in the XEP-0060? Will the timestamp be added automatically if I configure the node to publish in Atom?
You would have to tweak your server, since the timestamp is not part of the spec.
The only way to have timestamps right now, is to put them in at the application level, which means the publisher is inserting it into the payload.
Related
I got some usecase, where contractors work for a specified time in my housing project. And I want to map it to kafka and thought of a topic like:
key : {"validFrom":"2019-09-01", "validTill":"2019-10-10", "name":"contractor1"}
Messsage is a more complicated, like costs that variate at which weekday "contractor1" is working for me.
Another service of mine will query the topic for "2019-10-02" and the message linked to the key, which is between validFrom - validTill, will be returned.
Is this a meaningful way to use kafka or am I thinking in the wrong direction ?(The key will be unique)
If by "point in time" you mean the time of message creation, then you can search by message timestamp - that search is very efficient because timestamp is indexed on the server side.
If you want to find a message based on the value of some message field, like "validFrom" - that will take some time for large topics - you'll have to scan every message in the topic. So, it would make sense to use combination of both methods.
Some UI tools allow you to do this type of search out-of-the-box, take a look at Kafka Magic https://www.kafkamagic.com - it allows writing complex queries using standard JavaScript in combination with timestamp/partition/offset filters.
If you are writing your own solution - standard Kafka client SDK for many languages has methods for locating messages by the timestamp - point your consumer to the start timestamp and read message after message until you find what you are looking for. That is a perfectly valid method.
I have a publication where I send a "record set" of items. Among these items, some have a field with a modification date (Type: Date).
I need to compare the date field with the current date in order to allow/forbid a user interface action. If my date is more than 24hours ago, the action is forbidden.
Initially, I wanted to create a dedicated publication in order to expose only the _id of the items with a Date field inferior to 24h from now.
When reading the excellent answer from #Dan Dascalescu here, I understood that I can't have different minimongo collections if the original Mongodb collection is the same: even if I use different subscriptions everything end up in the same minimongo collection/"record set".
I could just read and compare the Date field on client side and allow/forbid the action but is that secure? Can the client change the date manually? What would be the right way to achieve this?
Any checks that you do to forbid an action have a security implication. There are approaches that you can use here:
use Methods server side along with Meteor.call client side.
use deny rules if it's collection related. That way you get isomorphic behavior for free and instant feedback on client without sacrificing security.
The Firebase REST API describes how to write server values (currently only timestamps are supported) at a location, but it appears that one must submit a separate request in order to do this. Is there (or has there been planned) any way of setting timestamps (like createdAt) at the same time one submits other data? Seems like this would really help reduce traffic and improve performance.
Sure, this is possible. The documentation is admittedly a little unclear, but all you need to do is include the {".sv": "timestamp"} object as part of your JSON payload. Here's an example that saves it to a key timestamp.
curl -X PUT -d '{"something":"something", "timestamp":{".sv": "timestamp"}}' https://abc.firebaseio-demo.com/.json
Right now I am working on a project to fetch data from a SharePoint list using SOAP API. I tried and successfully fetches the complete list, but now I want to fetch some specific data that is updated after a specific date.
Is this possible to fetch such data using SOAP query. I can see last update filed when I view single item at the bottom. Is this some how possible to use that filed?
Yes you can use the Web Services to do lot of things just like filtering a list result. I don't know which language you use, but with JavaScript you can look at these two frameworks that should help you:
http://aymkdn.github.io/SharepointPlus/ : easy way to create your queries (I created it)
http://spservices.codeplex.com/ : the most popular framework but less easy to use (it's my point of view)
You can also look at the documentation on MSDN (the param to use is query): http://msdn.microsoft.com/en-us/library/lists.lists.getlistitems.aspx
At last found the answer,
The last update date and time can be retrieved from the list column "Modified".
The soap response will have the value in the attribute "ows_Modified".
Muhammad Usman
I'm connecting to a third-party web service to retrieve rows from the underlying database. I can optionally pass a parameter like this:
http://server.com/resource?createdAfter=[yyyy-MM-dd hh:ss]
to get only the rows created after a given date.
This means I have to store the current timestamp (using #[function:datestamp:...], no problem) in one message scope and then retrieve it in another.
It also implies the timestamp should be preserved in case of an outage.
Obviously, I could use a subflow containing a file endpoint, saving in a designated file on a path. But, intuitively, based on my (very!) limited experience, it feels hackish.
What's the correct idiom to solve this?
Thanks!
The Object Store Module is designed just for that: to allow you to save bits of information from your flows.
See:
http://mulesoft.github.io/mule-module-objectstore/mule/objectstore-config.html
https://github.com/mulesoft/mule-module-objectstore/