Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I'm writing an online whiteboard application for fun, where multiple users view the same whiteboard and can draw on it. I'm using websockets (vanilla JS on the frontend, Scala on the backend), and right now am essentially just broadcasting mouse events from one user to the rest of the users, and rendering the image client-side.
However, this results in a transient shared state, whereas I would like to have users be able to hop on at any time and see the preserved shared state. I'm thinking this will probably require having shared rendering code on the backend and the frontend, so that clients render events as they stream but the server can send raw image data when clients associate.
So my question here is: what are some other design patterns I should be aware of for this kind of project? This is a for fun/learning project, so this is an open-ended question, but I'll accept an answer that contains some useful references for this kind of data flow.
So my question here is: what are some other design patterns I should
be aware of for this kind of project?
You don't have to have rendering code on the server. You can just save all the accumulated events that led to the current whiteboard and send those to a new client and let the new client render the whiteboard for itself as if they were listening when all the events originally happened.
If that's more data than is practical, then you can compress raw events. For example a straight or nearly straight line segment does not need all the intervening mouse positions, it really just needs the first and last position of the segment.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am trying implement redis basic functionality like below in Go.
GET
SET
ZADD
ZCARD
ZCOUNT
ZRANGE
SAVE
If you want to implement a Go server offering some Redis features, it is quite easy. You need to decide about the goroutine model, then implement/reuse some data structures (map and skiplist), then implement the Redis protocol (which is simple enough).
I would suggest a goroutine model with 2 goroutines per client connection, plus one goroutine to implement the Redis engine and manage the data structures. The benefit of this model is you can easily support pipelining and the atomicity property of Redis commands without any explicit locking. This model is well adapted if you want to later extend the scope by supporting blocking commands (such as the ones useful for queues).
Now, if you also want to mimic the same exact Redis behavior, this is more complex. Especially, saving the data in background leveraging the OS copy-on-write mechanism will be difficult with Go (since forking does not work). For a memory database, foreground saving is always easy. Background saving is extremely difficult.
You may also want to have a look at the following attempts, and simplify/enrich them to match your goals:
https://github.com/siddontang/ledisdb
https://github.com/felixge/go-redis
https://github.com/docker/go-redis-server
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I am new to ABAP programming. To prepare myself for my new job, I am reading ABAP books. During reading, I learned that ABAP has several legacy elements to keep it backwards compatible with older SAP releases.
Regarding GUIs, I am reading about SAP-UI (PARAMETERS, etc.) Dynpros and WebDynpros. Now, I am unsure about on what to focus my learning efforts on.
Are the common rules like "You should know a little about basic SAP-UI, but mainly focus on WebDypros."
Background information: My new employee does SAP customizing for small and medium sized enterprises.
I'm not a consultant, but I work for a medium (~120 employees) sized company myself. If you were to work for us you would mostly create custom abap reports, maybe sometimes program a user exit. Small companies usually don't spend the money needed for big SAP driven portals, so they probably don't use Netweaver AS Java at all. That means abap dynpro and abap lists as your main UI elements. Sometimes it is good to also know your way around other ways of creating reports, for instance SAP Query.
If I were you I would start with basic abap. You won't have any fun working with dynpros if you haven't gotten your head around the basic stuff first. Learn to work with internal tables, work areas, field symbols. Have a look at some basic ABAP Objects stuff (for instance the ALV grid, very useful for displaying all sorts of tables). You should also understand the ABAP Dictionary, the place where structures, tables, data elements, data domains ans search helps are defined.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
Recently I attended an interview, where the interviewer asked me the following questions in technical face to face interview:
How does Sticky Notes works?
How Windows is able to preserver the data even though it is not saved explicitly?
How the data is preserved even when the system crashes?
I've no idea how does it works. Tried googling, but I couldn't find any useful information.
Can anyone explain or give some information?
I agree with #Vii's response. He has the right information about where the file is stored.
I have found some forensic background on this file here:
http://www.forensicswiki.org/wiki/Sticky_Notes
It seems like the SNT file has 3 datastreams, 0,1 and 3. Stream 0 stores information in RTF form and Steam 3 stores the actual text in Unicode format.
The Root Entry of the storage stream has a timestamp associated with it and you can use tools like MiTec Storage Viewer, Sticky7List to view the creation and modification times associated with the file. You can create a sticky note and observe when it creates the datastream and modify the sticky note and monitor how it modifies the file.
Some helpful references:
http://www.pcworld.com/article/191453/sticky_notes.html
https://superuser.com/questions/396698/how-to-retrieve-contents-of-stick-notes-directly-from-file-system
http://www.forensicswiki.org/wiki/Sticky_Notes
http://computer-forensics.sans.org/blog/2010/10/19/digital-forensics-stuck-stickies-2
http://windowsir.blogspot.com/2011/08/sticky-notes-analysis.html
Sticky notes are written to a file which you can find at '%appdata%\Microsoft\Sticky Notes\StickyNotes.snt' and since there is not an explicit 'save' option, it should be flushing the content to that file as you write it and hence the data is preserved in case of a system crash.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I would like to have the data in my site individually. For example: visitant 1 visited page 1, page 2, page 3, at time x,y,z.
How can i get this data in analytics?
You cannot see data for individual visitors in GA (and trying to do so would violate Googles Terms of Service).
You can redirect the tracking calls to your own server and write a script to parse for visitor data, see me answer here:
What would database-schema/database-design look like for google analytics?
(Those methods served for compatibility with the Urchin analytics software - since support for Urchin was dropped it might be that those method will be dropped at some point in the future).
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
How do you manage a massive (60+ pages) design (HTML/CSS) Project? Like what is your workflow? How do you set milestones?
Step 1. Simplify. Find a way to simplify what they're asking for. Often, this won't be apparent until you decompose and prioritize.
Step 2. Decompose. Inside every large project is a series of smaller projects waiting to get out. Break the big job into "sprints" that will build something you can release in a reasonable amount of time. 2-3 weeks per sprint (or less) is a good target.
Step 3. Prioritize. They want something first. Find out what that thing is and build that.
Step 4. Review and see if you can simplify further. Once you've decomposed and prioritized, you may see further opportunities to remove duplication, useless non-features, junk, fluff, bad ideas, and the like.
I recommend creating a work breakdown structure (WBS) to make sure you capture all of the tasks/deliverables required for your project..here's some basic tasks:
- develop a site map
- develop wireframes and mockups - and get client approval
- develop the main page and unique sub pages (assuming most sub pages are similiar in design and functionality, but different in content)
- inventory content needs
- build out primary page and 2-3 sub pages for final review/approval
- complete implementation of site but add content to the sub-pages