About the app: This is an android app. The app has two components/ two different users, scorers who score the game and fans who view commentary of the game.
- Scoring User : A scorer watches a live baseball game and puts the score after each pitch/event of the game. These events are pushed to the server and also stored locally in the scorer’s phone.
- Fans User : Fans who want to follow the game can view play-by-play/pitch-by-pitch commentary of the game on the fans app sent by the server based on the events sent by the scoring app.
Each game will have set of data associated with the game. Fixed data which wont change through out the game, like -:
- Teams Name
- Players List
- Grounds Name .. ETC
Each match will also have a list/array of events. Each event will contain a number of information.
- Batter Name
- Pitcher Name
- Runs scored
- If wicket taken, how was the wicket taken. .. ETC
These list of events generated in each games are stored on the server. Over a period of time these events per match generate interesting insights about pitcher. Example : how is a pitcher better against left hand batters, how a batsman has better average when team win, etc.
Problems/Suggestions required :
- The scorer might have made a mistake in scoring an event and needs to undo the last event. Which design pattern to use in android to support this?
- Should the events be stored as JSON or POJOs on the android app? After each event on the scoring app the event needs to be stored on the local db and on the server. The data is sent to the server a JSON and dumped in a mongoDb.
- The app needs to store details about each event to display in on the commentary app, also to generate insights. The scorer UI also shows the current batsman, runs scored by current batsman, total, current pitcher info etc. This keeps changing after every event. All these data can be derived and updated on the UI by two ways:
- Events list is updated after new event and all other derivable data is calculated again by looping the events. So in case of UNDO last event is removed and looping over again would recalculate actual values. This could keep the data accurate and less prone to errors but needs to traverse a long list each time.
- Along with events list there is another data structure that holds values for other info to be displayed on the UI. Events list is updated after new event and all other derivable data is also updated on the other data structure. This could cause mismatch in data cause data is duplicated, but you don’t need to traverse the long list of events each time.
I have spent sometime on design patterns but could not take a decision on what to proceed with. An expert opinion/direction or a word from someone who has done something in similar lines would be very helpful.
✓ Extra quality
ExtraProxies brings the best proxy quality for you with our private and reliable proxies
✓ Extra anonymity
Top level of anonymity and 100% safe proxies – this is what you get with every proxy package
✓ Extra speed
1,ooo mb/s proxy servers speed – we are way better than others – just enjoy our proxies!
USA proxy location
We offer premium quality USA private proxies – the most essential proxies you can ever want from USA
Our proxies have TOP level of anonymity + Elite quality, so you are always safe and secure with your proxies
Use your proxies as much as you want – we have no limits for data transfer and bandwidth, unlimited usage!
Superb fast proxy servers with 1,000 mb/s speed – sit back and enjoy your lightning fast private proxies!
99,9% servers uptime
Alive and working proxies all the time – we are taking care of our servers so you can use them without any problems
No usage restrictions
You have freedom to use your proxies with every software, browser or website you want without restrictions
Perfect for SEO
We are 100% friendly with all SEO tasks as well as internet marketing – feel the power with our proxies
Buy more proxies and get better price – we offer various proxy packages with great deals and discounts
We are working 24/7 to bring the best proxy experience for you – we are glad to help and assist you!