Relative Content

Tag Archive for data

Inter-process and inter-thread data sharing [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for […]

Design patterns to avoiding breaking the SRP while performing heavy data logging

A class that performs both computations and data logging* seems to have at least two responsibilities. Given a system for which the specifications require heavy data logging, what kind of design patterns or architectural patterns can be used to avoid bloating all the classes with logging calls every time they compute something?

How best to merge/sort/page through tons of JSON arrays?

Here’s the scenario: Say you have millions of JSON documents stored as text files. Each JSON document is an array of “activity” objects, each of which contain a “created_datetime” attribute. What is the best way to merge/sort/filter/page through these activities via a web UI? For example, say we want to take a few thousand of the documents, merge them into a gigantic array, sort the array by the “created_datetime” attribute descending and then page through it 10 activities at a time.

Terminology: Really Delete vs set IsDeleted (“soft delete”) flag

I have a site where a regular user can delete records, where what happens is that an IsDeleted flag gets set. On administrative pages, a privileged user can delete records where an actual SQL DELETE permanently discards such records. The difference is important for obvious reasons, and I want to use a consistent term to refer to the one form of deletion vs. the other. I’ve been playing with the words Remove, Delete, Discard and possibly Recycle, and Archive.

Multiple Display of a Document and persist each viewer change in a single document

i have a scenario where i have to make available a document for viewing and editing to multiple users, the users can edit and view the document at the same time. Now the problem arises here if for example user A and user B are viewing a document at the same time and if both the user change the state of the document and user A saves it at x instant of time and user B saves it at y instant of time where y>z in the time dimension. The changes by the user A will be overridden by changes made by the user B.